centos 6.x 设置固定ip报错,及重启网卡dns被重置

linuxvfast 2014-05-05

机器安装的是centos6.2,多网卡。网卡1设置固定ip,重启出现如下错误,并dns还原

Shutting down interface em2:  Error: Device 'em2' (/org/freedesktop/NetworkManager/Devices/1) disconnecting failed: This device is not active

Shutting down interface em1:  Device state: 3 (disconnected)
                                                           [  OK  ]
Shutting down interface em2:  Error: Device 'em2' (/org/freedesktop/NetworkManager/Devices/1) disconnecting failed: This device is not active
                                                           [FAILED]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface em1:  Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/4

经过查看是NetworkManager的问题

NetworkManager是是分发网络服务请求的一个进程,是一个网络管理的工具。。 
由于启动了NetworkManager服务导致的 ,netwoekmanager会和network冲突导致resolv.conf被还原

解决:

$ service NetworkManager stop 
## 永久性关闭此服务
 [root@Web1 ~]$ chkconfig NetworkManager off
NM_CONTROLLED 实际上是network mamager的参数,而且实时生效。也就是说你改完它保存,不需要重启,它立刻生效。NM_CONTROLLED=yes

相关推荐