我有两个pppoe接口- ppp0和ppp1。我想在两个接口上访问同一台服务器。我将所需的ip地址添加到路由表中:
route add 10.88.40.13 ppp0我就能找到服务器。但是,当我也想将这个目标IP添加到另一个接口时:
route add 10.88.40.13 ppp1
kittlnx127:~ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.62.49.1 0.0.0.0 UG 0 0 0 eth0
10.62.49.0 * 255.255.255.0 U 0 0 0 eth0
10.88.40.13 * 255.255.255.255 UH 0 0 0 ppp1
loopback * 255.0.0.0 U 0 0 0 lo
link-local * 255.255.0.0 U 0 0 0 eth0
169.254.203.1 * 255.255.255.255 UH 0 0 0 ppp0
169.254.203.1 * 255.255.255.255 UH 0 0 0 ppp1
192.168.201.0 * 255.255.255.0 U 0 0 0 eth1因此,条目将使用新的接口进行更新。这两个接口有不同的源IP地址:
ppp0 Link encap:Point-to-Point Protocol
inet addr:10.43.154.48 P-t-P:169.254.203.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 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:80 (80.0 b) TX bytes:80 (80.0 b)
ppp1 Link encap:Point-to-Point Protocol
inet addr:10.43.154.32 P-t-P:169.254.203.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 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:80 (80.0 b) TX bytes:80 (80.0 b)那么,是否有可能在两个接口上访问同一台服务器呢?我应该给出更多的细节吗?提前感谢!我找到了这个问题,但我觉得这不是同一个案子.
发布于 2015-03-26 14:46:58
我想你要找的是网络接口连接
参见,例如,http://docs.oracle.com/cd/E37670_01/E41138/html/ch11s05.html
https://unix.stackexchange.com/questions/192626
复制相似问题