CentOs7.4 network card startup: Job for network.service failed

 **The newly installed virtual machine of centos7.4 has a problem with the CentOs7 network card:**

        Restarting network (via systemctl):  Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

       According to the method provided on the Internet, ifconfig checks the network card address and then writes it into the ifcfg-ens33 network card i configuration file, which does not solve the problem. Then I took care of myself all morning. Finally found a way to completely solve the network card error.

       Please turn off the selinux and NetworkManager functions of the virtual machine.

  1. Completely remove the network card on the virtual machine . Re-add a new one.

  2. Ifconfig checks the mac address of the network card . Whether it is consistent with the new network card configuration file . If it is inconsistent , change it to the mac address of ifconfig in the new network card configuration file .

      The newly generated network card configuration file may be a file ending with ifcfg***1 due to system character recognition. Please use cat ifcfg*1 > ifcfgens33 (same name as ifconfig network card) to check the content and change it to a new name. then delete ifcfg###1

  3. Configure the contents of the new network card

     11.png

    service network restart to see if there are still errors. Normally the error disappears.

 

4. Test network connectivity and Internet access.

   4.1 If the gateway cannot be pinged, change the NAT of the virtual machine  to vm8

    11.png

   4.2 Check whether the virtual machine gateway ip is the same as the local vm8 ip address. 

     11.png

        Nat Internet reference http://blog.51cto.com/maomaochong/1789679

        At this point, the pit filling is completed. Hereby record 2018-5-5 12:42


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325310304&siteId=291194637