Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    PfSense + Hyper-V + VLANs + Reboot = No

    Scheduled Pinned Locked Moved L2/Switching/VLANs
    hyperv pfsense
    2 Posts 2 Posters 541 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      emcstravick
      last edited by

      I've been running pfSense with the VLANs configured for about 2 years and it works well - except for one issue.

      When I reboot my VM (not the host, just the pfSense VM,) it drops the VLANs that are connected using a shared NIC.

      I have about 12 VLANs and 8 NICs, so some of them have dedicated NICs (and vSwitches,) but I needed to consolidate some, so some are on a Trunked vSwitch which shares 3-4 VLANs. This is the one that stops working - all the dedicated vSwitches keep working.

      The solution is easy, I simply connect to the VM Host and run the following Powershell cmd:

      Get-VMNetworkAdapter -vmname pfsenserouter | ? SwitchName -eq "TrunkedVLANs" | Set-VMNetworkAdaptervlan -Trunk -AllowedVlanIdList "1-1000" -NativeVlanId 1

      As soon as I do this, it comes back online. But, why?

      It seems obvious that it's a Hyper-V specific issue, but why does a reboot require me to make a host level change - or more importantly just re-issue the same settings?

      Does pfSense (root OS) need a refresh, or is Hyper-V dropping the setting on VM reboot?

      I'm thinking it's an MS bug, but hoping someone else has encountered this and found a solution.

      Bob.DigB 1 Reply Last reply Reply Quote 0
      • Bob.DigB
        Bob.Dig LAYER 8 @emcstravick
        last edited by Bob.Dig

        @emcstravick The vSwitch is not trunked, the vNIC in pfSense is, at least this is how I understand it.

        Take a look here, it has worked for me without any problems (I use NativeVlanId 0).

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.