Centos7 network is unreachable

A friend’s centos7 can’t connect to the network normally after it is installed on the virtual machine. I also have this problem. I try to reallocate the address with dhclient, but the system prompts that dhclient is running. I have no choice but to try other methods. After studying it, you can refer to this scheme and try it out. The steps are as follows:

 

1

CD/etc/sysconfig/network scripts/enter the directory of configuration files related to the network to be modified

 

2、 Look at the table of contents

At this time, you will find that there is no ifcfg-eth0 file mentioned in the tutorial. Just open the first ifcfg eno file.

If you can’t find a new tutorial, you can’t create one

3、 VI ifcfg eno1677736

4、 Press the letter I to enter the editing state, and change onboot to yes. Press the ESC key, colon, and then add the letter WQ to save and exit (refer to VI usage)

5、 Service network restart (this command is to restart the network service). If it doesn’t work after the restart, there should be no problem after restarting the Linux system

 

Read More: