How to solve the problem that CentOS7 connection network is unreachable?
1. Enterifconfig
Check the network card status
2. Edit/etc/sysconfig/network- scripts/ifcfg-xxx
File
Inputvi /etc/sysconfig/network-scripts/ifcfg-ens33
(This ens33 is the name of the Ethernet card corresponding to the picture above , some may be ifcfg-eth0)
ChangeONBOOT=no
toONBOOT=yes
Press the Esc key and enter :wq , save and exit.
3. Restart the network
Enterservice network restart
to restart the network.
4. Enterifconfig again
Check the network card
You should see the inet information in the Ethernet configuration, and you can now access the Internet.
Related references:centOS tutorial
The above is the detailed content of How to solve the problem that CentOS7 connection network is unreachable. For more information, please follow other related articles on the PHP Chinese website!