Detailed explanation of VMware network settings to create a super Virtual Network (the most complex and comprehensive)

Source: Internet
Author: User
Tags switches

We know that vmware workstation provides many virtual devices. By using these devices, we can build a typical bridging network, host-only network, and Nat network, you can also build complex custom networks. This article aims to let everyone know and master the various network devices of VMware Workstation Virtual, and finally build a super custom network as shown in 1.

Super custom network

1. Recognize network devices

To establish a network, you need to use network adapters, switches, and other networking devices. Similarly, you also need to use these devices for networking in VMware Workstation, but in the virtual computer and network of VMware Workstation, these devices are also virtual in Form (but there is no major difference between them in terms of functionality and real network devices ). Next, let's take a look at what network devices vmware workstation has virtualized for us.

The ingress switch. Like a physical switch, a virtual switch connects hosts, virtual computers, and other network devices. After the VMware Workstation is installed, the switch will be automatically created and used by VMware Workstation according to the networking requirements. On Windows series hosts, you can use up to 10 Virtual Switches (2 ), however, on a Linux host, you can use up to 256 virtual switches. With the vswitch created by VMware Workstation, you can connect one or more virtual machines to the host or other virtual machines.

Up to 10 machines

Lightning bridge. When you use a "bridge" network between a host and a virtual machine, the "bridge" virtual device is automatically enabled, this device connects the Ethernet adapter in your virtual machine to the physical Ethernet adapter in the host to connect your virtual machine to the local area network (LAN) of the host ).

A virtual machine that uses the bridge function can be an additional "real" computer on the network where the host is located, and can have an IP address on the LAN where the host is located, all services on the network where the host is located, including printers, file services, gateways, and other services. Similarly, the host and any physical computer on the network where the host is located, all resources or services provided by other virtual machines can also be used.

⒊ Nat adapter. This device is automatically installed on your host when installing vmware workstation and displayed as "VMware network adapter vmnet8" (3) on the host ).

Automatically add Devices

This device provides communication interfaces for the host and other virtual machines that use the "Nat" network type. It also provides NAT (Network Address Translation), that is, network address translation. If your host is connected to an external network through another Ethernet Adapter, the device can convert the IP address of the virtual machine in the local network to the external network address of the host, allows virtual machines to access resources on the external network with the external network address of the host, including virtual machines that can use many standard TCP/IP protocols to connect to other machines on the external network.

For example, you can use HTTP to browse Web pages, use ftp to transfer files, and use Telnet to log on to other computers. (However, computers on the external network cannot establish active connections to virtual machines, which means you cannot use virtual machines in the NAT network as a web server to send web pages to computers on the external network.

⒋ Only supports host adapters. Only the host adapter is a standard virtual Ethernet Adapter, on the host operating system, it is automatically installed on the host when vmware workstation is installed and displayed as "VMware network adapter vmnet1" (4) on the host ), it only provides an interface for data exchange between a host and a virtual machine that uses the "only host" network type, therefore, the network established by the host and virtual machines using the "only host" network type is a typical private internal LAN.

Host adapter only

⒌ DHCP server. The DHCP (Dynamic Host Configuration Protocol) service is automatically installed on your host when vmware workstation is installed. It is an automatically started Service (5 ), it turns your host into a DHCP server and can automatically assign Dynamic IP addresses to virtual machines configured with "host only" and "Nat", compared to manually assigning static fixed IP addresses to virtual machines, it provides a simpler and more automated way to allocate IP addresses.

DHCP (Dynamic Host Configuration Protocol) Service

 

[Next Page]

The Ethernet adapter on the worker virtual machine. When you create a virtual machine using the new Virtual Machine wizard, VMWare Workstation will install an Ethernet adapter for the virtual machine that you create, regardless of the network type and operating system you use, this adapter is displayed as "amd pcnet PCI" (6) in the virtual machine operating system. After my test, most operating systems can identify this virtual hardware and install appropriate drivers for it, this adapter provides a communication interface between the host and the virtual machine, and between the virtual machine and the virtual machine.

Ethernet adapter on Virtual Machine

2. Build a custom network

Using the virtual network devices provided by VMware Workstation, we can build a more complex custom virtual network, which can be a complete remote connection on your host. At the same time, it can also be connected to one or more external physical networks, including the home network, small office network or instant.

It is very easy to create a custom virtual network on VMWare Workstation. You only need to add one or more virtual Ethernet adapters and switches to the virtual machine and select the corresponding network type, however, we recommend that you draw a network connection sketch before creating a complex custom virtual network. Figure 1 shows a custom network connection sketch. In the network shown in this figure, a Web server connects to instant through a firewall, an administrator's computer can connect to the Web server through a secondary firewall.

To set up this network, you must create four new virtual machines, and then use the "Virtual Machine Settings" dialog box to add virtual Ethernet adapters for them and select the network connection type for them. In addition, you also need to install appropriate operating system and application software in each virtual machine, and make appropriate network settings in each virtual machine.

Next, we will build this custom network step by step using the above network components provided by VMware workstation as shown in Figure 1.

⒈ Create four new virtual machines using the "new Virtual Machine wizard": the first virtual machine uses two virtual Ethernet adapters. when creating the virtual machine using the "new Virtual Machine wizard, select "use bridging network" (7) to add the first Ethernet Adapter directly to it.

New Virtual Machine

In this way, the virtual machine can be connected to instant using the host's physical adapter. For the other three virtual machines, select "do not use network connection" (8) in the "New Virtual Machine wizard ).

Select this option

 

⒉ Open the first virtual machine. Do not start it. On the "summary view" of VMware Workstation, click "Edit Virtual Machine Settings" to open the "Virtual Machine Settings" dialog box, in the dialog box, click Add to open the Add hardware wizard. As shown in 9, select "Ethernet Adapter ".

