Allowing VLANs through Hyper-v using pfSense

I have been wanting to learn and implement VLANs in my network for a long time now although I didn’t have much need for them to begin with. Now having a network CCTV system gave me some motivation to actually start implementing a VLAN. I have been running pfSense for a couple months now and have been getting more into it as time goes on. I watched Tom’s video on creating VLANs through pfSense which was super helpful like his other tutorials I watch and use. However, although I created a VLAN on the pfSense side, I spent a good couple of days trying to tag/untag ports on my HP switch to get the VLAN to pass through specific ports which didn’t work out whatsoever. I reviewed VLAN settings on pfsense and the switch thinking I am not doing it correctly until I pulled out the old USG, created a VLAN, and was able to configure/pass through the VLAN on the switch which was a major step forward for me. Back to pfsense, which is virtualized on Hyper-v, I gathered from research that I needed to allow/trunk the VLANs through Powershell on the host machine which was the magic command to make it all work.

Here is the command,

Set-VMNetworkAdaptervlan -VMName VMNAME -Trunk -AllowedVlanIdList "0, 80" -NativeVlanId 0

Thought I would share as this was the missing piece to the entire project and I know some people might come across this issue like I did.

Have a good day.

1 Like