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

    DHCP not working on VLANs

    Scheduled Pinned Locked Moved DHCP and DNS
    12 Posts 5 Posters 3.5k 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.
    • danzekD
      danzek
      last edited by

      I'm using a Netgate SG-1100 with UniFi 8-port PoE switch, UniFi Cloud Key Gen2, and UniFi AP-AC-PRO. My main LAN works fine and devices are assigned an IP address via DHCP whether they plug into the switch (wired) or join the wireless network. However, I have two VLANS, one for a guest network and one for untrusted IoT devices, and devices that join these networks are not being assigned an IP address via DHCP.

      I've followed several tutorials online and as far as I can tell my interfaces, VLANs, DHCP server settings, and NAT rules are all correct. However, for some reason DHCP does not seem to be working on these VLANs despite it being enabled for them. Ubiquiti (UniFi) manufacturer (of course) says the issue is pfSense since it handles DHCP. Here are pictures of my various settings.

      Interfaces
      interfaces.PNG

      VLANs
      vlans.PNG

      Outbound NAT
      nat_outbound.PNG

      DHCP enabled (example)
      dhcp_enabled_example.PNG

      Firewall rules (example)
      firewall_rules_example.PNG

      ADMIN_PORTS is an alias for ports 22 and 443.

      Inside the UniFi settings, I have the VLANs set up as VLAN-only networks.

      UniFi Networks
      unifi_networks.PNG

      And I have the wireless networks set up to use the VLANs.

      UniFi Wireless Networks
      unifi_wireless_networks.PNG

      The main wireless network (wutangLAN) works fine and hosts are assigned an IP address. But when attempting to join either of the VLAN-associated wireless networks, DHCP is not working (the UniFi controller logs that any device attempting to connect "is having trouble obtaining an IP via DHCP.").

      Given that DHCP is enabled for these VLANs in pfSense, I can't figure out why devices aren't being assigned IP addresses when joining them via the configured wireless networks.

      1 Reply Last reply Reply Quote 0
      • kiokomanK
        kiokoman LAYER 8
        last edited by

        @danzek said in DHCP not working on VLANs:

        UniFi 8-port

        how about the switch? does it let vlan pass ?

        ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
        Please do not use chat/PM to ask for help
        we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
        Don't forget to Upvote with the 👍 button for any post you find to be helpful.

        danzekD 1 Reply Last reply Reply Quote 0
        • danzekD
          danzek @kiokoman
          last edited by danzek

          @kiokoman Yes, the Networks were configured using the VLANs as shown in the screenshot.

          1 Reply Last reply Reply Quote 0
          • dotdashD
            dotdash
            last edited by

            @danzek said in DHCP not working on VLANs:

            The main wireless network (wutangLAN)

            That ain't nothin to F* with...

            Not pfSense related, but in UniFi:
            Make sure DHCP guarding is off on the vlan network
            Make sure the 'block lan to wlan broadcast' is not checked on the wireless network
            Make sure the port profile has the vlans tagged on the ports

            danzekD 2 Replies Last reply Reply Quote 1
            • danzekD
              danzek @dotdash
              last edited by

              @dotdash thanks! Unfortunately none of these resolved it, either. These were what UniFi support had me do plus create a WLAN group. I appreciate the ideas, though!

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

                My unifi AP has 2 WIFI's network, GUEST, and WIFI.
                My AP is connected to a SWITCH (not Unifi switch), and this Switch is connected to pfsense.

                WIFI VLAN 10
                GUEST VLAN20

                pfsense side: note that the ports are tagged.

                76b8d53a-ffe5-4fdc-9114-2b712bed75f5-image.png
                752471cf-fcbf-4911-ae4f-3124b82fd070-image.png

                Switch side: note that the ports are tagged.
                67d78e6e-62f1-4335-b9a9-a366ec528a5a-image.png
                8f628c10-aa9f-45a8-8776-97bc055fe250-image.png

                In the Unifi controller side, I just created the WIFI networks and set VLAN:

                eca2a40b-0f80-4390-bb5b-abb91fe3ae87-image.png

                Hope this can help you.

                dead on arrival, nowhere to be found.

                danzekD 1 Reply Last reply Reply Quote 0
                • danzekD
                  danzek @mcury
                  last edited by danzek

                  @mcury how would I tag the ports in pfSense? Note I’m using an SG-1100 and the LAN port goes directly to my UniFi switch, so the main LAN and all VLANs are on the same “port” out of my Netgate device.

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

                    Check if the SG-1100 has the option Interfaces/Switch/VLANs
                    There, you can create the vlan groups, but I'm not sure if the SG-1100 has this menu.

                    Maybe it's better to wait a more skilled person in SG-1100 to help you.
                    I'm saying that because you may set the wrong things there and lose communication with the Firewall.

                    Edit:

                    Take a look at this:

                    https://docs.netgate.com/pfsense/en/latest/solutions/sg-1100/switch-overview.html

                    dead on arrival, nowhere to be found.

                    1 Reply Last reply Reply Quote 1
                    • kiokomanK
                      kiokoman LAYER 8
                      last edited by

                      vlan work from any interface
                      on this video i see that he is doing something more to the switch https://www.youtube.com/watch?v=JblnjsnJNJU at around 9:30
                      another video here https://www.youtube.com/watch?v=Bp_B79-WLlU

                      ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                      Please do not use chat/PM to ask for help
                      we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
                      Don't forget to Upvote with the 👍 button for any post you find to be helpful.

                      1 Reply Last reply Reply Quote 0
                      • NogBadTheBadN
                        NogBadTheBad
                        last edited by

                        Do a packet capture on the pfSense interface, do you see a request from the client ?

                        If you don't its not a pfSense issue.

                        Andy

                        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                        1 Reply Last reply Reply Quote 0
                        • danzekD
                          danzek @dotdash
                          last edited by

                          @dotdash the tagging in pfSense was the issue. I misunderstood how to do this. Thanks!

                          1 Reply Last reply Reply Quote 0
                          • danzekD
                            danzek
                            last edited by

                            THIS IS NOW SOLVED. The issue was tagging.

                            Inside pfSense I went to Interfaces > Switch > VLANs and added tags for the VLANs on members 0 (default system VLAN) and 2 (LAN) which resolved my issue.

                            Thanks everyone!

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