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

    DHCP on /31 subnet?

    Scheduled Pinned Locked Moved DHCP and DNS
    15 Posts 9 Posters 4.9k 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.
    • DerelictD
      Derelict LAYER 8 Netgate
      last edited by

      DHCP relies on broadcasts.  Not sure how anyone expects that to work without a broadcast address.

      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)

      1 Reply Last reply Reply Quote 0
      • Q
        qwerty
        last edited by

        @Derelict:

        DHCP relies on broadcasts.  Not sure how anyone expects that to work without a broadcast address.

        DHCP broadcasts do no rely on the subnet broadcast address (how will the client know what the subnet broadcast is before it knows the subnet?).

        DHCP always uses the 255.255.255.255 broadcast address.

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

          Yeah.  Here's another thread:

          http://www.dslreports.com/forum/r29832727-Mikrotik-DHCP-31-subnet

          This is probably something that's going to have to shake out before vendors reliably work with one another.

          You might try manually updating the dhcpd.conf file and seeing if you can get it working that way.  Maybe post your findings and if it requires a validation change in the DHCP config pages to make it work, that's pretty easy.

          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)

          1 Reply Last reply Reply Quote 0
          • C
            cmb
            last edited by

            @Derelict:

            You might try manually updating the dhcpd.conf file and seeing if you can get it working that way.  Maybe post your findings and if it requires a validation change in the DHCP config pages to make it work, that's pretty easy.

            Yeah that's my suggestion.

            Though where the clients aren't under your control, trying to do DHCP on /31s is likely to cause you all kinds of grief. Not sure how many devices will work in that circumstance but I'm sure there are a lot that won't. /31s are really intended for static assignment on point to point links where routers, not clients, are involved.

            1 Reply Last reply Reply Quote 0
            • Q
              qwerty
              last edited by

              @cmb:

              @Derelict:

              You might try manually updating the dhcpd.conf file and seeing if you can get it working that way.  Maybe post your findings and if it requires a validation change in the DHCP config pages to make it work, that's pretty easy.

              Yeah that's my suggestion.

              Though where the clients aren't under your control, trying to do DHCP on /31s is likely to cause you all kinds of grief. Not sure how many devices will work in that circumstance but I'm sure there are a lot that won't. /31s are really intended for static assignment on point to point links where routers, not clients, are involved.

              I've seen DHCP on /31 used in places so that network changes could be done easily from just the DHCP server… but I'm not sure how much effort it actually saves.

              Is there a way of getting pfSense to stop overwriting the dhcpd.conf file? I was trying to play around with a DHCP on /31 out of curiosity and I can't get my dhcpd.conf edits to stay.

              1 Reply Last reply Reply Quote 0
              • C
                CaptainElmo
                last edited by

                @qwerty:

                I've seen DHCP on /31 used in places so that network changes could be done easily from just the DHCP server… but I'm not sure how much effort it actually saves.

                It's not the effort so much as access to the remote client. In some cases I will not have easy access to the client so being able to modify things unilaterally at the head end is a requirement.

                For now I've resorted to using /30 subnets since that works, but ideally it would be better to have DHCP support /31 as well in order to not waste so many IP addresses. If a DHCP client doesn't like that configuration I can always fall back to a /30 only in those edge cases.

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  It's easy enough to disable our input validation to see if it works. If it does, perhaps we can relax the GUI input validation for that special case.

                  FreeBSD and pfSense only recently gained support for /31 networks so it's no surprise if other areas need to catch up.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  luckman212L JKnottJ 2 Replies Last reply Reply Quote 0
                  • luckman212L
                    luckman212 LAYER 8 @jimp
                    last edited by

                    Back from the dead: https://www.reddit.com/r/PFSENSE/comments/vaxhcj/dhcp_service_on_a_31_interface/

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

                      @captainelmo

                      A /31, with only 2 addresses, does not have a broadcast or network address.

                      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
                      • JKnottJ
                        JKnott @jimp
                        last edited by

                        @jimp said in DHCP on /31 subnet?:

                        FreeBSD and pfSense only recently gained support for /31 networks so it's no surprise if other areas need to catch up.

                        That's only for a point to point link, not a broadcast network.

                        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...

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

                          @jknott

                          It appears someone needs a refresher on DHCP. In addition to a server and client address, it also uses 0.0.0.0 for the client before it learns it's own address and the broadcast address. By my count, that's 4 addresses, which are hard to squeeze into a /31.

                          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.