CentOS 中单网卡绑定多个IP的方法
cd /etc/sysconfig/network-scripts
cp ifcfg-eth0 ifcfg-eth0:1
vi ifcfg-eth0:1
然后改动相应的地方,一般有两个
1. device=eth0-------->device=eth0:1
2. IP地址
重启一般就可以了!!
例如:
ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=67.228.90.205
NETMASK=255.255.255.0
ifcfg-eth0:0
DEVICE=eth0:0
ONBOOT=yes
IPADDR=67.228.90.206
NETMASK=255.255.255.0
ifcfg-eth0:1
DEVICE=eth0:1
ONBOOT=yes
IPADDR=67.228.90.207
NETMASK=255.255.255.0