How to solve the problem that centos7 cannot restart the network

王林
Release: 2020-03-31 11:35:43
Original
4977 people have browsed it

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”
Copy after login

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'.
Copy after login

(Recommended tutorial: centos tutorial)

Solution:

(1) Edit the network card configuration file

vi /etc/sysconfig/network-scripts/ifcfg-eth0
Copy after login

Modify the following configuration:

ONBOOT=yes
Copy after login

(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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!