Hyper-V: Configure VLAN Trunk on Kemp LoadMaster

One of the Load Balancers that we have in our lab is LoadMaster from Kemp Technologies. We already published an article on how to deploy it:

UC Lobby: Deploying Kemp Technologies Free LoadMaster as Lab Load Balancer/Reverse Proxy
http://blogs.technet.com/b/uclobby/archive/2015/03/12/deploying-kemp-technologies-free-loadmaster-as-lab-load-balancer-reverse-proxy.aspx

Why do we need to enable VLAN Trunk? The reason for this is that our lab “router” reached the maximum number of Virtual network adapters that we can add in Hyper-V (8 network adapters + 4 legacy network adapters):

Hyper-V scalability in Windows Server 2012 and Windows Server 2012 R2
https://technet.microsoft.com/en-us/library/jj680093.aspx

By enabling VLAN Trunk on the Network Adapter we can bypass that limitation.

In this post, we show you how to enable VLAN Trunk in Hyper-V and configure Kemp LoadMaster. Note that the steps in Hyper-V can also be used for other types of Virtual Machines.

To change the adapter mode to Trunk we need to use PowerShell on the Physical Host. The Network Adapters associated to a Virtual Machine can be listed by running:

Get-VMNetworkAdapter -VMname “LB01” | Select VMName, SwitchName | ft -AutoSize
https://technet.microsoft.com/en-us/library/hh848526(v=wps.630).aspx

So, we know that we want to change the mode to Trunk on the Network Adapter connected to “Gears”. Also, we specifically want to leave VLAN 0 as default and enable two VLANs in the Trunk:

Get-VMNetworkAdapter -VMname “LB01” | ?{$_.switchname -eq “Gears”} | Set-VMNetworkAdapterVlan -Trunk -NativeVlanId 0 -AllowedVlanIdList “1301,1302”


Note: The Default VLAN will be automatically added to the allowed list.

Set-VMNetworkAdapterVlan
https://technet.microsoft.com/en-us/library/hh848475(v=wps.630).aspx

Now that we have enabled VLAN Trunk, the next step takes us to the Kemp LoadMaster Web Management interface. In System Configuration > Network Setup > Interfaces > eth1 — this being the interface in which we want to configure the different VLANs —, we need to click on VLAN Configuration:

In the next screen, we specify the VLAN ID:

After adding the VLAN, a new drop-down list will be added to System Configuration > Interfaces:

By selecting the VLAN we can configure the IP address:

We can now ping the above-mentioned interface:

Finally, the Virtual Services status will show as “Up”: