"Virtual Machine Version"
System version: Centos 6.8
"Connection Method"
Network mode : bridging mode
PS: I prefer to use bridge, direct NAT is also possible
"Configuration Steps"
1. Configure the NIC
#配置命令
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
#ONBOOT (indicates whether the network card is activated when the system starts, only the network card in the active state will be able to connect and communicate with the network)
#BOOTPROTO (This is to indicate what kind of routing protocol you use, there are three different ways of writing, if none and static means you are using static route, then you must fill in the next project IPADDR, NETMASK, gateway three options. If DHCP indicates that you are using dynamic routing protocols, the IPADDR, NETMASK, and gateway options do not have to be filled in. If you fill it out, the value you fill in will prevail)
#IPADDR IP Address
#NETMASK Subnet Mask
#GATEWAY Gateway
#配置完成后重启网卡
Service Network restart
2. Configure Virtual Machine Connection mode
Select Virtual Machine Right-click Settings, network adapter, custom->vmnet1 (bridging mode)
Select Physical network adapter----bridge mode----web editor--
Physical hosts ping virtual machines to see if they are connected
Win+r->cmd
3. Setting up the virtual machine DNS
3.1 Write directly when configuring the NIC
gateway=192.168.1.1
dns1=223.5.5.5
dns2=114.114.114.114
3.2 Written in the resolv.conf configuration file
# vi/etc/resolv.conf
NameServer 223.5.5.5
NameServer 114.114.114.114
PS: Don't forget to restart the network service
4. Ping the Baidu URL in the virtual machine, test whether the same
VMware configures Linux virtual machine Access extranet