Linux一块网卡绑定2个IP地址
修改/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/init.d/networking restart就可以了