vmnet2 access the Internet

1, vmnet2 accessing a network between the external network can not access it. It can access the Internet, in order to access the Internet, there must be real host network to share it

 

 2、[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33

BROWSER_ONLY=no
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
NAME=ens33
DEVICE=ens33
IPADDR=192.168.50.155
NETMASK=255.255.255.0
GATEWAY=192.168.50.1
DNS1=202.96.0.133
DNS2=114.114.144.114
ONBOOT=yes

3、[root@localhost ~]# ping www.baidu.com
PING www.a.shifen.com (61.135.169.125) 56(84) bytes of data.
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=1 ttl=55 time=2.88 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=2 ttl=55 time=2.65 ms

Guess you like

Origin www.cnblogs.com/zjz20/p/11518599.html