vi /etc/iproute2/rt_tables## reserved values#255 local254 main253 default0 unspec252 ct
251 cnc## local##1 inr.ruhepip route flush table ctip route add default via 电信网关IP dev 网卡号(比如:eth0) src 电信IP table ctip rule add from 电信IP table ctip route flush table cncip route add default via 网通网关IP dev 网卡号(比如:eth1) src 网通IP table cncip rule add from 网通IP table cnc以上脚本 做成 .sh脚本后 增加到服务器启动项查看路由ip route115.238.229.160/27 dev eth0 proto kernel scope link src 115.238.229.175101.64.237.0/26 dev eth1 proto kernel scope link src 101.64.237.43169.254.0.0/16 dev eth1 scope linkdefault via 115.238.229.161 dev eth0查看网关:route添加默认路由:route add �net 0.0.0.0 netmask 0.0.0.0 gw 192.168.0.1[root@localhost ~]# routeKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface101.226.249.192 * 255.255.255.240 U 0 0 0 eth1210.51.47.128 * 255.255.255.128 U 0 0 0 eth0default 101.226.249.193 0.0.0.0 UG 0 0 0 eth1default 210.51.47.129 0.0.0.0 UG 0 0 0 eth0查看机器所有路由表详细情况ip route show table all查看表252的路由情况ip route list table 252查看简洁路由表信息ip route show allip route list刷新路由表ip route flush table 252