CentOS7.2 network.service NetworkManager.service 冲突
今天通过NetworkManager Gui修改了网卡eth0的Gateway,后来reboot了虚拟机,然后奇怪的事情出现了.
1.ifconfig not found eth0
2.systemctl status network, 发现如下错误
Bringing up interface eth0: Error: Connection activation failed: No suitable device found for this connection.
3.ifup eth0 报一样的错误
google 发现 NetworkManager, network竟然可能会发生冲突. 为避免冲突可以在 /etc/sysconfig/network-scripts/ifcfg-eth* 文件 Disabling Network Manager
TYPE=Ethernet
BOOTPROTO=none
DEVICE=eth0
ONBOOT=yes
# DNS2=114.114.114.114
# DNS1=127.0.0.1
IPADDR=10.0.0.57
PREFIX=24
GATEWAY=10.0.0.1
NM_CONTROLLED=no # add this line
systemctl start network ok
或者:
-
systemctl stop NetworkManager
-
systemctl disable NetworkManager
-
systemctl start network
关键字:eth0, systemctl, network, gateway
版权声明
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处。如若内容有涉嫌抄袭侵权/违法违规/事实不符,请点击 举报 进行投诉反馈!