Total Pageviews

Wednesday 22 February 2012

Debian下一个网卡绑定多个ip的方法(NetDC)


修改/etc/network/interfaces
auto eth0
iface eth0 inet static
address 172.16.3.123
netmask 255.255.255.0
network 172.16.3.0
broadcast 172.16.3.255
gateway 172.16.3.1
auto eth0:1
iface eth0:1 inet static
address 10.16.3.123
netmask 255.255.0.0
network 10.16.0.0
broadcast 10.16.255.255
修改/etc/network/ifstate
lo=lo
eth0=eth0
eth0:1=eth0:1
没有文件/etc/network/ifstate,手工创建(特别注意:如果没有ifstate文件,创建后修改文件权限755 否则无法生效)
#/etc/init.d/networking restart

No comments:

Post a Comment