您的位置:首页 > 运维架构 > Linux

Linux一块网卡绑定2个IP地址

2012-11-08 09:25 375 查看
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就可以了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: