最近在最新发行的linux( 例如 RHEL6+, CentOS,ubuntu11+)等上面配置单网卡绑定多IP地址时,采用修改配置文件
均出现时成功时不成功多现象。经检查发现是 系统中安装的NetworkManager导致的问题。卸载它就可以了。
==============================================================
-------------
========================================
ubuntu:
/etc/sysconfig/network-script/ifcfg-eth0:0,
/etc/network/interfaces
均出现时成功时不成功多现象。经检查发现是 系统中安装的NetworkManager导致的问题。卸载它就可以了。
yum remove NetworkManager
sudo apt-get remove NetworkManager
==============================================================
DEVICE="eth0"
#NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
#NAME="System eth0"
#UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
HWADDR=00:0C:29:44:03:F6
PEERDNS=yes
PEERROUTES=yes
-------------
DEVICE=eth0:0
TYPE=Ethernet
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.203.120
NETMASK=255.255.255.0
#GATEWAY=192.168.203.203
#DNS1=192.168.203.203
#DEFROUTE=yes
#IPV4_FAILURE_FATAL=yes
#IPV6INIT=no
#NAME=eth0:0
#UUID=a9d8e26d-e674-43c2-9e6c-2dd8e1cf7b5d
#ONBOOT=yes
#HWADDR=00:0C:29:44:03:F6
========================================
ubuntu:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth0:0
iface eth0:0 inet static
address 192.168.203.60
netmask 255.255.255.0
#address 192.168.1.1
#netmask 255.255.255.0
#network 192.168.1.0
#broadcast 192.168.1.255
#gateway 192.168.1.1