Use VMware to install CentOS in the company and access the extranet in NAT mode. The virtual machine dhclient gets the IP of 192.168.202.128, so the gateway is set to 192.168.202.1, but how can not access the extranet. Can ping through the intranet.
Here's how to fix it:
To view the virtual machine NAT settings:
Vmware-> Edit, virtual network Editor->nat mode->nat settings
In the NAT setup interface, you can view the gateway address as 192.168.202. 2 ; not 192.168.202. 1;
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/83/23/wKiom1drjK7RIrdcAAHYFL6qTsM291.png-wh_500x0-wm_3 -wmp_4-s_3710959127.png "title=" Nat.png "alt=" Wkiom1drjk7rirdcaahyfl6qtsm291.png-wh_50 "/>
To edit a virtual machine configuration:
[Email protected] ~]# Vim/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
hwaddr=00:0c:29:ba:da:6c
Type=ethernet
Uuid=2ece9dcb-bfaf-4b07-ac17-2f4256bd6b43
Onboot=yes
Nm_controlled=yes
Bootproto=static
ipaddr=192.168.202.128
netmask=255.255.255.0
gateway=192.168.202.2
To restart the network card:
Service Network restart
Test:
[[email protected] ~]# Ping www.baidu.com
PING www.a.shifen.com (61.135.169.125) bytes of data.
Bytes from 61.135.169.125:icmp_seq=1 ttl=128 time=2.33 ms
Bytes from 61.135.169.125:icmp_seq=2 ttl=128 time=3.20 ms
Bytes from 61.135.169.125:icmp_seq=3 ttl=128 time=2.41 ms
In-company virtual machines install Linux systems and access the extranet in NAT mode