<—>
1. The following error occurred while executing the service network restart
Restarting network (via systemctl): Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.
2. Execute "system CTL status network. service" to output similar information as follows:
[root@localhost ~]# systemctl status network.service
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: failed (Result: exit-code) since March 2014-11-05 15:30:10 CST; 1min 5s ago
11 June 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11 June 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11 June 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11 June 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11 June 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11 June 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11 June 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11 June 05 15:30:10 localhost.localdomain systemd[1]: network.service: control process exited, code=exited status=1
11 June 05 15:30:10 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
11 June 05 15:30:10 localhost.localdomain systemd[1]: Unit network.service entered failed state.
3. The solution (because there is no 70-persistent-net.rules file in centos7, the replicated virtual machine (vmware) needs to modify the mac address) is to modify the mac address.
4. How to view the mac address of the virtual machine copied by centos7 requires "ip addr" to output similar information as follows:
[root@localhost ~]# ip addr
1: lo:
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever
2: eno16777736:
link/ether00:0f:19:10:12:f1 brd ff:ff:ff:ff:ff:ff
inet 192.168.38.135/24 brd 192.168.38.255 scope global dynamic eno16777736
valid_lft 1681sec preferred_lft 1681sec
inet6 fe80::20c:11aa:ae11:4fe4/64 scope link
valid_lft forever preferred_lft forever
Note the bold and red words on it. This is the new mac address.
Next, the ifcfg-XXX file will be modified, just HWADDR. The next step is to execute the service network restart.
Second
If it still fails to start, check to see if there are the following error messages
Nov 23 22:09:07 hdcoe02 network[597]: Bringing up loopback interface: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Nov 23 22:09:07 hdcoe02 network[597]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Nov 23 22:09:08 hdcoe02 network[597]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Nov 23 22:09:08 hdcoe02 network[597]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' Nov 23 22:09:08 hdcoe02 network[597]: [ OK ]
Nov 23 22:09:08 hdcoe02 network[597]: Bringing up interface enp0s25: Error: Connection activation failed: Connection 'enp0s25' is not available on the device enp0s25 at this time.
Set the boot to start a service called NetworkManager-wait-online. The command is:
systemctl enable NetworkManager-wait-online.service
Three
I also tested the above methods have been unsuccessful, and finally found that because the system in the VMware virtual machine upper right corner shows no connection, although the error is the same, finally I deleted the original network adapter in the virtual machine settings, rebuilt a new network adapter, this time in, show that the connection is successful, and then use the above method. Problem solving.
The original address of the blog: http://blog.csdn.net/qq_21398167/article/details/46694179