Home  >  Article  >  Operation and Maintenance  >  How to solve the problem that centos7 cannot restart the network

How to solve the problem that centos7 cannot restart the network

王林
王林Original
2020-03-31 11:35:435049browse

How to solve the problem that centos7 cannot restart the network

Problem recovery:

When running the "/etc/init.d/network restart" command, the following error occurs:

“Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for deta”

Run" "cat /var/log/messages | grep network" command to view network-related information appearing in the log, as follows:

Bringing up interface eth0:  Error: no device found for connection 'eth0'.

(Recommended tutorial: centos tutorial)

Solution:

(1) Edit the network card configuration file

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

Modify the following configuration:

ONBOOT=yes

(2) Modify the hardware address and the mac obtained by the ifconfig command The addresses are consistent.

(3) Check whether the local VMware DHCP and VMware NAT services are started.

Solution to the failure to start VMware DHCP and WMware NAT services locally:

1. Shut down the virtual machine.

2. Edit-->Virtual Network Settings-->Restore Virtual Network Settings

Recommended related video tutorials: linux video tutorial

The above is the detailed content of How to solve the problem that centos7 cannot restart the network. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn