分页: 1 / 1
如何在单网卡上绑定多个IP?
发表于 : 2007-02-28 16:18
由 matthew_he
内核:2.6.17-11-generic 的ubuntu 6.1上如何实现单网卡上绑定多个IP?
发表于 : 2007-02-28 17:06
由 skyx
论坛search.
发表于 : 2007-02-28 18:37
由 andrew_t
发表于 : 2007-02-28 23:11
由 skyx
andrew_t 写了:楼上的。。。你签名档里面第二个网页里面有错别字
谢谢提醒,这个我早知道啦!!其实不只这个spell错误的,
俄国人的站,不知道主人是谁,我把它link过来只是觉得它不错并且全面
有错字,who care .
发表于 : 2007-03-01 13:32
由 matthew_he
搜了历史贴,
对 /etc/network/interfaces
配置如下:
auto lo
iface lo inet loopback
#the primary network interface
iface eth0 inet static
address 10.150.9.115
netmask 255.255.252.0
gateway 10.150.8.1
#add another interface
auto eth0:0
iface eth0:0 inet static
address 10.150.11.115
netmask 255.255.252.0
gateway 10.150.8.1
auto eth0:1
iface eth0:1 inet static
address 10.150.11.117
netmask 255.255.252.0
gateway 10.150.8.1
~
两个子IP都能工作,但是eth0 反而显示没有链接。
ifconfig
eth0 Link encap:Ethernet HWaddr 00:11:25:35:E5:FE
inet6 addr: fe80::211:25ff:fe35:e5fe/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:283814 errors:0 dropped:0 overruns:0 frame:0
TX packets:10863 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29401551 (28.0 MiB) TX bytes:2093428 (1.9 MiB)
eth0:0 Link encap:Ethernet HWaddr 00:11:25:35:E5:FE
inet addr:10.150.11.115 Bcast:10.150.11.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0:1 Link encap:Ethernet HWaddr 00:11:25:35:E5:FE
inet addr:10.150.11.117 Bcast:10.150.11.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:228 errors:0 dropped:0 overruns:0 frame:0
TX packets:228 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:30178 (29.4 KiB) TX bytes:30178 (29.4 KiB)
请教诸位了!