原帖由 rui_jh 于 2009-1-14 10:08 发表
# route -n
#route add default gw 192.168.0.1 dev eth0
#route add default gw 10.0.0.1 dev eth1
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth1
原帖由 rui_jh 于 2009-1-14 14:36 发表
同时偶觉得ip命令也无法实现吧,估计还得靠iptables去做,因为iptables可以在网络栈的不同位置设置不同的包处理规则,包括路由规则。
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |