Vmwarevm network connection

Source: Internet
Author: User

Vmwarevm network connection

VMware provides four Network Connection Methods: bridged, host-only, Nat, custom; 10 virtual networks, VMnet0-VMnet9.

By default, bridged used by vmnet0, host-only used by vmnet1, Nat used by vmnet8, and costom used by others.

We can use the VMware menu edit --> Virtual Network editor... To change the network segment and connection mode of each network, but only one bridged and one Nat can exist at the same time.

1. bridged: bridging. Connect to the network through the physical network card on the local machine, and you can set the physical network card. If this connection method is used, the virtual machine is visible in the LAN and has the same status as other real hosts in the network. You can enable the virtual machine to automatically select a NIC for bridging when using the automatic, or specify a NIC for bridging.

2. Custom: General connection. This is also the most basic connection method for VMware. With this connection, the virtual machine exists in a virtual network and can only communicate with virtual machines in the same virtual network.

3. Host-only: only host. This is an extension of custom. VMware adds a virtual network card to the host, allowing the host to join the virtual network card. Then, with this connection method, the virtual machine can communicate with the current host. If you do not need it, you can go to "edit --> Virtual Network editor ..." Select host-only, and then
Remove the host virtual adapter to this network check box and delete this network card. Then host-only will become custom.

4. NAT: network address translation. To use this method, you must enable the "VMware NAT service" service on the host. It provides Nat services for virtual machines. By default, Nat uses vmnet8, which also adds a virtual network card to the host. This virtual network card is used only to facilitate communication between the VM and the host, add the current host to the NAT virtual subnet through this Nic.
Network editor ..." Select Nat, remove the check box before "connect a host virtual adapter to this network", and delete this network card. To use this connection method, you must set the IP address of the virtual machine to be different from that of the host, and specify a gateway for the virtual machine, the virtual machine can use the NAT service to convert the IP address to the IP address of the host to access the external network. "Nat settings ..." Is the NAT service settings. You can set a gateway here, and the operating system gateway of the virtual machine must be the same as the gateway specified here. If ..." The gateway cannot be specified, because the default subnet is not in the same CIDR block as the gateway. You can modify the subnet
Set the default subnet to the CIDR Block of the gateway. In addition, you also need to go to Nat settings ..." Add DNS information so that DHCP can automatically send the DNS server address. If not set, you need to manually set DNS in the virtual machine. If the virtual machine provides Web Services ..." There is "port forwarding", you only need to select "add" to add forwarding information, so that other hosts can access the services of the Virtual Machine by accessing the IP address of the current host.

Vmwarevm surfing

After learning about several Connection Methods of VMware, let's take a look at how to enable Internet access under virtual machines.

There are four ways for vmwarevm to access the Internet:

1. bridged, which is mainly used for LAN users.

Connection Method: Select bridged as the Virtual Machine network, and set the Virtual Machine IP address to the same network segment as the current host, which is very simple. If a LAN server provides DHCP services, for example, if a home user accesses the Internet and uses the ADSL modem + dlink home route, the virtual machine can select "automatically obtain IP Address", which is simpler! However, this method cannot be used for users who directly use ADSL dial-up Internet access.

(But I saw a friend on the Internet using ADSL dial-up to access the Internet. Using this method, I can even dial up in a virtual machine, and the bandwidth of the host + virtual machine is twice the original bandwidth! Due to limited conditions, I have not tried it, but I think this should be a telecom vulnerability in the city where he is located. Under normal circumstances, an ADSL account can only log on once at the same time. If you are an ADSL user, you may have a try !)

2. bridged + ics. This method is primarily used directly by ADSL dial-up users.

Here we use the Windows "Windows Firewall/Internet Connection Sharing (ICS)" service. before using it, make sure that this service is enabled:

Start-run-enter services. msc, find the service, and make sure it is enabled.

Connection method:

(1 ). choose "Control Panel"> "network connection", right-click "Broadband connection", and select "advanced", which contains "Internet Connection Sharing ", select "allow other network users to connect through the Internet connection of this computer", select "Local Connection" under "Home Network Connection", and click "OK" to exit. A prompt is displayed, OK. The system automatically sets the IP address of the "local connection" to "192.168.0.1 ".

(2) Select vmnet0 or bridged for the VM network.

(3) set the Virtual Machine IP address to 192.168.0.0, for example, 192.168.0.128, subnet mask to 255.255.255.0, default gateway 192.168.0.1, and DNS to 192.168.0.1. Of course, you can also use "automatically obtain IP addresses ".

3. Host-only + ics. This method is primarily used directly by ADSL dial-up users. The connection method is the same as the above. You only need to change the selected Nic to "vmnet1.

If you use this method for LAN users, configure ICS on "Local Connection" and allow the shared connection to choose vmnet1.

4. NAT: Nat is a common method for accessing the Internet, which can be used by both ADSL users and LAN users.

Connection method:

(1) Start-run-enter services. MSC to find and confirm that the "VMware DHCP service" and "VMware NAT service" services are enabled.

(2) Select Nat or vmnet8 as the Virtual Machine network connection mode.

(3) choose "edit -- Virtual Network Editor" from the VMware menu... -- Select vmnet8

(4) Select NAT under vmnet Information

(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 VM and the IP address of the VM operating system is automatically obtained.

If your IP address is planned and cannot be changed at will, or you do not want to use the default CIDR Block and IP address allocated by the system, or you want to set Nat to other vmnet networks, then, you need to set the "subnet IP" subnet CIDR block as mentioned above, and select "DHCP settings ..." Set the IP address range and CIDR block allocated by the DHCP service, and select "nat Settings" to set the "gateway IP" Gateway, set the virtual network card corresponding to vmnet8 Or nat on your host to the network segment of the subnet IP address.

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.