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

How to solve the problem that CentOS7 connection network is unreachable

WJ
WJ Original
2020-06-05 15:56:13 4895browse

How to solve the problem that CentOS7 connection network is unreachable

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

1. EnterifconfigCheck the network card status

2. Edit/etc/sysconfig/network- scripts/ifcfg-xxxFile

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=notoONBOOT=yes

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

3. Restart the network

Enterservice network restartto restart the network.

4. Enterifconfig againCheck 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