Add an Ethernet Adapter

Click "Next", select "Custom" single region, select "vmnet2" Switch (10) from the drop-down list, and finally, click "finish" and click "OK" in the "Virtual Machine Settings" dialog box to add a second Ethernet adapter for the first virtual machine.

Select a device

⒊ Open the second virtual machine. Do not start. Add an Ethernet adapter for the second virtual machine and connect it to the vswitch "vmnet2.

 

[Next Page]

⒋ Open the third virtual machine. Do not start. Add the first Ethernet adapter for the third Virtual Machine and connect it to the "vmnet2" switch as described above.

⒌ Open the third Virtual Machine. Do not start it. Add the second Ethernet adapter for the third Virtual Machine and connect it to the "vmnet3" switch as described above.

⒍ Open the fourth virtual machine. Do not start it. Add an Ethernet adapter to the fourth virtual machine and connect it to the vswitch "vmnet3" as described above.
  
After performing the above steps, we have completed the "physical" connection of the custom network. Next we will set the subnet and operating system support used by the switch for this network. First, determine the subnet address used for the vswitch vmnet2. On the menu bar of VMware Workstation, select the "Edit> Virtual Network Settings" command to open the "virtual network Editor" dialog box and switch to the "host network ing" tab, as shown in 11, click ">" next to vmnet2 to open the "subnet" dialog box (12), enter a class C address, such as "192.168.64.0", and click "OK ", in this way, we can manually assign an IP address to the VM connected to the vmnet2 switch in the subnet "192.168.64.0.

Set IP address and subnet mask

As mentioned above, VMWare Workstation has installed a DHCP service for the host. We can also add vmnet2 to the DHCP service list, let DHCP automatically assign a dynamic IP address in the subnet "192.168.64.0" to the virtual machine connected to the vmnet2 switch. In Figure 11, switch to the "DHCP" tab and click "add ", in the displayed dialog box, select "vmnet2" and click "OK" to return to the "DHCP" tab in the "virtual network Editor" dialog box. On this tab, click "application", as shown in Figure 13, vmnet2 and the subnet we previously set for vmnet2 are added to the DHCP service list.

Added

Assign a subnet to the vswitch vmnet3 in the same way, such as "192.168.65.0", and add it to the DHCP service list.

Then, open each virtual machine and install the operating system for the virtual machine.

Configure network support for the operating system of each virtual machine. We will first configure the first virtual machine. The first Ethernet adapter of the first virtual machine uses a "bridge" network type, and then installs a pppoe virtual dialing program (Windows XP comes with pppoe protocol, if your virtual machine is installed with this operating system, you can use no other pppoe virtual dialing program.

In addition, if you use a leased line to access the Internet, you do not need to use the pppoe virtual dialing program to dial.) If the Virtual Machine obtains its IP address from a DHCP server on the external network, keep the default setting and double-click the virtual dial-up to connect to the virtual machine to access the instant.

For the second virtual Ethernet adapter in the first virtual machine, manually specify an IP address in the subnet specified for vmnet2, or keep the default settings, let the DHCP service provided by VMware Workstation automatically assign a dynamic IP address in the vmnet2 subnet to it.

In the second virtual machine, manually assign an IP address to the subnet specified for vmnet2, or keep the default settings, let the DHCP service provided by VMware Workstation automatically assign a dynamic IP address in the vmnet2 subnet to it.

In the third virtual machine, two Ethernet adapters are connected to the vswitch vmnet2 and vmnet3. For each virtual Ethernet Adapter, We can manually assign them a fixed IP address in the specified subnet of the switch to which it is connected, you can also enable the DHCP service provided by VMware workstation to automatically assign Dynamic IP addresses to them in the specified subnet of the switches they connect.

Here is an example. If Windows 98 is installed on this virtual machine, after it is started, right-click the icon of the network neighbor on its desktop to open the "network" dialog box, as shown in figure 14, select the TCP/IP bound to the first Ethernet adapter, and click Properties to open the TCP/IP properties dialog box.

Protocol

As shown in Figure 15, select the "specify IP Address" single region and enter the IP addresses that can be manually allocated in the vmnet2 subnet in the "ip address" Column (for IP addresses in the same subnet, to prevent the same IP address from being assigned to two or more virtual machines, VMWare Workstation requires that the IP addresses manually assigned and automatically assigned use different parts of the subnet) an IP address, such as "192.168.64.5 ", enter "255.255.255.0" for the subnet mask, and click "OK ".

Specified IP Address

In this way, the IP address of the first Ethernet adapter is "192.168.64.5. Next, select the TCP/IP bound to the second Ethernet adapter in the "network" dialog box, and click "properties" to open the "TCP/IP properties" dialog box for the second Ethernet adapter, still select the "specify IP Address" single region. In the "ip address" column, enter an IP address that can be manually allocated in the vmnet3 subnet, for example, "192.168.65.8". Click "OK, we have specified an IP address for both the two Ethernet adapters on the third virtual machine.

If you think it is troublesome to allocate IP addresses like this, when setting the IP addresses of the two Ethernet adapters, in the "TCP/IP properties" dialog box of the TCP/IP IP address they are bound to, select "automatically obtain IP Address, the DHCP service provided by VMware Workstation can automatically assign IP addresses for the two Ethernet adapters in the respective subnets of vmnet2 and vmnet3.

In the fourth virtual machine, manually assign an IP address to the subnet specified for vmnet3, or keep the default settings, let the DHCP service provided by VMware Workstation automatically assign a dynamic IP address in the vmnet3 subnet to it.

After the above steps, the creation of the custom virtual network is basically complete. The next step is to install the required application software for each virtual machine.

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.