VMware Virtual Machine Network configuration

Source: Internet
Author: User
Tags virtual environment

VMware virtual machines have three network modes, namely bridged (bridge mode), NAT (network address translation mode), Host-only (host mode).

1, bridged (bridge mode)

In this mode, VMware virtual operating system is like a separate host in the LAN, it can access any machine in the network, you need to manually configure the virtual system IP address, subnet mask, but also with the host machine in the same network segment, so that the virtual system to communicate with the host machine, The relationship between a virtual system and a host machine is like two computers connected to the same hub. Understanding the network technology is equivalent to adding a virtual switch on the front end of the host, and then sharing the switch with the host and all virtual machines. If you want to use VMware to create a new virtual server within the LAN, to provide network services for LAN users, you should choose bridging mode.

2. NAT (network address translation mode)

Using NAT mode, the virtual system uses the NAT function to access the public network through the host's network. In this mode, the host becomes a dual-NIC host, while participating in the existing host LAN and the new virtual local area network, but because of the addition of a virtual NAT server, the virtual local area network in the virtual machine in the external access, the use of the host's IP address, so from the external network, can only see the host, The newly created virtual local area network is completely invisible.


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 the host machine can access the Internet.


If you want to use VMware to install a new virtual system, you can directly access the Internet without any manual configuration in the virtual system, it is recommended that you use NAT mode.

3, host-only (host mode)

In some special network debugging environment, it is required to isolate the real environment and the virtual environment, then you can adopt the Host-only mode, in which all virtual machines on the host can communicate with each other, but the virtual machine and the real network are isolated.

In this mode, a new network composed of all virtual machines and hosts, but the LAN and the host itself in the existing LAN is independent of each other, if no additional routing settings, the two LAN is not connected, so the new LAN can be considered as a separate from the current host private network, Its members are the current host and all associated virtual machines.

From the network technology is equivalent to the host to add a virtual network card, so that the host becomes a dual-NIC host (Host network card + virtual network card). At the same time, a virtual switch is added to the host backend to allow the host and all virtual machines to become another virtual LAN. Because of the dual network card, host can participate in two LAN (existing host LAN + new virtual local area network), but by default, two LAN is not connected.

If you want to use VMware to create a virtual system that is isolated from other machines in the network, you can choose Host-only mode for some special network debugging work.

And

The first: Now I just want to get the virtual machine to connect to the network as soon as possible, select NAT, but this way the virtual machine may assign itself an IP that is not on the same network segment as the host, causing the host to not ping the virtual machine.

650) this.width=650; "src=" Https://s1.51cto.com/oss/201711/09/1c13d4c92635f0c810fd1f35fd38a099.png "title=" 5.png " alt= "1c13d4c92635f0c810fd1f35fd38a099.png"/>

The second type: Select Custom 650) this.width=650; "Src=" Https://s1.51cto.com/oss/201711/09/5b25fe33d6abe41aa273e45e641c48c5.png " Title= "6.png" alt= "5b25fe33d6abe41aa273e45e641c48c5.png"/>

and modify the/etc/sysconfig/network-scripts/ifconfig-eth0 configuration option Onboot=yes, and then enter the command: Service network Restart restart the network, The virtual machine generates the IP address of the same network segment as the host, and can ping each other.

650) this.width=650; "src=" Https://s2.51cto.com/oss/201711/09/9d501ce793104cc7bff8f1f45d9b611e.png "title=" 7.png " alt= "9d501ce793104cc7bff8f1f45d9b611e.png"/>

BOOTPROTO=DHCP is a dynamically assigned IP, which, if you want to configure as static address, can be changed into static. Plus configuration options such as Ipaddr,newmask,gateway.ipaddrto be with the hostIPin the same network segment, netmask andGATEWAYThe default is to be consistent with the host.


Each parameter has the following meanings:

DEVICE is the NIC name

Bootprotois obtained.IPaddress Type,Staticand theNoneas a static address,DHCPfor dynamic acquisitionIPAddress

hwaddr is mac address

mtu is the maximum transmission unit

nm_controlled whether to enable networkmanager graphical interface Configuration tool

onboot Set whether the NIC is in linux When the system is activated at startup, this item is generally set to yes

ipaddr is native ip address

netmask is the subnet mask

gateway is to set the gateway's

dns 1 is the preferred DNS server

DNS2 when a secondary DNS server

There are also a few parameters that are generally not configured:

Broadcast It's a broadcast address .

NETWORK is the subnet address


VMware Virtual Machine Network configuration

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.