Multiple VLAN’s using Windows 10/11 Onboard Tools

Multiple VLAN’s using Windows 10/11 Onboard Tools

As Intel recently deprecated their ProSet tool for Windows 11, I had to find a solution to continue operating some computers which have to connect to multiple VLAN interfaces.

Right now those computers use a single NIC, connecting to a switch which has enabled VLAN tagging. Unfortunately (of fortunately?) most of our computers are currently running a realtek NIC. VLANs are currently configured using their Diagnostic Utility.

Fortunately (or in this case unfortunately?) our latest generation of hardware now comes with an Intel network chip. This change was pushing me into this new issue: How do I configure multiple VLANS under Windows 11 on an Intel NIC?

The Issue

Intel used to have a quite easy configuration for multiple VLANs in their advanced driver settings but as I already noted: The ProSet tool including the advanced driver functions has been discontinued by Intel.
So now, I had to find a new way to solve that demand.

On Linux you can create virtual nics easily as the VLAN function is built into the network stack of the linux kernel but I knew that windows was not able to do similar – and I was wrong-ish.

Examining the advanced tab of my NIC, I’ve seen that setting a single VLAN ID is not hard, it can be done in advanced properties of the NIC or using powershell. In our case, as we need to operate on multiple VLANs things are different. There is no option to add a virtual NIC so I started tinkering.

The solution is Hyper-V

So after some research I found out, that Hyper-V is VLAN aware and you can use their network stack without installing and running the full hypervisor. Additionally you can create multiple virtual Host-NICs attached to a VLAN aware Hyper-V-Switch.

Sounds like Rocket science? It is actually quite straight-forward but you need to configure that using powershell.

Step 1: Installing the Windows components

In the windows feature installation dialog, we have to install the two components called “Hyper-V-Services” and “Hyper-V-Module for Windows powershell”

After the setup is done, you have to reboot the computer.

Step 2: Setting up the vSwitch

Hyper-V automatically creates a “Default vSwitch” that you can not delete and unfortunately it is not VLAN-Aware. We will have to keep this one as it is and go ahead creating a second vSwitch. For this, we need to open up powershell as an administrator and enter the following commands.

Your host will lose it’s network connection – Do not do that remotely or with apps running.

# This will return a list of network adapters, find your physical NIC and note its "Name" - In most cases "Ethernet"
Get-NetAdapter

# This creates a new vSwitch named VLAN-vSwitch and bridging our physical NIC called "Ethernet". Also we allow to add virtual Host-NICs to this switch.
New-VMSwitch -name VLAN-vSwitch -NetAdapterName Ethernet -AllowManagementOS $true

# Hyper-V automatically creates a virtual NIC without a VLAN tag to keep the host online - Remove it, except you are using a Untagged/Tagged combination.
Remove-VMNetworkAdapter -ManagementOS -Name VLAN-vSwitch

We do now have a clean new VLAN-Aware vSwitch

Step 3: Setting up VLAN interfaces

# Now we create a new virtual Host-NIC and assign a VLAN tag 123 to it. Please note, that the interface name can be chosen freely. One might want to name them by purpose.
Add-VMNetworkAdapter -ManagementOS -Name "VLAN123" -SwitchName "VLAN-vSwitch" -Passthru | Set-VMNetworkAdapterVlan -Access -VlanId 123

# You can now add as many virtual NICs as you need
Add-VMNetworkAdapter -ManagementOS -Name "VLAN456" -SwitchName "VLAN-vSwitch" -Passthru | Set-VMNetworkAdapterVlan -Access -VlanId 456

# Finally, verify that all adapter are in place
Get-NetAdapter

Done

Thats all you need to do. You do noe have replicated the VLAN feature of Realtek Diagnostic Utility or Intel ProSet with windows “onboard-tools” and this solution should be compatible with any available NIC.

What do you think? Is this a clean solution or do you still preferr using other tools, if so – which?

Title Photo by Taylor Vick on Unsplash