Virtual network for Hyper-V - Part 5

In this section, we will continue the discussion by connecting virtual networks in Hyper-V by introducing the concept of Virtual LANs (VLANs).

In this section, I will continue the discussion by connecting to virtual networking in Hyper-V by introducing the concept of Virtual LANs (VLANs).

So far, our series has focused on the interaction between physical and virtual networks used by Hyper-V. That's why in this year, we will focus on another aspect of virtual networking - VLAN.

Although VLANs have been around for a while, they are still one of the network concepts that many administrators still don't understand. There is really no difficulty in setting up a VLAN, but the problem lies in the fact that they are not used. One way that many network administrators know about VLANs is when they participate in learning about network administration certificates.

Although VLANs are only an option in the physical network world, they are really important in virtual data centers using Hyper-V. Before explaining why, we want to give you some background knowledge about VLANs.

What is VLAN?

You can understand simple VLAN (or Virtual LAN) which is a group of network hosts working together as if they are sharing a common network segment although in reality the hosts are physically connected to other network segments. together. In other words, the physical location of a node becomes unimportant if the node is connected to the VLAN.

This is an example we encountered in an organization that used VLANs in their physical data centers. The nature of the organization's work will make network topology change constantly, in other words they need to move physical servers whenever there is a change in the network topology. During implementation, the organization created and used a variety of VLANs. By doing so, they can configure a server to another network segment without physically moving the server and not having to run the cable again. As a result, VLANs allow the network to be reconstructed quickly without much effort than in the case of physically moving servers.

So what is all the work to do with Hyper-V here? Did you know, in Windows Server 2008 R2, Microsoft introduced a new Hyper-V feature called Live Migration, a feature that allows users to migrate a virtual machine running from a Hyper-V host. Go to another host without stopping the job.

Virtual network for Hyper-V - Part 5 Picture 1Virtual network for Hyper-V - Part 5 Picture 1

In this article we do not want to mention in depth the use of Live Migration but just tell you that the migration process requires copying the entire contents of the virtual machine memory from one host server to the host server. other.

The problem is that, after the virtual machine migration process is complete, the virtual machine will forget the fact that it is currently running on another configuration server and still maintain the previous configuration. With that in mind, imagine what would happen if you migrated a virtual machine to another host on a completely different subnet. The virtual machine will maintain its original IP address, but it will not be able to communicate with the network because the virtual machine's IP address will not be valid for the subnet to which the new host server is physically connected.

That's why VLANs are such an important concept for Hyper-V. Placing each virtual machine into a common VLAN will ensure that the virtual machine can communicate with the network, even when it is moved to another host. However, you should note that using VLANs is not necessary unless your host servers are in a multiple site cluster and use Cluster Shared Volume. Here we will put all our virtual machine fish into a common VLAN and see the problems that arise when developing the network.

How VLAN works

We've explained what VLANs do above and why they are so important to Hyper-V, so we'll show you how to work with VLANs.

The first thing you need to know about understanding VLANs is that they are implemented via software so your underlying network hardware must be compatible with VLANs. This means that any server will be connected to a VLAN segment (including host servers and non-virtualized servers) that must be equipped with network cards that support VLANs. It should be noted that some network cards only provide partial support for VLANs. So make sure that the network card you use must provide full support for VLANs.

The next concept you need to know is VLAN ID. VLAN ID is a number (integer) used to distinguish a VLAN segment. Each node participating in a VLAN is assigned a VLAN ID. Shared nodes of the same VLAN ID will also share the same VLAN segment. If you use VLANs within a virtual data center, you must configure VLAN IDs on both physical ports and virtual network ports. Otherwise virtual networks can be isolated from the physical network.

Finally, you need to know there are two different VLAN modes: access mode and trunk mode . Access mode is used when all virtual machines on a host share the same VLAN ID, and when the VLAN ID is used by the physical network adapter and the physical network switch. When using access mode, you need to create a separate VLAN to connect the physical network to the virtual network.

Trunk mode is used when you need to configure virtual machines residing on a host to separate VLANs. In this situation, the physical network adapter is set to trunk mode. This allows a network adapter to share multiple VLAN IDs.

In the real world, people use less mode mode than access mode. There are two reasons for this. First, trunk mode is required only if separate VLANs need access to the physical network. If you create a VLAN only to connect a virtual network but do not require an external connection, trunk mode is not needed.

Another reason why we rarely use trunk mode is because most host servers are equipped with multiple physical network adapters. If multiple VLANs are needed, we can isolate network traffic based on its VLAN ID. Obviously, there is no problem in using trunk mode if the situation needs it. However, we still like to use access mode if possible because this mode is quite simple.

Conclude

In this section, I have explained why VLAN is so important to Hyper-V and how VLAN works, plus the difference between trunk mode and access mode. In the last part (Part 6) of this series, we will show you the process of configuring virtual machines to use a VLAN.

3.5 ★ | 2 Vote