Centos雙閘道器配置路由
IPADDR=10.81.5.1
NETMASK=255.255.255.0
GATEWAY=10.81.5.254
# vim /etc/sysconfig/network-scripts/ifcfg-eno4
IPADDR=219.149.52.35
NETMASK=255.255.255.224
#GATEWAY=219.149.52.62
# vim /etc/iproute2/rt_tables
252 vlan4
251 vlan1
# vim network.sh
ip route flush table vlan4
ip route add default via 219.149.52.62 dev eno4 src 219.149.52.35 table vlan4
ip rule add from 219.149.52.35 table vlan4
#ip route flush table vlan1
#ip route add default via 10.81.5.254 dev eno1 src 10.81.5.1 table vlan1
#ip rule add from 10.81.5.1 table vlan1