Step 3

Move the host and retire the old LAN

Move the Hyper-V host onto the management VLAN, give it routes to the others, then switch off the old flat network.

15 minutesHyper-V host, then pfSense

Move the host

Hyper-V host
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "CON-LAN" -Access -VlanId 10
$if = (Get-NetAdapter -Name "vEthernet (CON-LAN)").ifIndex
Get-NetIPAddress -InterfaceIndex $if -AddressFamily IPv4 | Remove-NetIPAddress -Confirm:$false
New-NetIPAddress -InterfaceIndex $if -IPAddress 10.0.10.5 -PrefixLength 24
20,30,40,50 | ForEach-Object { New-NetRoute -InterfaceIndex $if -DestinationPrefix "10.0.$_.0/24" -NextHop 10.0.10.1 }

The host gets no default gateway here, because its own internet connection stays on its main network card. The routes tell it to reach the other VLANs through pfSense.

Retire the old LAN

Check nothing is left on it first: Status › DHCP Leases and Diagnostics › ARP Table should show no old addresses.

  1. Turn off its DHCP

    Services › DHCP Server › LAN › untick Enable.

  2. Remove its address

    Interfaces › LAN › set IPv4 Configuration Type to None and rename it CON_TRUNK.

  3. Leave it enabled
Do not disable the parent interface

The VLANs ride on it. Disable it and all five VLANs stop.

Back up

Download the configuration from Diagnostics › Backup & Restore.

To undo a move

Hyper-V host
Set-VMNetworkAdapterVlan -VMName "CON-WS-001" -Untagged

Then give the machine back its old address. To undo everything, restore the pfSense backup you took at the start.

Done when

Check

The admin page opens at https://10.0.10.1 from the host, and every machine sits on its VLAN. Next: Write firewall rules between VLANs.

Your progress is kept in this browser only.