centos 7 : set multi gateway Hint2

vi /etc/sysconfig/network-scripts/ifcfg-eth0

 

IPV4_ROUTE_METRIC=202

IPV4_DNS_PRIORITY=202

 

 

vi /etc/sysconfig/network

ip route add default via 222.222.222.193 dev eth1 table 201

ip route append default nexthop via 192.168.0.1 dev eth0

 

while ip rule delete table 201 2>/dev/null; do true; done

while ip rule delete table 202 2>/dev/null; do true; done

 

ip rule add from 222.222.222.192/27 table 201 priority 201

ip rule add from 192.168.0.0/16 table 202 priority 202

 

ip route flush cache