Virtual network for Hyper-V - Part 5

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 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

May be interested

  • How to export Hyper-V virtual machines in Windows 10How to export Hyper-V virtual machines in Windows 10
    you can use hyper-v export and import functions to quickly copy virtual machines. virtual machines that are accessed can be used for backup or as a way to migrate a virtual machine between hyper-v servers.
  • Instructions for using Hyper-V on Windows 8 (Part 1)Instructions for using Hyper-V on Windows 8 (Part 1)
    one of the new features on windows that is most noticeable is the hyper-v virtualization program to meet users' need to create windows virtual machines. the article will guide readers to activate and use the program on windows 8.
  • How to check if your computer is running Windows 10 Hyper-V?How to check if your computer is running Windows 10 Hyper-V?
    on windows 10, windows 8.1 and windows 8 have added client hyper-v so you can run the guest operating system on the virtual machine. hyper-v is microsoft's hypervisor on windows. it was originally developed for windows server 2008 and then supported by the windows client operating system.
  • Monitor Hyper-V with the command line (Part 2): Basic monitoring commandsMonitor Hyper-V with the command line (Part 2): Basic monitoring commands
    in this article, we will learn how to access the virtual machine list and see general information about virtual machines with simple powershell statements. we will also look at stop commands and start virtual machines from the command window.
  • Create private cloud with Hyper-V (Part 3)Create private cloud with Hyper-V (Part 3)
    in the previous lesson, we created the hyper-v task sequence. now is the time to make this task sequence change so that we can use them to create hyper-v servers that manage virtual machines in the private cloud.
  • Create virtual machines in Hyper-V on Windows Server 2008Create virtual machines in Hyper-V on Windows Server 2008
    after hyper-v is installed, the first thing to do here is to create a virtual machine - virtual machine. in the following article, we will introduce you to some basic steps to do this, with the general implementation process almost just clicking next> next> finish.
  • Monitor Hyper-V with the command line (Part 1): Install the monitoring libraryMonitor Hyper-V with the command line (Part 1): Install the monitoring library
    one of the obvious shortcomings of hyper-v is the ability to monitor virtual machines from windows powershell. although microsoft intends to provide this capability on windows server 8, users can fully monitor virtual machines from the command line interface at this time. the article will guide you to do this
  • Instructions for installing Hyper-VInstructions for installing Hyper-V
    to install hyper-v, open the server manager tool and click the add roles link. next, in the select server roles dialog box, click on the hyper-v role. at this point, follow the step-by-step instructions to install hyper-v on the server.
  • Configure Hyper-V security using Authorization Manager - Part 2Configure Hyper-V security using Authorization Manager - Part 2
    in this article, i will show you how to secure virtual machines when running on hyper-v.
  • Create virtual cloud with Hyper-V (Part 6)Create virtual cloud with Hyper-V (Part 6)
    in the previous articles, we have created some image files for the virtual machine and also successfully installed scvmm but still have a missing piece. at this time, users do not have an interface to build the virtual machine so we will need to set up self service portal to allow valid users to create virtual machines configured.