1. set the virtual machine Nic to Bridge 2. set the IP address to a fixed IP address 3. set the subnet mask 4. set the gateway to the IP address of the Lan router 5. set the DNS to my centos system, you need to have DNS1DNS2 method settings in the ifcfg-eth0, in resolv. the configuration in conf is invalid. pay attention to the configuration information in the ifcfg-eth0, and then you can access the internet DEVICE = & quot; e
1. set the VM Nic to bridge
2. set the IP address to a fixed IP address
3. set subnet mask
4. set the gateway to the IP address of the Lan router.
5. set DNS my centos system, need to have DNS1 DNS2 in the ifcfg-eth0 method settings, in resolv. conf settings are invalid, this should be noted
Finally, paste the configuration information in the ifcfg-eth0, after you can access the Internet
DEVICE = "eth0"
BOOTPROTO = "static"
HWADDR = "00: 0C: 29: 2b: 16: 36"
IPV6INIT = "yes"
NM_CONTROLLED = "yes"
ONBOOT = "yes"
TYPE = "Ethernet"
UUID = "8d4b47d5-b1ae-4dd9-a9db-e5f458fb6dcd"
IPADDR = 192.168.0.5
NETMASK = 255.255.255.0
GATEWAY = 192.168.0.1
DNS1 = 192.168.0.1
DNS2 = 8.8.4.4