VMware Virtual machine configuration IP

Source: Internet
Author: User

VMware provides us with three network operating modes: bridged (bridge mode), NAT (network address translation mode), Host-only (host mode only).

If you open a VMware virtual machine, we can see VMnet0 (bridge mode), VMnet1 (host mode only), VMnet8 (NAT mode) in the Virtual network editor under Edit in the options bar, so what's the effect? In fact, the VMnet0 we see now represents a virtual switch for bridging mode, VMNET1 represents a virtual switch for host-only mode, and VMnet8 represents a virtual switch for NAT mode.

At the same time, there are VMware network Adapter VMnet1 and VMware network Adapter VMnet8 two virtual network cards on the host, which are used for host-only mode and NAT mode respectively. In "Network connection" We can see these two virtual network cards, if you uninstall the two pieces, you can in the VMware "edit" under the "Virtual Network Editor" click on "Restore the default settings", you can re-restore the virtual network card.

One, bridged (bridging mode) What is bridging mode? Bridging mode is the use of virtual Bridge to communicate the host network card and virtual machine virtual network card. In the role of bridging, similar to the physical host virtual as a switch, all the bridge settings of the virtual machine connected to the switch on an interface, the physical host is also inserted in the switch, so all the bridge network cards and network cards are switched mode, mutual access without interference. In bridging mode, the virtual machine IP address needs to be in the same network segment as the host, and if networking is required, the gateway and DNS need to be consistent with the host NIC。 Its network structure is as follows:
Next, we'll do the actual operation, how to set the bridging mode. First, after installing the system, click "Edit Virtual machine settings" To set the network card mode before turning on the system. Click "Network Adapter", select "Bridge Mode", and then "OK" before entering the system, we first confirm the host's IP address, gateway, DNS and other information. Then, enter the system to edit the network card configuration file, the command for Vi/etc/sysconfig/network-scripts/ifcfg-eth0 to add the following: Where to change the place has onboot to Yes, which means boot start NIC, Bootproto changed from DHCP to static, to add ipaddr NETMASK GATEWAY DNSedit complete, save exit, and then restart the virtual machine nic, ping the extranet IP using the ping command, and test whether the Network Service network restart
NAT (address translation mode)If your network IP resources are scarce, but you want your virtual machines to be networked, Nat mode is the best option. Nat mode enables virtual machines to be networked with virtual NAT devices and virtual DHCP servers. The network structure is as follows: In NAT mode, the host network card is connected directly to the virtual NAT device, and then the virtual NAT device is connected to the virtual DHCP server on the VMNET8, which realizes the virtual machine networking. Then we will find it very strange, why do we need virtual network card vmware network Adapter VMnet8? Our VMware network Adapter VMNET8 virtual network card is primarily designed to enable communication between the host and the virtual machine.    We can verify this later in the setup steps. First, set the options for NAT mode in the virtual machine, open VMware, and click on "Edit" under "Virtual Network Editor" to set NAT parameters and DHCP parameters. Change the network connection mode of the virtual machine to NAT mode and click "Edit Virtual machine settings". Click "Network Adapter", select "Nat mode" and then boot the system, edit the network card configuration file, the command for Vi/etc/sysconfig/network-scripts/ifcfg-eth0 where to change has onboot changed to Yes, This means that the boot network adapter, Bootproto from DHCP to static, to add ipaddr NETMASK GATEWAY DNS editing complete, save exit, and then restart the virtual machine NIC, dynamically obtain an IP address, ping the external IP using the ping command, Testing can be networked.

VMware Virtual machine configuration IP

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.