debian系统下只要简单的修改下/etc/network/interfaces文件就可以了,在eth0接口上绑定更多的IP地址,只需在eth0下面添加如下行:
auto eth0:0 iface eth0:0 inet static address 192.168.0.100 netmask 255.255.255.0 auto eth0:1 iface eth0:0 inet static address 192.168.0.101 netmask 255.255.255.0
这样就添加了另外两个IP,192.168.0.100和192.168.0.101。注意,新增ip不要写gateway(网关),如果还要继续添加ip,同理再在下面添加eth0:1、eth0:2….
保存文件,重启网络
/etc/init.d/networking restart
或者:
sudo /etc/init.d/networking restart
centos系统绑定多ip可以参考:https://blog.mydns.vip/4056.html
» 本文链接地址:https://blog.mydns.vip/4715.html
最新评论
支持下
学习一下
是否是