1. first, vmware needs to set it to the bridging mode so that the virtual machines are regarded as a computer with the host in a LAN, and then in centos, it can be set like the host in a LAN, for example, the host Ip address is 192.168.1.8, the gateway is 192.168.1.1, then centos is set as follows: vim/etc/sysconfig/network-scripts/ifcfg-eth0DEVIC
1. first, vmware needs to set the bridging mode.
In this way, virtual machines are regarded as a computer with the host in a LAN.
In centos, you can set the Ip address of the host in the same LAN as that of the host. for example, if the Ip address of the host is 192.168.1.8 and the gateway is 192.168.1.1, then centos is set as follows:
Vim/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = "eth0"
BOOTPROTO = "static"
HWADDR = "00: 0C: 29: 4F: 6C: CA"
IPV6INIT = "no"
NM_CONTROLLED = "yes"
ONBOOT = "yes"
TYPE = "Ethernet"
UUID = "5b994a6b-e8ae-4b12-8bd3-42f40292ebae"
IPADDR = 192.168.1.69
NETMASK = 255.255.255.0
GATWAY = 192.168.1.1
DNS1 = 192.168.1.1
DNS2 = 58.20.127.170
Save and execute service network restart.