Home >Operation and Maintenance >CentOS >How to solve the problem that CentOS7 connection network is unreachable

How to solve the problem that CentOS7 connection network is unreachable

WJ
WJOriginal
2020-06-05 15:56:135021browse

How to solve the problem that CentOS7 connection network is unreachable

How to solve the problem that CentOS7 connection network is unreachable?

1. Enter ifconfig Check the network card status

2. Edit /etc/sysconfig/network- scripts/ifcfg-xxx File

Input vi /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)

Change ONBOOT=no to ONBOOT=yes

Press the Esc key and enter :wq , save and exit.

3. Restart the network

Enter service network restart to restart the network.

4. Enter ifconfig 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn