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

    Setting up VLAN: pfSense and UniFi Gear (150w PoE switches, EdgeSwitch 16XG, UniFi Controller, 13 UniFi APs)

    Scheduled Pinned Locked Moved L2/Switching/VLANs
    5 Posts 4 Posters 1.3k 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.
    • M
      m0lecule
      last edited by m0lecule

      Hey everyone,

      I'm having a tremendously difficult time setting up something that seems like it should be easy: VLANS with a pfSense gateway and a bunch of Ubiquiti UniFi gear. The frustrating thing is I've set this up before with a pfSense gateway and UniFi APs, but with a bunch of different switches.

      Below I will to be as thorough as possible explaining the architecture of my Network and documenting our setup so someone could possibly see what I may have messed up.

      1st, here is a JPEG of a VISO drawing I made showing the Network overview:
      VLAN Help Needed.jpg

      Important Info:
      I am able to SSH into the EdgeSwitch 16XG and ping the gateways of the VLANS (10.10.30.1 and 10.10.40.1). But if I try to login to the wireless networks using these VLANs no IP is given via DHCP on the pfSense appliance. Also, if I try to assign a port on any of my switches to only use a specific VLAN and then connect a laptop to that switch via RJ45 I do not get an IP (just APIPA address and ipconfig /release, ipconfig /renew does not help).

      Moving on...

      Here is all the configuration I have performed:

      Interface assignments in pfSense. The Student Wifi will have VLAN 300, and the Guest Wifi will have VLAN 310. They are tied to the lan port (whcih you can physically see in the overview of the network above).

      pfSense - Interface Assignments.jpg

      Screenshot of the settings within the Student Wifi interface for VLAN 300:

      pfSense - Interface Assignments - Edit 300.jpg

      Screenshot of the settings within the Guest Wifi interface for VLAN 310:

      pfSense - Interface Assignments - Edit 310.jpg

      Here is the screenshot for the VLANs under "Interface Assignments":

      pfSense - VLANs.jpg

      Screenshot for igb1 (lan) - VLAN 300 under "VLAN Interfaces":

      pfSense - VLANs - Edit 300.jpg

      Screenshot for Firewall Rules - VLAN 300 (Student Wifi):

      pfSense - Firewall Rules - WifiStudent 300.jpg

      Screenshot for Firewall Rules - VLAN 310 (Guest Wifi):

      pfSense - Firewall Rules - WifiGuest 310.jpg

      Screenshot of settings in the EdgeSwitch 16XG:

      EdgeSwitch Settings.jpg

      Screenshot of "Devices" in the Unifi Controller (o1/o3):

      UniFi Controller - Devices.jpg

      Screenshot of "Devices" in the Unifi Controller (o2/o3) - Looking at settings for one of the PoE switches:

      UniFi Controller - Devices 2.jpg

      Screenshot of "Devices" in the Unifi Controller (o3/o3) - All VLANs set to pass through the ports on this PoE switch which goes out to the APs:

      UniFi Controller - Devices 3.jpg

      Screenshot of UniFi Controller (Settings --> Networks):

      UniFi Controller - Settings - Networks.jpg

      Screenshot of UniFi Controller (Settings --> Networks, Editing VLAN 310):

      UniFi Controller - Settings - Networks - Edit WifiGuest 310.jpg

      Screenshot of UniFi Controller (Settings --> Wireless Networks):

      UniFi Controller - Settings - Wireless Networks.jpg

      Screenshot of UniFi Controller (Settings --> Wireless Networks, Editing VLAN 300):

      UniFi Controller - Settings - Wireless Networks - Edit WifiStudent 300.jpg

      Screenshot of UniFi Controller (Settings --> Wireless Networks, Editing VLAN 310):

      UniFi Controller - Settings - Wireless Networks - Edit WifiGuest 310.jpg

      Ok, that is all. Have I misconfigured something? What am I doing wrong? Why can't my devices get an IP address when connecting to the Wifi attributed with these two VLANs?

      1 Reply Last reply Reply Quote 0
      • M
        m0lecule
        last edited by

        I solved this issue myself. For any having similar issues you should try running the VLANs on a separate physical port - separate from the main LAN port. I'm lucky that our gateway/firewall has 6 ports and many are not in use ;)

        So, to recap:
        All the configuration in the above post is correct. All I did was make a new interface on a different physical port (specifically, igb3). This separated my VLANs from my LAN port on igb1. All worked after that as it should.

        1 Reply Last reply Reply Quote 0
        • DerelictD
          Derelict LAYER 8 Netgate
          last edited by

          For future reference there is no issue doing the untagged LAN interface plus tagged VLANs on the same interface.

          You do have to configure the switchport correctly.

          Chattanooga, Tennessee, USA
          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
          Do Not Chat For Help! NO_WAN_EGRESS(TM)

          JKnottJ 1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            I run multiple interfaces where there is a native (untagged) and then tagged vlan on top of that.. There is no issues with doing it this way..

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • JKnottJ
              JKnott @Derelict
              last edited by

              @Derelict said in Setting up VLAN: pfSense and UniFi Gear (150w PoE switches, EdgeSwitch 16XG, UniFi Controller, 13 UniFi APs):

              For future reference there is no issue doing the untagged LAN interface plus tagged VLANs on the same interface.

              That's often the way VoIP phones are configured, with the phone on a VLAN and computer port on native. Also, access points with multiple SSIDs.

              As mentioned above, there is no reason why a VLAN cannot share the wire with a native LAN. The only difference between a VLAN frame and native is the contents of the Ethertype field, plus an additional 4 bytes for the tag.

              PfSense running on Qotom mini PC
              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
              UniFi AC-Lite access point

              I haven't lost my mind. It's around here...somewhere...

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