Hyper-V VLANs

In Hyper-V, you can set a VLAN ID on an adaptor in the GUI, but if you want to have traffic from multiple VLANs get to the NIC, you will need to use PowerShell to configure this.

To view hyper-v network adapter vlan settings

Get-VMNetworkAdapterVlan -VMName VM1 | Format-List

To configure a virtual adaptor in trunk mode

Set-VMNetworkAdapterVlan -VMName VM1 -AllowedVlanList 20-30 -NativeVlanId 10 -Trunk

This would give the adaptor access to VLAN 10,20,30 and ignore all other traffic.

Leave a Reply

Your email address will not be published. Required fields are marked *