I am using the VMWARE,WIN10 system, installing two virtual machines equipped with CentOS 7 systems,
One for the CentOS01, one for the CentOS02, the network adapter using NAT, the following figure:
Here's how to set up the IP of two machines
1. The installation of VMware will appear two virtual network cards, respectively, VMnet1 and VMnet8, as shown below
This is because I need to use the NAT adapter, so I disable the VMnet1
2. Open VMnet8, set IPV4 address, he will have a default IP configuration, here I use their definition, where the IP and your host IP has no relationship, you can be bold settings, my following:
You can also set the IP to 192.168.1.1, and so on, you need to be aware that the DNS server needs to be consistent with your host, my host is 114.114.114.114, so I have to set the virtual network card DNS to 114.114.114.114, click OK, here we virtual network card is set to succeed Up.
3. Enter the virtual machine, in the system setup to find the network, the network card set to the following figure
Note here: The IP in the VMNET8 is the virtual machine gateway, the DNS server is still the same, then IP you can be specified in the valid range, I specify here is 172.16.34.84, so that the virtual machine Network Setup completes, the second virtual machine I set IP for 172.16.34.85. Screenshot below
To this end, the setup is complete and the virtual machine can share the extranet.