CentOS6.5 network settings

CentOS6.5 network settings#

I don't know what I did wrong, and I can't connect to the Internet for a long time. Baidu still can't connect to all kinds of things. Finally, I extracted the configuration that was previously available for networking and pasted it, and it was successful. The content of the configuration file is as follows:

vim /etc/resolv.conf

1 generated by /sbin/dhclient-script

2 search localdomain

3 nameserver 192.168.75.2

[ root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0

1 # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

2 DEVICE=eth0

3 BOOTPROTO=dhcp

4 HWADDR=00:0C:29:1E:F1:E3

5 ONBOOT=yes

~

In addition: The several strategies found on the Internet have been successful, but this time they failed life and death for unknown reasons. Anyway, after modifying the above, it is ok. Here is the search content:

The correct configuration method is as follows:

  1. Make sure the virtual network card (VMware Network Adapter VMnet8) is turned on, then enter "ipconfig" in the Windows command line, and find the ipv4 address of VMware Network Adapter VMnet8, for example: 192.168.78.1)

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

  3. Modify the /etc/sysconfig/network-scripts/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 bit must be any value from 1 to 255

The IP value of GETWAY must be consistent with the ip in VMNET8 and the last digit is 2.

**  eg:**

My local ip is 192.168.78.1, so the correct configuration is:

BROADCAST=192.168.78.255

IPADDR=192.168.78.1

GETWAY=192.168.78.2

  1. After configuration, please enter the command "service network restart" to restart the network service.

  2. Use the "ping" command to see if the network is available.

The above is the introduction of the solution to the CentOS6.5 cannot connect to the network in VMware. If you also encounter the same problem, you may try to use the method described in this article to solve it and reconfigure the eth0 file.

Recommended Posts

CentOS6.5 network settings
CentOS 7 network settings --- connectivity
Centos6.5 desktop version network settings
Centos network settings in virtualbox
CentOS7.0 network configuration
CentOS 7.0 network configuration
IP and network settings of CentOS Linux 7 VMware
SELinux security settings under CentOS
CentOS 8 (1)
Implementation of CentOS8.0 Network Configuration
CentOS8 network card configuration file
CentOS7 modify the network card name
Detailed examples of Centos6 network configuration
Centos7 change the network card name
centos7 cannot connect to the external network
Configure iSCSI network storage under CentOS 7.x
centos7 python3.7+vi
CentOS + Python3.6+
CentOS + Jenkins
1.5 Install Centos7
2019-07-09 CentOS7 installation
centos7_1708 installation
Centos 7.5 python3.6
VMware Fusion install CentOS7 and configure the network
Centos7.6 dual network card configuration and switching test