設定兩張乙太網路能同時上網設定(Centos 5.6):

#ip route add 10.21.0.0/16 dev eth0 proto kernel scope link src 10.21.10.89 table 1

#ip route add 163.22.21.0/24 dev eth1 proto kernel scope link src 163.22.21.83 table 1

#ip route add default via 163.22.21.254 table 1

#iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 10.21.10.89

#iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 163.22.21.83

測試是否有通

#ping -I 1 168.95.1.1