Centos7.6配置IP重启网卡报错Failed to start LSB: Bring up/down networking

 欢迎关注微信公众号九万里大数据。

Centos7.6配置IP重启网卡报错Failed to start LSB: Bring up/down networking

Sep 24 13:54:48 localhost.localdomainNetworkManager[4451]: <info> [1600926888.0948] audit: op="connection-activate" uuid="5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03"name="eth0" result="fail" reason="No suitable devicefound for this connection."

Sep 24 13:54:48 localhost.localdomainnetwork[4497]: Bringing up interface eth0: Error: Connection activation failed: No suitable device found for thisconnection.

Sep 24 13:54:48 localhost.localdomainnetwork[4497]: [FAILED]

Sep 24 13:54:48 localhost.localdomainnetwork[4497]: RTNETLINK answers: File exists

Sep 24 13:54:48 localhost.localdomainnetwork[4497]: RTNETLINK answers: File exists

Sep 24 13:54:48 localhost.localdomainnetwork[4497]: RTNETLINK answers: File exists

Sep 24 13:54:48 localhost.localdomainnetwork[4497]: RTNETLINK answers: File exists

Sep 24 13:54:48 localhost.localdomainnetwork[4497]: RTNETLINK answers: File exists

Sep 24 13:54:48 localhost.localdomainnetwork[4497]: RTNETLINK answers: File exists

Sep 24 13:54:48 localhost.localdomainnetwork[4497]: RTNETLINK answers: File exists

Sep 24 13:54:48 localhost.localdomainnetwork[4497]: RTNETLINK answers: File exists

Sep 24 13:54:48 localhost.localdomainnetwork[4497]: RTNETLINK answers: File exists

Sep 24 13:54:48 localhost.localdomainsystemd[1]: network.service: control process exited, code=exited status=1

Sep 24 13:54:48 localhost.localdomainsystemd[1]: Failed to start LSB: Bring up/down networking.

-- Subject: Unit network.service has failed

 

Centos7.6配置IP重启网卡报错Failed to start LSB: Bring up/down networking

网上的一些办法,比如停止NetworkManager,没有什么用。欢迎关注微信公众号九万里大数据。

 

解决办法

先确保ifcfg-eth0配置文件信息准备无误

vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=static

ONBOOT=yes

IPADDR=10.0.2.27

NETMASK=255.255.255.0

GATEWAY=10.0.2.2

DNS1=202.101.172.35

DNS2=202.101.172.47

HWADDR=08:00:27:f9:b5:a1

 

移除/etc/sysconfig/network-scripts 目录下的除了ifcfg-eth0和ifcfg-lo这两个之外的其他网卡配置,比如删除ifcfg-enp0s3

 

如果再次运行systemctl restart network依然报错Failed to start LSB: Bring up/down networking。则重启一下机器reboot即可(关键)。重启后,恢复正常,再次运行systemctl restart network也没有报错了。欢迎关注微信公众号九万里大数据。

Centos7.6配置IP重启网卡报错Failed to start LSB: Bring up/down networking

Centos7.6配置IP重启网卡报错Failed to start LSB: Bring up/down networking