Install Ubuntu Internet Settings (wired network and wireless network) on a virtual machine)

Source: Internet
Author: User

Shared Internet access through Ubuntu under a virtual machine:

I. Wired Network

In a wired network, VMWare is easy to install, and there is almost no need to set the connection mode (default Nat mode)
If you cannot access the Internet by default, follow these steps:

**************************************** **********************

Nat DHCP Configuration:

1. Select Nat as the VM's Internet access mode.

2. Set vmnet8 to automatically obtain IP addresses, automatically obtain DNS servers, and enable it.

Specific methods: network connection-> Local Connection (vmnet8)-> properties-> IPv4 protocol-> properties-> select "automatically obtain IP address and automatically obtain DNS server ".


3. Set the "local connection" of the Operating System (redhat9.0) in your virtual machine to automatically obtain the IP address and the DNS server;

If the operating system in the virtual machine is Ubuntu, you can view the IP addresses shown on the "DHCP" and "Nat" tabs in the virtual network settings,

Gateway address, sub-off mask, and so on. If both exist, no changes are required.

4. The two most important services must be enabled: VMware DHCP service and VMWare NAT service.

Click "edit"-> "Virtual Network Settings" in the menu bar, and remove "automatic bridging" (remove hook ),

Select "DHCP" to enable the DHCP service, click "start"-> application, and then enable the "Nat" function in the same way.

The specific operations are as follows: Start-> Settings-> Control Panel-> management tools-> services (enter services. MSC and press enter in the running state ),

Make sure that the VMware DHCP service and VMWare NAT service are enabled.

Nat fixed IP Address Configuration: (considering that there is no fixed IP address, communication between the host and the virtual machine is troublesome, and sometimes DHCP takes a lot of time)

1. enable two services: VMWare NAT service and VMWare DHCP service (not available for the latter)

2. Select Nat as the virtual machine's Internet access mode.

3. Click "edit" in the menu bar and select "Virtual Network Settings". Remove "automatic bridging" (remove hook ),

Disable the DHCP service in "DHCP" and select subnet to modify the subnet on the Right of vmnet8 under "host virtual network mapping.

Manual setting:


1. In Windows, press Ctrl + R, Enter cmd, and then input ipconfig under DOS. the IP address of the vmnet8 Nic is 192.168.93.1 (different machines)

2. Set the network IP address to 192.168.93.x (128-254) In ubuntu. Generally, the network IP address is 128 during automatic allocation, and the DNS address is 192.168.93.2.

**************************************** **********************************

Ii. Wireless Networks

Different from wired networks, wireless Internet access is achieved through laptops. The host has wireless Internet access. How can I set virtual machines?

When the host uses wireless Internet access, it is best to use the "Bridge Mode" when setting the Virtual Machine (some documents say that the NAT mode is used. I tried it for a long time and did not succeed). The method is as follows:

1. Disable the running VM Ubuntu and set the network connection mode to "Bridge Mode ".

2. Find the vmware's Virtual Network editor in the vmare editedit. if it is a green version, find vmnetw..exe directly, and double-click it.

3. Find the "host virtual network mapping" option, and find your own wireless network adapter in the drop-down list on vmnet0.
4. Start the Ubuntu virtual machine.

 

Note: In this case, the statuses of DHCP and Nat services, whether enabled or disabled, are not affected.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.