Dans Dev Diary 2.0 Help

OS-Level VLAN Tagging for Dual-Homed Workstation

Runbook Goal

Use one physical PC link to keep:

  • internet and game traffic on the untagged Personal network (via Dream Machine SE), and

  • NAS traffic on a tagged Geek VLAN path at switch speed.

This avoids asymmetric routing side effects from L3 inter-VLAN routing while preserving high-throughput NAS transfers.

When to Use This Runbook

  • You previously enabled L3 inter-VLAN routing for performance.

  • Port forwarding or game NAT became unreliable (Moderate/Strict NAT).

  • Your PC and NAS are connected through USW Pro Max 16 PoE.

Prerequisites

  • UniFi controller access with permission to edit switch port profiles.

  • Windows PC with Hyper-V available.

  • One physical NIC on the PC connected to USW Pro Max 16 PoE.

  • VLAN details for:

    • Personal network (untagged/native)

    • Geek network (tagged, example VLAN 5)

  • NAS subnet details (example 192.168.55.0/24).

Topology

Windows PC
Default gateway path
Geek VLAN subnet path
VLAN 5
Untagged
Primary Path
Untagged
Internet and Gaming
Virtual Path
VLAN 5 Tagged
SMB File Transfer
USW Pro Max 16 PoE
Trunk Port
NAS
Dream Machine SE
Internet

Execution

Phase 1: Configure the Switch Port as Trunk

Allow Personal (native) and Geek (tagged) on the PC port

  1. Open UniFi Network and navigate to UniFi Devices | USW Pro Max 16 PoE.

  2. Open Ports (or Port Manager) and select the port connected to the PC.

  3. Set the Primary Network (Native VLAN) to Personal.

  4. Under advanced VLAN settings, allow Geek Network (VLAN 5) as tagged traffic on that same port.

  5. Apply changes and wait for the port to reprovision.

Phase 2: Create the Windows Tagged Interface

Create Hyper-V virtual switch and VLAN-tagged adapter

  1. Open PowerShell as Administrator.

  2. Identify your physical adapter name:

    Get-NetAdapter | Where-Object { $_.Virtual -eq $false }
  3. Create an external virtual switch bound to the physical adapter:

    New-VMSwitch -Name "PhysicalBridge" ` -NetAdapterName "10G Nic" ` -AllowManagementOS $true
  4. Create a host virtual adapter for Geek VLAN traffic:

    Add-VMNetworkAdapter -ManagementOS ` -Name "Geek-VLAN" ` -SwitchName "PhysicalBridge"
  5. Apply VLAN tagging to the new adapter:

    Set-VMNetworkAdapterVlan -ManagementOS ` -VMNetworkAdapterName "Geek-VLAN" ` -Access -VlanId 5

Phase 3: Set IP Without Gateway on Tagged Adapter

Keep NAS path local and avoid default route conflicts

  1. Open Network Connections (`ncpa.cpl`).

  2. Open properties for `vEthernet (Geek-VLAN)`.

  3. Configure IPv4 with a static address in the NAS subnet (example `192.168.55.20/24`).

  4. Leave Default Gateway and DNS empty on this adapter.

  5. Save and close.

Verification

Validate routing behavior and expected outcomes

  1. Confirm the tagged adapter exists and has the expected IPv4:

    Get-NetIPAddress ` -InterfaceAlias "vEthernet (Geek-VLAN)" ` -AddressFamily IPv4
  2. Confirm route preference for NAS subnet:

    route print

    Verify the NAS subnet route points to `vEthernet (Geek-VLAN)`.

  3. Test local NAS reachability:

    ping 192.168.55.14
  4. Run a file transfer test to NAS and confirm high throughput (target similar to prior baseline, e.g. `~1.8Gbps+` in your environment).

  5. Validate gaming/internet path still uses the primary interface and NAT returns to Open where expected.

Rollback

Return to pre-change state

  1. Remove VLAN-tagged host adapter:

    Remove-VMNetworkAdapter -ManagementOS -Name "Geek-VLAN"
  2. If needed, remove external switch:

    Remove-VMSwitch -Name "PhysicalBridge" -Force
  3. Restore original UniFi port profile for the PC port.

Troubleshooting

  • No NAS connectivity: confirm VLAN 5 is allowed on switch port and tagged adapter VLAN ID is 5.

  • Internet breaks after switch creation: wait for NIC rebind, then verify primary adapter default gateway.

  • Traffic still hairpins through router: check Geek adapter has no default gateway and correct subnet mask.

  • NAT still Moderate/Strict: confirm game/device port forwarding is mapped to the primary untagged Personal IP.

Last modified: 04 April 2026