Windows 11 Pro ‐ VLAN Tagging - KirbyLV/D3-Propellerhead-Wiki GitHub Wiki
Requirements
We will be setting up virtual interfaces using Hyper-V. Essentially, in order to use Hyper-V, you need Windows 11 Pro. Home version WILL NOT allow for Hyper-V and VLAN tagging. This Page has a detailed list of the system requirements for Hyper-V.
Things you will need:
- Internet connection to download and update Hyper-V Manager
- Managed switch creating the VLAN tags needed
- Network Connection to that managed switch
- The Windows name of the network interface you are using
Enable and Install Hyper-V
As long as you meet the requirements, navigate to "Turn Windows features on or off". You can just search this in the start menu. Scroll down to check the box next to "Hyper-V" and click OK. Ensure you are connected to the internet and let your computer reboot when prompted. After the reboot, give it a minute, and then open the new application "Hyper-V Manager" from the start menu.
Build your Virtual Switch
Think of this as creating a virtual switch that all of your VLAN tagged connections will be made to inside your computer, and this is just the trunk port running to the physical switch.
Within the Hyper-V Manager, click on your computer in the left column, and select "Virtual Switch Manager" on the right. In the new window, the list on the left should list "default switch" and any other virtual switches you may be using. There will be an option for creating a new virtual network switch at the top of this list.
Select "New Virtual Network Switch" and select "External" as the switch type. Click Create Virtual Switch.
Name your new switch, select external network, and bind it to the physical port you will be using for connection to the managed network switch. Select "Allow management operating sy7stem to share this network adapter". Do NOT select "Enable VLAN ID". VLAN tag creation will be done in the next step.
Another option instead of the above is to open Powershell Elevated (as administrator) and run the following code, replacing SWITCH NAME HERE
and ETHERNET
with the name of the new virtual switch, and the name of the network adapter being used:
New-VMSwitch -Name "SWITCH NAME HERE" -NetAdapterName "ETHERNET" -AllowManagementOS $true
Create VLAN tagged virtual NICs
The next step is to create our virtual "tagged" ports, and assign the VLAN tags to each. This must be done in Powershell Elevated. Use the following code:
Add-VMNetworkAdapter -ManagementOS -Name "VLAN 24" -SwitchName "SWITCH NAME HERE"
Set-VMNetworkAdapterVlan -VMNetworkAdapterName "VLAN 24" -vlanid 24 -Access -ManagementOS
Replace the network adapter names and VLAN ID's with appropriate names and VLAN tags for your use case. Repeat this step for each VLAN tag you wish to create. When done, each of these VLAN-tagged virtual network ports will be visible in the normal network control panel where you assign IPs to all network interfaces.
Enjoy!