Home  >  Article  >  Operation and Maintenance  >  How to solve the problem of CentOS network failure

How to solve the problem of CentOS network failure

尚
Original
2020-03-30 15:15:236795browse

How to solve the problem of CentOS network failure

1. Centos will not establish a local connection by default, at least in the virtual machine. Just create a new one yourself:

cd /etc/sysconfig/network- scripts/

vi ifcfg-eth0

DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
NM_CONTROLLED=yes

Save and exit.

Restart the network:

service network restart

2. Check whether the CentOS network configuration in the virtual machine is NAT

Modify the /etc/sysconfig/network-scprits/eth0 file

The IP value of BROADCAST must be consistent with the ip in VMNET8 and the last digit must be 255

The IP value of IPADDR must be consistent with the ip in VMNET8 and the last digit must be 1~255 The IP value of any value

GETWAY must be consistent with the IP in VMNET8 and the last digit is 2

Then restart the network.

Recommended tutorial: centos tutorial

The above is the detailed content of How to solve the problem of CentOS network failure. 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