VMware Virtual Machine Internet access

Source: Internet
Author: User
Tags get ip

Thank God for your way: VMware Virtual Machine network connectivity

VMware offers 4 ways to connect to the network, BRIDGED,HOST-ONLY,NAT,CUSTOM;10 virtual networks, respectively, Vmnet0-vmnet9.

By default, the Bridged,vmnet1 used by VMnet0 uses the Host-only,vmnet8 used by Nat, and the others use Costom.

We can edit-->virtual the Network Editor via the VMware menu ... To change the segment and connection of each network, but there can only be one bridged and one NAT at a time.

1. Bridged: Bridge connection. Connect to the network through the physical network card on this computer, and you can use the settings of the physical network card. If this connection is used, the virtual machine is visible in the LAN and has the same status as other real hosts in the network. You can use automatic to have the virtual machine automatically select a network card bridge, or you can specify a network card to bridge.

2. Custom: Regular connection. This is also the most basic way to connect VMware. With this connection, the virtual machine exists in a virtual network and cannot communicate with the outside world, only with virtual machines in the same virtual network.

3. Host-only: Host only. This is an extension of custom. VMware adds a virtual NIC to the host, allowing the host to join the virtual network via this virtual NIC. Then, with this connection, the virtual machine can communicate with the current host. If you do not need to, you can select Host-only in the Edit-->virtual network Editor ..., and then remove the "Connect a host Virtual adapter to this Network" before checking the Remove the NIC. Then Host-only will become custom.

4.      NAT: Network address translation. In this way, you need to turn on the "VMware NAT Service" service in the host. It provides a NAT service to the virtual machine. Nat By default is the use of VMNET8, it will also add a virtual network card to the host, the role of the virtual network card is only convenient for the virtual machine to communicate with the host, the current host through this network card to join the NAT virtual subnet, if not required, you can "edit-->virtual Network Editor ... "select Nat, and then remove the network card before the" Connect a host virtual adapter to this network "check box is removed. With this connection, you need to set the IP address of the virtual machine to not the same network segment as the host, and to specify the gateway for the virtual machine, the virtual machine can use the NAT service to translate the IP address into the host's IP to access the external network. "Nat Settings ..." is the setting for the NAT service, where the gateway can be set up, and the virtual machine's operating system gateway is the same as the gateway specified here. If you cannot specify a gateway in NAT Settings ..., it is because the default subnet is not in the same network segment as the gateway, and you can set the default subnet to the network segment of the gateway by modifying the subnet IP. In addition, you need to add DNS information in the NAT Settings ... "to allow DHCP to automatically distribute DNS server addresses, if not set, you need to manually set up DNS in the virtual machine. If the virtual machine provides services such as the Web, "Port Forwarding" in "NAT Settings ..." Requires only the "add" to add forwarding information so that other hosts can access the virtual machine's services by accessing the IP of the current host.

VMware Virtual Machine Internet access

Now that we have a look at some of the ways VMware connects, let's see how we can get online under virtual machines.

There are four ways to access VMware virtual machines:

1. Bridged, using bridging mode, this method is mainly used for local area network users.

Connection method: The virtual machine's network is selected as bridged, the virtual machine's IP address is set to the same network segment as the current host, it is very simple. If the LAN has a server to provide DHCP services, such as home users to the Internet, using ADSL modem+dlink home routing, virtual machine can choose to "Automatically obtain IP address", more simple! However, if you are directly using ADSL dial-up users, you cannot use this method.

(But I see a friend on the Internet is ADSL dial-up Internet, using this way, and then in the virtual machine also dial, unexpectedly can go up, and the host + virtual machine bandwidth equals the original twice!) Because of the limited conditions, I have not tried, but I think this should be his downtown telecommunications loopholes, normally, an ADSL account is allowed to log in only once. If it is ADSL users may wish to try, perhaps there will be surprises! )

2. Bridged+ics, this method is mainly used directly using ADSL dial-up users.

Here we use the Windows Firewall/internet Connection Sharing (ICS) service for Windows to make sure that the service is turned on before use:

Start-run-enter services.msc to find the service and make sure it is open.

Connection method:

(1). Open Control Panel-Network connection, then right-click on "Broadband Connection", select Advanced, there is an "Internet Connection Sharing", select "Allow other network users to connect through this computer's Internet connection", then "Home network Connection" select " Local Connection ", click OK to exit, a prompt will pop up, OK. The system automatically sets the IP of "local Area Connection" to "192.168."

(2). Virtual Machine Network Select Vmnet0 or bridged

(3). Set the virtual machine IP to be a 192.168.0.0 network segment, such as 192.168.0.128, with a subnet mask of 255.255.255.0, and a default gateway of 192.168.0.1,dns 192.168.0.1. Of course, you can also use "Get IP address automatically".

3. Host-only+ics, this method is mainly used directly using ADSL dial-up users. The connection method is the same as above, just change the selected NIC to "Vmnet".

If this method is used by LAN users, configure ICS on local Area connection to allow shared connections to select Vmnet1.

4. Nat, the use of NAT Internet method is more common, ADSL users and local area network users can use.

Connection method:

(1) Start-run-enter services.msc to find and determine the "VMware DHCP Service" service and "VMware NAT Service" service open.

(2) Virtual Machine network connection mode select NAT or Vmnet8

(3) VMware menu select-edit--virtual Network editor...--Select Vmnet8

(4) VMnet information select Nat below

(5) Select Connect a host virtual adapter to this network

(6) Select Use local DHCP service to distribute IP address to VMs

(7) Open the virtual machine, the virtual machine operating system IP automatically get

If your IP address is planned, can not be changed casually, or you do not want to use the system default assigned network segment and IP, or if you set NAT to other Vmnet network, then you need to set the "Subnet IP" subnet segment as mentioned above, select "DHCP Settings. "Set the IP address range and network segment assigned by the DHCP service, and select NAT Settings to set the gateway IP gateways, and set the virtual network card for Vmnet8 or NAT on your host to the network segment of the subnet IP.

VMware Virtual Machine Internet access

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.