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

    PfSense hyper V VLAN?

    Scheduled Pinned Locked Moved Virtualization
    5 Posts 2 Posters 4.2k 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.
    • K
      killmasta93
      last edited by

      Hi,
      I was wondering if someone has else accomplished this without running the powershell trick? Right now I have pfSense 2.2.6 running on hyper V windows 2012r2 with no issue, what im trying to do is to create a VLAN to separate another virtual machine called hades to run on 192.168.5.5, I have configured VLANS before but with hardware and untagg the ports on smart switches but because its on my test environment i have a dumb switch so did not think it was the issue, i saw another place where they seemed to fixed the issue using powershell im not sure if this is the case? See pictures

      Thank you
      Clipboarder.2017.03.01.png
      Clipboarder.2017.03.01.png_thumb
      Clipboarder.2017.03.01-002.png
      Clipboarder.2017.03.01-002.png_thumb
      Clipboarder.2017.03.01-003.png
      Clipboarder.2017.03.01-003.png_thumb
      Clipboarder.2017.03.01-004.png
      Clipboarder.2017.03.01-004.png_thumb
      Clipboarder.2017.03.01-005.png
      Clipboarder.2017.03.01-005.png_thumb

      Tutorials:

      https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

      1 Reply Last reply Reply Quote 0
      • K
        killmasta93
        last edited by

        bump anyone?

        Tutorials:

        https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

        1 Reply Last reply Reply Quote 0
        • K
          killmasta93
          last edited by

          So it seems i fixed part of the issue with the above dilemma i guess i was thinking to logical when i had to think a little more practical, i ended up adding a virtual adapter to the switch using private connection then did the same adding the virtual nic to pfsense and the windows machine see pictures

          Now my 2nd dilemma is working the VLAN tag for the UAP :( tomorrow im going to see if i have a smart switch lying around to test that theory.

          This is my current test lab config see picture The vlan 6 with subnet 192.168.6.0/24 is what im now trying to accomplish with the guest network

          Thank you

          Clipboarder.2017.03.05-011.png
          Clipboarder.2017.03.05-011.png_thumb
          Clipboarder.2017.03.05-012.png
          Clipboarder.2017.03.05-012.png_thumb
          Clipboarder.2017.03.05-013.png
          Clipboarder.2017.03.05-013.png_thumb
          Clipboarder.2017.03.05-014.png
          Clipboarder.2017.03.05-014.png_thumb
          Drawing1.jpg
          Drawing1.jpg_thumb

          Tutorials:

          https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

          1 Reply Last reply Reply Quote 0
          • P
            pgk
            last edited by

            When you create a virtual switch in Hyper-V then add a virtual adapter to a VM - that virtual adapter can be "selected" to provide access to that particular VLAN (as in your post).

            Within the VM, that network adapter will access that "VLAN" as an untagged access mode adapter.  In order to access other VLANs you will need to add more network adapters to our VM and tag them for the other VLANs in the settings of the network adapter (VM network adapter settings).

            so pfsense will end up with many virtual adapters - one for each VLAN you want to present to pfsense.

            or - as outlined in other posts you can enable trunking on the network adapter using powershell on the host:

            Get-VMNetworkAdapter -VMName "vmname" | Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList "1-100" -NativeVlanId 1

            If more than one adapter - you will need to insert the selection criteria:  Where-Object {$_.MacAddress -eq "XXXXXXXXXXXX"}  for the specific adapter.

            pgk

            1 Reply Last reply Reply Quote 0
            • K
              killmasta93
              last edited by

              Thank you for the reply and well structured response,

              But I might have been lost in the explanation correct me if im wrong,

              So in my case what im trying to do

              I have pfSense 2.2.6 virtual in Hyper V running windows 2012r2 server
              my window server has 3 physical NICS
              NIC1–-WAN
              NIC2---LAN ( which comes with the server)
              NIC3---EMAILIP  (Is my static IP for my email server)

              after that i add the virtual switch and then the virtual NIC to pfSense
              WAN
              LAN
              EMAILIP
              TEST NETWORK (This is what i want to VLAN)

              So in theory when I have installed VLANS on pfSense on bare metal i would add  a VLAN with the adapter of the LAN and the VLAN automatic goes though if the environment has a dumb switch. Now if it has a smart switch i have to TAG the ports (on where pfsense and unifi ap are connected)  on the smart switch depending on the VLAN i give and would work.

              But in this case when its virtual im somewhat stumped. I see you put a powershell example but you say "or" meaning i can do it though webgui instead?

              By any chance do you have an example on our hyper V?

              Thank you

              Tutorials:

              https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

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