ubuntu下
#!/bin/sh
#前提用联通IP登录系统
cp/etc/iproute2/rt_tables/etc/iproute2/rt_tables.bak
#telecom
#echo200telecom>>/etc/iproute2/rt_tables
#unioncom
#echo201unioncom>>/etc/iproute2/rt_tables
iprouteadd122.193.101.51/29deveth0src122.193.101.51tableliantong
iprouteadddefaultvia122.193.101.49tableliantong
iprouteadd222.92.154.139/29deveth1src222.92.154.139tabledianxin
iprouteadddefaultvia222.92.154.137tabledianxin
iprouteadd122.193.101.51/29deveth0src122.193.101.51
iprouteadd222.92.154.139/29deveth1src222.92.154.139
#更换试试
iprouteadddefaultvia222.92.154.137
#liangtong
ipruleaddfrom122.193.101.51tableliantong
#dianxin
ipruleaddfrom222.92.154.139tabledianxin
redhat
双网卡,双公网IP,保持每个公网IP胡通
iprouteadddefaultvia180.153.154.1deveth0src180.153.154.155tablehengs01
iprouteadddefaultvia180.153.153.25deveth2src180.153.153.28tablehengs02
ipruleaddfrom180.153.154.155tablehengs01
ipruleaddfrom180.153.153.28tablehengs02