- 论坛徽章:
- 0
|
问题是这样的,我们的设备上有个eth0的设备和ppp10的ppp拨号的网络设备。
~ >: ifconfig
eth0 Link encap:Ethernet HWaddr 00:33:55:11:11:33
inet addr:10.78.28.113 Bcast:10.78.28.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26067 errors:0 dropped:0 overruns:0 frame:0
TX packets:4818 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2507307 (2.3 MiB) TX bytes:642471 (627.4 KiB)
Interrupt:111 Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
ppp10 Link encap oint-to-Point Protocol
inet addr:10.215.99.171 P-t-P:10.64.64.74 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:56 (56.0 B) TX bytes:44 (44.0 B)
~ >: route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.64.64.74 * 255.255.255.255 UH 0 0 0 ppp10
10.78.28.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 10.78.28.1 0.0.0.0 UG 0 0 0 eth0
default 10.64.64.74 0.0.0.0 UG 10 0 0 ppp10
系统默认的网关是10.78.28.1(eth0上的),但eth0所在的网络防火墙封了ping.这样ping不出去。
若使用ppp0上的网关10.64.64.74,ping是可以出去的。
执行命令route del default删除10.78.28.1这个默认网关,或者添加一条静态路由route add 4.2.2.2 dev ppp10这样都可以ping通了。但这样的话,所有的数据也从ppp0这条备份链路出去了。
有什么方法能够做到所有的icmp数据从ppp10出,而其他TCP/IP数据都从eth0出? |
|