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

How to solve the problem of CentOS network failure

Release: 2020-03-30 15:15:23
Original
6886 people have browsed it

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
Copy after login

Save and exit.

Restart the network:

service network restart
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template