Environment: centos7 system
Problem description:
[root@localhost Desktop]# systemctl start network.service Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.
Solution:
1. HWADDR error, find the correct one HWADDR
Enterip addr
, find HWADDR
and entercd /etc/sysconfig/network-scripts
Edit the correspondingvim ifcfg-ensXX
, set the HWADDR correctly, and restart
service network restart
If it still doesn’t work, you need to reset the IP.
(Recommended tutorial:centos usage tutorial)
2. IP check and setting
Enter the host cmd command window and enteripconfig / all
Then enter the centos7 virtual machinecd /etc/sysconfig/network-scripts
Edit the correspondingvim ifcfg-ensXX
Then turn off the network:
root@localhost Desktop]# service NetworkManager stop Redirecting to /bin/systemctl stop NetworkManager.service
Then restart:
[root@localhost Desktop]# service network restart Restarting network (via systemctl): [ OK ]
Recommended related video tutorials:linux video tutorial
The above is the detailed content of What should I do if the centos system fails to restart the network?. For more information, please follow other related articles on the PHP Chinese website!