Linux virtual machines access the Internet in NAT mode.
1. Configure the local VM8 address
2. configure the Virtual Machine nat nic: Set the VM8 NIC address to the same CIDR block as the Linux host, gateway casually set 3, compile the NIC file vim/etc/sysconfig/network-scripts/ifcfg-eth0 main configuration is as follows:
IPADDR = 192.168.200.5 // the IP address and VMnet8 IP address are in the same network segment NETMASK = 255.255.255.0 // subnet mask GATEWAY = 192.168.200.2 // GATEWAY select your GATEWAY address in the WMware network editor DNS1 = 192.168.1.1 // the IP address of the primary DNS server is the real gateway of the host in windows.
Nic configuration file/etc/sysconfig/network-scripts/ifcfg-eth0 content DEVICE = eth0 DEVICE name HWADDR = 00: 0c: 29: ac: 95: the physical address of the 0c device NM_CONTROLLED = no whether to use NetworkManager to manage network interfaces. By default, yesONBOOT = yes enables this network interface when the system or network service starts, by default, noIPADDR = 192.168.1.1 defines the IP address NETMASK = 255.255.255.0 and defines the subnet mask TYPE = Ethernet network TYPE: Ethernet BOOTPROTO = noneIP acquisition method. none. No startup protocol is used. dhcp is used as the startup protocol, obtain the IP address through the dhcp server static use static IP address IPV6INIT = no whether IPv6 Configuration is supported USERCTL = no whether normal users are allowed to control the network interface GATEWAY = 192.168.1.254 default GATEWAY address DNS1 = 222.222.222.222 specify the host DNS server address that can be searched: DNS2 = 202.99.166.4DNS3 = 202.99.160.68