Networking linux systems under virtual machines
I have never used a virtual machine to access the Internet. It took me some time to understand today.
We chose the NAT method to access the Internet. Let's go up first. As to why we did this, we will talk about it separately later.
First, we need to enable the Network settings in the Virtual Machine. Edit --> Virtual Network Networker ...... :
You must first check the network segments supported by the Virtual Machine. My network mask and gateway (my network mask is 192.168.226.2) are displayed at 192.168.226.0/24 ). These are all found in the above settings.
The following is the settings:
Edit --> set IP address, subnet mask, and gateway (192.168.226.2 ). The IP address should be within the range of the virtual machine settings we have seen before.
DNS settings are the same as those on your local host.
Next, set the NIC: IP address of VMware... VMnet 8, subnet mask, and gateway.
The IP address here should not be the same as the IP address just now, but it should still be within the range set by the virtual machine. No need to set DNS.
In this way, you can access the Internet.