CentOS7.2 network.service NetworkManager.service 衝突

今天經過NetworkManager Gui修改了網卡eth0的Gateway,後來reboot了虛擬機,而後奇怪的事情出現了.
1.ifconfig not found eth0html

2.systemctl status network, 發現以下錯誤ide

Bringing up interface eth0:  Error: Connection activation failed: No suitable device found for this connection.

3.ifup eth0 報同樣的錯誤ui

google 發現 NetworkManager, network居然可能會發生衝突. 爲避免衝突能夠在 /etc/sysconfig/network-scripts/ifcfg-eth* 文件 Disabling Network Managerthis

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 okgoogle

或者:code

  1. systemctl stop NetworkManagerorm

  2. systemctl disable NetworkManagerhtm

  3. systemctl start networkip

相關文章
相關標籤/搜索