增加2个路由表分别是电信:tel 联通:cnc
# vi /etc/iproute2/rt_tables
252 tel
251 cnc
保存并推出
#!/bin/bash
ip route flush table tel
ip route add default via 58.215.182.129 dev eth0 src 58.215.182.130 table tel
ip rule add from 58.215.182.130 table tel
ip route flush table cnc
ip route add default via 117.121.132.188 dev eth1 src 117.121.132.180 table cnc
ip rule add from 117.121.132.180 table cnc
route del default
route add default gw 58.215.182.129