Shared Internet access through ubuntu under virtual machines (wired network and wireless network)

Source: Internet
Author: User

Ubuntu shared Internet access (wired network and wireless network) under virtual machine I. 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, Gateway addresses, and sub-off masks shown on the "DHCP" and "NAT" tabs in the virtual network settings. If they all exist, you do not need to change them. 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, remove "automatic bridging" (remove hook), and then 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 in the running state. msc Press enter.) Make sure that the VMware DHCP Service and VMware NAT Service have been started. NAT fixed IP 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, VMware DHCP Service (not available for later) 2. Select NAT as the VM's Internet access mode. 3. Click "edit" in the menu bar and select "Virtual Network Settings". Remove the "Automatic bridging" and disable the DHCP service in "DHCP, on the right side of VMnet8 under "Host virtual network mapping", select subnet to modify the subnet. Manual setting method: 1. in windows, press CTRL + R, Enter cmd, and then input ipconfig under dos. The IP address of VMnet8 Nic is 192.168.93.1 (different machines). 2. in Ubuntu, set the network IP address to 192.168.93.X (128-254). Generally, the network IP address is 128 during automatic allocation, and the DNS address is 192.168.93.2. **************************************** *********************************** II. wireless Networks are different from wired networks. If I use a laptop to access the Internet wirelessly, the problem arises. The host is connected wirelessly. How can I set a virtual machine? When the host is wireless, 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, but it was not successful). The method is as follows: 1. disable the running Virtual Machine 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.