Connecting to the Ethernet
On the System Customization screen, select Configure Management Network. On the Configure Management Network screen, select Network Adapters. The physical ports on the MZ520 are displayed.
On the Network Adapters screen, select the four vmnics, which map to the four physical ports on the MZ520 respectively, and specify a vmnic for connecting to the management network, as shown in Figure 5-3. In Figure 5-3, [X] indicates that the two vmnics can all be used to connect to the management network. The hypervisor (ESXi) chooses a vmnic as the default management network port for connecting to the management network. The management network port is changeable. Press Enter to confirm the settings, and return to the Configure Management Network screen.
The management network refers to the PC running the vSphere Client. Actually, the vmnic is also used to connect to the service network.
On the Configure Management Network screen, select IPv4 Configuration and press Enter to go to the IPv4 Configuration screen, as shown in Figure 5-4. The IP addresses are assigned to the default vmnics first, for example, vmnic 0 and vmnic 1. The IP addresses must be on the same network segment as the IP address of the NIC on the PC so that ESXi can communicate with the vSphere Client. Press Enter to confirm the settings, and return to the Configure Management Network screen.
VLAN (Optional) on the Configure Management Network screen is an optional parameter. Configure a VLAN for the vmnic, which is to assign a PVID to the MZ520 port. You do not need to configure a VLAN for the management network connection.
Run the vSphere Client, click the Configuration tab, click Network, and then click Properties. The vSwitch0 Properties window is displayed. Click Add to create a virtual port group, select VM, and specify the group name in Network Label.
Because you have selected vmnic 0 and vmnic 1 on the Network Adapters screen in ESXi, the VM Network2 virtual port group created in #EN-US_TOPIC_0054117395/ref477884056 can be associated with the two ports.
A virtual port group is used for the service network. You can specify a VLAN ID for a virtual port group. The VLAN ID can be 0 (no VLAN), 4095 (all VLANs), or an integer from 1 to 4094. The value 0 indicates the EST mode, that is, the virtual port group is untagged, and the peer device (generally a switch) sets the VLAN ID. The value 4095 indicates the VGT mode, which enables the virtual port group to allow packets with any VLAN ID to pass through, similar to a switch trunk port. You must configure VLANs for the VM OS. The virtual port group does not process the VLAN tags of packets but transparently transmits the packets. An integer from 1 to 4094 indicates the VST mode. A PVID is set for the virtual port group, and the PVID is automatically added to untagged packets before the packets are forwarded to the external network. If the virtual port group receives packets with the VLAN tag that is the same as the PVID, it removes the VLAN tag and then forwards the packets to the destination VM. In this example no VLAN is configured.
Create a VM on the vSphere Client, and add the VMs to a virtual port group. This is to allocate network ports to the VM. After the configuration is complete, you can view the VMs of each virtual port group in the network configuration window, as shown in Figure 5-6.
NIC ports vmnic0 and vmnic1 are shared by all virtual port groups.
Install an OS on the VM, and set an IP address for each NIC port in the OS. Then the VM can communicate with the external network. The NIC ports detected by the VM OS are the NIC ports associated with the virtual port group of the VM. In this section, the NIC ports are vmnic0 and vmnic1. The following describes how to install RHEL 6.6 on VM_2.
After installing RHEL 6.6 on VM_2, you can see one NIC port, namely, eth0, which maps to vmnic 0 or vmnic 1, as shown in Figure 5-7. This is because only vmnic 0 or vmnic 1 is connected. The other port is disconnected and the VM is unavailable. Set an IP address for eth0. Ensure that the IP address is on the same network segment as the management network. Then, VM_2 can communicate with the ESXi management network port and the PC running the vSphere Client, as shown in Figure 5-8.
The MAC addresses of the NIC ports in the VM OS are generated by VMware, and are not the MAC addresses of vmnic 0 and vmnic 1.
Install RHEL 6.5 on VM_1, and set IP addresses for the NIC ports. Then VM_1 can communicate with the ESXi management network port and the PC running the vSphere Client, and VM_1 and VM_2 in the same virtual port group VM Network can communicate with each other, as shown in Figure 5-9.
Select Edit Settings for VM_1, select Network adapter 1, and set Network label to VM Network 2. After the settings, VM_1 belongs to the virtual port group VM Network 2, as shown in Figure 5-10. VM_1 can still communicate with the management network and VM_2, as shown in Figure 5-11.