-
-
Save cuihaoleo/9e8de22649e7c74a30f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
if [[ $IFACE == "vlan95" ]]; then | |
ip route add 202.38.95.0/25 dev vlan95 table 1000 | |
ip route add default via 202.38.95.126 table 1000 | |
ip rule add from 202.38.95.110 table 1000 | |
fi | |
if [[ $IFACE == "vlan10" ]]; then | |
ip route add 202.141.160.0/25 dev vlan10 table 1001 | |
ip route add default via 202.141.160.126 table 1001 | |
ip rule add from 202.141.160.110 table 1001 | |
fi | |
if [[ $IFACE == "vlan400" ]]; then | |
ip route add 202.141.176.0/25 dev vlan400 table 1002 | |
ip route add default via 202.141.176.126 table 1002 | |
ip rule add from 202.141.176.110 table 1002 | |
ip route add default via 202.141.176.126 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment