1。环境条件

VMware虚拟机无法访问外网_centos

VMware虚拟机无法访问外网_centos_02

2。VMware检查

VMware虚拟机无法访问外网_ipad_03

VMware虚拟机无法访问外网_centos_04

VMware虚拟机无法访问外网_ipad_05

VMware虚拟机无法访问外网_f5_06

3。虚拟机检查

1) vi /etc/sysconfig/network

-----------------------------

NETWORKING=yes

HOSTNAME=centos.smartmap

GATEWAY=192.168.163.1

VMware虚拟机无法访问外网_f5_07

2)vi /etc/sysconfig/network-scripts/ifcfg-eth0

----------------------------------------------------

DEVICE="eth0"

BOOTPROTO=static

NM_CONTROLLED=yes

IPADDR=192.168.163.133

NETMASK=255.255.255.0

GATEWAY=192.168.163.1

BROADCAST=192.168.163.255

ONBOOT=yes

TYPE="Ethernet"

# UUID="6577a568-4ede-4a61-8c9d-d7f295ff3f8e"

# DEFROUTE=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

NAME="System eth0"

HWADDR=00:0C:29:DB:E1:F5

# PEERDNS=yes

# PEERROUTES=yes

DNS1=192.168.163.1

VMware虚拟机无法访问外网_f5_08

3) vi /etc/hosts

----------------------------------------------------

127.0.0.1   localhost localhost.localdomain

192.168.163.133 centos centos.smartmap

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

VMware虚拟机无法访问外网_f5_09

4)  vi /etc/resolv.conf

----------------------------------------------------

search smartmap

nameserver 192.168.163.1

VMware虚拟机无法访问外网_centos_10

4。清理

rm -rf /etc/udev/rules.d/*.rules