2006-7-17 23:30
lc1999
问个linux下IP Alias的问题。
在我的linux上,网卡配置如下:
eth1 Link encap:Ethernet
inet addr:10.255.1.1 Bcast:10.255.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:5514 errors:0 dropped:0 overruns:0 frame:0
TX packets:3435 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:963310 (940.7 Kb) TX bytes:2079153 (1.9 Mb)
Base address:0xdcc0 Memory:fdee0000-fdf00000
eth1:0 Link encap:Ethernet
inet addr:10.255.10.1 Bcast:10.255.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
Base address:0xdcc0 Memory:fdee0000-fdf00000
eth1:1 Link encap:Ethernet
inet addr:10.255.11.1 Bcast:10.255.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
Base address:0xdcc0 Memory:fdee0000-fdf00000
eth1:2 Link encap:Ethernet
inet addr:10.255.12.1 Bcast:10.255.12.255 Mask:255.255.255.0
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
Base address:0xdcc0 Memory:fdee0000-fdf00000
其中, eth1是实际的网卡,eth1:0 eth1:1 eth1:2是eth1上的ip alias。
我的问题是: 在linux上,原来处理eth1的应用程序,如何处理eth1:0 eth1:1 eth1:2?
注意:eth1:0 eth1:1 eth1:2 和eth1 都在不同的网段上。
比如,我从客户端 ping 10.255.1.1 和 ping 10.255.10.1, 系统是如何处理的?
或者,在我的linux上有一个应用程序,listen在10.255.1.1 : 8989, 是不是同样处理10.255.10.1 8989的请求?
谢谢!