How to enable 2 VLAN's in one physical port Hyper-V Dual VLAN Configuration on a Single NIC
This guide outlines how to configure a Microsoft Hyper-V Virtual Switch to carry multiple VLANs over a single physical network interface card (NIC). This setup isolates Host Management traffic from Virtual Machine traffic while utilizing the same physical cabling. ๐ Architecture Overview
By using a single physical NIC as a "trunk" port, we create a logical separation of traffic: Component Network Type VLAN ID Interface Type Host/Management OS Management 1 Virtual Ethernet (vEthernet) Virtual Machines Production/VM 2 Virtual Network Adapter ๐ Configuration Steps
-
Create the External Virtual Switch
Open Hyper-V Manager.
Select Virtual Switch Manager from the right-hand Actions pane.
Choose External and click Create Virtual Switch.
Select your Physical Network Adapter from the drop-down.
Crucial: Check the box: "Allow management operating system to share this network adapter."
-
Configure Host Management VLAN
Within the same Virtual Switch settings, check Enable virtual LAN identification for management operating system.
Enter 1 in the VLAN ID field.
Click Apply.
Note: You may briefly lose connectivity while the virtual bridge is created. -
Assign Host IP Address
Open Network Connections on the physical host (ncpa.cpl).
You will see a new adapter named vEthernet (Switch Name).
Right-click the new vEthernet adapter โ Properties โ IPv4.
Assign the Static IP address designated for your Management network.
-
Configure Virtual Machine VLANs
Right-click a Virtual Machine โ Settings.
Navigate to Network Adapter.
Select the Virtual Switch created in Step 1.
Check Enable virtual LAN identification.
Enter 2 for the VM Network.
Repeat for all VMs requiring this network.
โ Expected Result
VLAN 1: The Physical Host is reachable via the management IP, and all host-level traffic is tagged as VLAN 1.
VLAN 2: All VM traffic is tagged as VLAN 2 and isolated from the host management layer.
Physical Switch: The connected port on the physical hardware switch must be configured as a Trunk Port (IEEE 802.1Q) allowing both VLAN 1 and 2.