Virtual Machine VMware3 Network mode (bridging, NAT, Host-only)

Source: Internet
Author: User
Tags switches virtual environment

let's start by talking about several VMware virtual devices

VMnet0: Virtual Switches for virtual bridging networks

VMNET1: Virtual Switches for virtual host-only networks

VMNET8: Virtual Switches for virtual NAT Networks

VMware Network adepter vmnet1:host Virtual network adapters for communication with host-only virtual networks

vmwarenetwork adepter vmnet8:host virtual NIC for communication with NAT virtual network

The above mentioned VMnet0, VMnet1, VMnet8, VMware Network Adepter VMnet1, and Vmwarenetwork Adepter VMnet8, are generated automatically by VMware virtual machines. Users are not required to set themselves. VMnet8 and VMNET1 provide DHCP services, VMNET0 virtual networks do not provide, that is, when you select VMnet0, you need to manually set TCP/IP configuration information (bridging mode).

After you install the VMware virtual machine, you will have two more virtual NICs in the Network Connection dialog box, as shown in the figure:


One, bridging mode

Bridging network refers to the local physical network card and virtual network card through the VMnet0 Virtual Switch bridge, the virtual system and host machine relationship is like two computers connected to the same switch, forming a local area network.

Bridge Network topology Map

Note: The physical network card and the virtual NIC are in the same position on the topology map (the virtual NIC is neither Adepter VMnet1 nor Adepter VMnet8).


a virtual switch is equivalent to a switch in a real-world network, and VMware's virtual operating system, like a stand-alone host in a LAN composed of the switch, configures its TCP/IP configuration information by hand, and can access the Internet through a gateway or router on the LAN. and the physical network card and the virtual network card is equivalent to the same network segment, so the IP address of the two network cards should also be set to the same network segment, so that the virtual system can communicate with the host machine.

If you want to use VMware to create a new virtual server in your local area network, you should choose the bridge mode to provide Internet service for LAN users.


Second, Nat mode

using NAT mode, through the VMware Network on the host Adepter VMNET8 virtual network card directly connected to the VMNET8 virtual Switch to communicate with the virtual network card, the host and the virtual machine communication. Enables virtual systems to access public networks through the network where the host machine resides, with the help of NAT (network address translation). The TCP/IP configuration information for the virtual system is provided by the DHCP server of the VMNET8 (NAT) virtual network and cannot be manually modified.



NAT Network mode

Note: The virtual system and the host machine system can communicate with each other, which is equivalent to the two machines connected by twisted-pair wires.


in fact, the role of the VMware network adepter VMnet8 Virtual network card is to provide an interface for the communication between the host and the virtual machine, even if the host's physical network card is turned off, the virtual machine can still connect to the Internet, but the host and the virtual machine cannot exchange visits. The VMware network Adepter VMnet8 Virtual NIC is invoked when the host communicates with the virtual machine, because they are all in one network segment, so communication is not a problem.

the role of VMware networkadepter VMNET8 Virtual network card is limited to communication with VMNET8 network segment, it does not provide routing function to VMnet8 network segment, so virtual machine virtual a NAT server, so that the virtual network card can connect to the Internet. In this case, we can use the port mapping feature to map requests to the host port to the virtual machine port. Although the NAT way can realize the virtual machine host communication, accesses the Internet through the virtual machine, but if wants the virtual machine as the server, lets the Internet access, can not.

The IP address of the VMware networkadepter VMNET8 virtual network adapter is generated by the system when installing VMware, and we do not modify this value, otherwise the host and the virtual machine will not be able to communicate. After you install VMware, you will also generate a virtual DHCP server that assigns IP addresses to the NAT server. Using the NAT and DHCP service provided by VMware, the virtual machine uses the virtual network card VMNET8 in the host as the gateway, and TCP/IP settings follow the DHCP and NAT settings for VMNET8 in the program. If the IP must be between the StartIP and EndIP of its DHCP settings, the gateway needs to use the gateway IP set by its NAT. Virtual network segment and NAT mode virtual network of network segment is the same, all 192.168.111.X, including the NAT server IP address is the network segment.

the biggest advantage of using NAT mode is that virtual system access to the Internet is very simple, you do not need to do any other configuration, only need host machine to access the Internet. If you want to use VMware to install a new virtual system, in the virtual system without any manual configuration can directly access the Internet, we recommend that you use NAT mode

Three, host-only mode

in host-only mode, the virtual network is a completely closed network, it is the only access to the host, through the host Vmwarenetwork adepter VMNET1 virtual network card directly connected to the VMNET1 virtual Switch to communicate with the virtual network card, Implement communication between the host and the virtual machine. In fact, Host-only Network and NAT network is very similar, different place is host-only network without NAT service, so the virtual network cannot connect to the Internet.

Host-only mode

Note: The virtual system and the host machine system can communicate with each other, which is equivalent to the two machines connected by twisted-pair wires.

the IP address of the VMware network adepter VMNET8 Virtual network adapter is generated by the system when VMware is installed, while the IP address of the generated virtual DHCP server and virtual network adapter is on the same network segment, but the IP address of the physical network card is not on the same network segment. In host-only mode, the TCP/IP configuration information for the virtual system (such as IP address, gateway address, DNS server, etc.) is dynamically allocated by the DHCP server of the VMNET1 (host-only) virtual network. The default use of Vmnet1, the virtual machine IP settings and Vmnet1 with the network segment, gateway set to Vmnet1 IP, the rest of the same settings and Vmnet1, DNS settings and host the same.

in some special network debugging environment, requires that the real environment and virtual environment isolation, then you can use Host-only mode. In host-only mode, all virtual systems can communicate with each other, but virtual systems and real networks are isolated.

For more information, please visit http://www.100ask.org/

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.