How to Set Up VLAN Support on Windows Server 2016
Virtual Local Area Networks (VLANs) allow you to segment a physical network into multiple isolated logical networks. On Windows Server 2016, VLAN support is available through the built-in NIC teaming interface, the Hyper-V virtual switch, and directly on physical adapters using vendor-supplied drivers. Proper VLAN configuration improves security by isolating traffic between departments, helps with network management, and enables efficient use of trunk ports on managed switches. This guide covers the key methods for configuring VLANs on a Windows Server 2016 host.
Before starting, ensure your physical network adapters have up-to-date drivers that support 802.1Q VLAN tagging, and that the switch port connecting your server is configured as a trunk port carrying the VLANs you intend to use. VLAN tagging adds a four-byte tag to Ethernet frames to identify which VLAN they belong to. The switch and server must agree on which VLANs are allowed and how frames are tagged.
VLAN Support via NIC Teaming
The most reliable way to configure VLANs on Windows Server 2016 without Hyper-V is through a NIC team. Even a single-adapter “team” can be used purely as a VLAN tagging mechanism. First, create a NIC team if one does not exist:
New-NetLbfoTeam -Name "TeamTrunk" -TeamMembers "Ethernet" -TeamingMode SwitchIndependent -LoadBalancingAlgorithm Dynamic
Add VLAN interfaces to the team. Each VLAN NIC interface will appear as a separate adapter in the operating system:
Add-NetLbfoTeamNic -Team "TeamTrunk" -VlanID 10
Add-NetLbfoTeamNic -Team "TeamTrunk" -VlanID 20
Add-NetLbfoTeamNic -Team "TeamTrunk" -VlanID 30
Verify the VLAN NIC interfaces were created:
Get-NetLbfoTeamNic -Team "TeamTrunk"
Assign IP addresses to each VLAN interface. The interface names follow the pattern TeamName – VlanID:
New-NetIPAddress -InterfaceAlias "TeamTrunk - VLAN 10" -IPAddress 10.10.10.5 -PrefixLength 24 -DefaultGateway 10.10.10.1
New-NetIPAddress -InterfaceAlias "TeamTrunk - VLAN 20" -IPAddress 10.20.20.5 -PrefixLength 24
VLAN Configuration on Hyper-V Virtual Switch
When Windows Server 2016 is running the Hyper-V role, VLAN assignment is typically handled at the virtual switch adapter level. To assign a VLAN to a virtual machine’s network adapter:
Set-VMNetworkAdapterVlan -VMName "WebServer01" -Access -VlanId 10
To set VLAN on the management OS adapter of a virtual switch:
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Management" -Access -VlanId 10
Configure trunk mode on a VM adapter to allow it to receive multiple tagged VLANs (useful for VMs that act as routers or firewalls):
Set-VMNetworkAdapterVlan -VMName "RouterVM" -Trunk -AllowedVlanIdList "10,20,30" -NativeVlanId 1
View current VLAN settings for all VM adapters:
Get-VMNetworkAdapterVlan
Configuring VLANs Directly on Physical Adapters
Some network adapter vendors (Intel, Broadcom, Mellanox) provide advanced driver properties that allow VLAN tagging directly on a physical adapter without teaming. This is configured through adapter properties in Device Manager or via PowerShell using Set-NetAdapterAdvancedProperty. The property name varies by vendor. For Intel adapters it is often called VLAN ID:
Set-NetAdapterAdvancedProperty -Name "Ethernet" -DisplayName "VLAN ID" -DisplayValue "10"
Check current advanced properties for an adapter:
Get-NetAdapterAdvancedProperty -Name "Ethernet"
Verifying VLAN Connectivity
After configuring VLANs, verify each interface has the correct IP address:
Get-NetIPAddress | Where-Object {$_.InterfaceAlias -like "*VLAN*"} | Select-Object InterfaceAlias,IPAddress,PrefixLength
Test connectivity from a VLAN interface to its default gateway:
Test-NetConnection -ComputerName 10.10.10.1 -InformationLevel Detailed
Use ping with a specific source address to test VLAN routing:
ping 10.20.20.1 -S 10.10.10.5
VLAN Isolation and Security Considerations
VLANs provide logical isolation, but they are not a substitute for firewalls between sensitive segments. Always implement ACLs or firewall rules at the routing boundary between VLANs to control inter-VLAN traffic. On Windows Server, you can use Windows Firewall with Advanced Security rules tied to specific interfaces, or deploy a dedicated firewall appliance or virtual firewall VM to control routing between VLAN segments.
Ensure that native/untagged VLAN traffic is handled correctly. Misconfigured native VLANs can lead to VLAN hopping attacks where traffic from one VLAN leaks into another. Use an unused VLAN ID as the native VLAN on trunk ports rather than the default VLAN 1, and disable unused switch ports. Regularly audit VLAN configurations across both the server and switch to ensure consistency and prevent accidental exposure of management VLANs to production traffic.