It is very painful to set up a virtual machine that cannot connect to the Internet. Here I will talk about my personal experience with Ubuntu's NAT Internet access problem. I have no experience with other bridge connections, etc. Ubuntu version: ubuntu-16.04-desktop-amd64.iso 1. Check/set up the NAT network Open VMware Workstation, click Edit - Virtual Network Editor , and view the network in NAT mode. As shown in the figure below, if you don’t like the automatically assigned subnet IP, you can click Restore Default Settings, but it will still be automatically assigned and you cannot set it yourself. Click NAT Settings to view the subnet IP subnet mask and view and set the gateway IP Click DHCP settings to view and set the automatically assigned IP range . The manually assigned IPs used later will be among these IPs. 2. Set the IP of the virtual machine Click VMware Workstation virtual machine -> Settings to open the virtual machine settings Set the network connection to NAT connection mode Start the virtual machine, enter the graphical interface, and click the network up and down arrows in the upper right corner . The wired connection 1 icon is the network currently in use. If there are other networks, you can connect to other networks We click Edit Connections below to enter the IP settings. Select the IP to be edited, click Edit to enter the network settings interface Select IPv4 Settings , enter the network settings interface, and select the Method: Automatic means automatic allocation. In order to make our network fixed , we choose Manual. Click Add below to add a network , including setting Address (IP address), NetMask and Gateway Among them, Address is the IP range in DHCP of the virtual network editor NAT interface, Netmask is the subnet mask in DHCP, and Gateway is the gateway in NAT settings. After the settings are completed, save and exit, click the network up and down arrows in the upper right corner, click Disconnect, and then select the network we set. Here we select wired connection 1. This is equivalent to reloading the network configuration file to access the network. Now let's check the IP of the network; Ping the host's IP, not the NAT network (but the host's own IP), Ping Baidu PING host machine's IP and Baidu's results Networking effect: hint: If you can ping the IP but cannot ping Baidu or other pings with domain names as the object, it means that there is no tool to resolve the domain name. We need to set the domain name server IP in the virtual machine: View the host's IP domain name server address 210.22.70.3 Set the IP of the DNS server in the virtual machine network settings: This should be enough The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Solution to secure-file-priv problem when exporting MySQL data
>>: Detailed explanation of Javascript closures and applications
Method 1: Use Google advanced search, for example...
Preface About the performance comparison between ...
Using CI to build docker images for release has g...
In HTML, <, >, &, etc. have special mean...
Solution: Directly in the directory where you dow...
1. useState: Let functional components have state...
Do you know what fonts are used in the logo desig...
Table of contents 1. Operate the database 1.1 Cre...
Recently I want to use native JS to implement som...
Table of contents Preface analyze Data Total Repe...
When using CSS pseudo-elements to control element...
NTP is a TCP/IP protocol for synchronizing time o...
This article shares the shell script of mysql5.6....
How to check if the Docker container time zone is...
This article example shares the specific code of ...