Three VMware networking methods

Source: Internet
Author: User

Three Network modes of Vmware

First, let's talk about several VMware Virtual Devices.

After the vmwarevm is installed, two more virtual NICS will be displayed in the network connection dialog box,


Vmnet0: used for Virtual Switches in a virtual bridge network

Vmnet1: used for Virtual Switches under the virtual host-only Network

Vmnet8: used for vswitches in a virtual Nat Network

VMware network adeptervmnet1: Virtual Network Card used by the host to communicate with the host-only virtual network

VMware network adepter vmnet8: Virtual Network Card used by the host to communicate with the NAT Virtual Network

Currently, redhatenterpriseserver6.2 is installed in the virtual machine, and the host is the flagship version of win7.

1. Bridge

In this mode, the Virtual Operating System of VMware is like an independent host in the LAN, which can access any machine in the network. You must manually configure the IP address and subnet mask for the virtual system, and the virtual system must be in the same network segment as the host machine so that the virtual system can communicate with the host machine. At the same time, because the virtual system is an independent host system in the LAN, You can manually configure its TCP/IP configuration information to access the Internet through the LAN gateway or router.

First, select bridge, VMWare ---> VM ---> setting ---> networkadapter in VMware.


In VMware, select VMware ---> edit ---> virtualnetworkeditor


Then, view the IP address of the host.


Configure the RedHat IP address in the Virtual Machine

System ---> preferences ---> network connection ---> select eth4 and edit


Remote Control of RedHat System Using xshell


There is no problem connecting the host to the campus intranet. Because you need to log on to the drcom client to access the Internet in the dormitory, you must install drcom for Linux for Redhat.

For example:


2. Nat

The Nat mode enables the virtual system to use the NAT (Network Address Translation) function to access the public network through the network of the host machine. That is to say, you can use the NAT mode to access the Internet in a virtual system. In Nat mode, the TCP/IP configuration information of the virtual system is provided by the DHCP server of the vmnet8 (NAT) Virtual Network and cannot be modified manually, therefore, the virtual system cannot communicate with other real hosts in the local area network. The biggest advantage of using the NAT mode is that it is very simple for the virtual system to access the Internet, without any other configuration, you only need the host to be able to access the Internet. In this case, the host can ping the virtual machine, and the virtual machine can also ping the host.

First, set the network mode of the virtual machine to Nat, VMWare ---> VM à setting ---> networkadapter


Set the IP address of vmnet8 and the gateway VMware ---> edit ---> virtualnetworkeditor


Select DHCP setting in the lower-right corner.


Set the RedHat IP address to automatic (DHCP ).


Then the VM can connect to the Internet.


3. hostonly

In host-only mode, the virtual network is a fully closed network, and the only access to the virtual network is the host. In fact, the host-only network is similar to the NAT network. The difference is that the host-only network does not have a NAT service, so the virtual network cannot connect to the Internet. The communication between the host and the virtual machine is achieved through the vmwarenetworkadeptervmnet1 virtual network card. If you want to connect the VM to the Internet, you need to connect the VM to the Internet and share the network.

First, set the network mode of the VM to host-only, VMWare ---> VM ---> setting ---> networkadapter


Then let the host share the network: local connection ---> share

 

At this time, the IP address of vmnet1 is automatically selected 192.168.137.1.


Set the RedHat IP address of the VM to be in the same CIDR block as vmnet1.


Now the virtual machine can communicate with the host and the Internet.

For example:



Summary

Both the shared connection mode and the NAT mode allow communication between virtual machines and hosts, virtual machines, and the Internet. The Nat mode is easy to set and allows simultaneous access to multiple physical NICs. The bridge mode can achieve communication between virtual machines and hosts, virtual machines and the Internet. If virtual machines are used as servers, this method is only feasible. However, an independent IP address is required for the VM. If the physical Nic is disconnected, the VM and the host cannot be connected. The host-only method only implements VM host communication, which is generally not used separately.

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.