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

    New to Pfsense - DHCP Exclusion

    Scheduled Pinned Locked Moved DHCP and DNS
    14 Posts 3 Posters 5.4k 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.
    • H
      Hamooda
      last edited by

      I just need to know how to exclude an IP from being distribute by DHCP?

      Thanks in advance

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

        Do you mean you want a specific address for a device?  If so, you can do that on the DHCP server tab, at the bottom, in "DHCP Static Mappings for this Interface".  I don't know if it's required with pfSense, but it's generally a good idea to keep those addresses outside of the DHCP address pool.

        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
        • H
          Hamooda
          last edited by

          first off tanks for your prompt response,
          I want to exclude an IP from being giving by DHCP.

          My DHCP range is form (192.168.0.11) to (99) and I don't want DHCP to give out some IPs within that rang such as (192.168.0.80)

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

            It might help to know what you're trying to do with this.  If you have some reason to not allow that specific address to be handed out, then do what I described in the other post, but use a dummy MAC address.  That address will then never be handed out.  But somehow, I think there's more to this than what you're saying. If so, there may be a better way to do what you want.

            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
            • H
              Hamooda
              last edited by

              Somplu I want to exclude these ip because it's already occupied by some printers and other devices.

              I used to do it in one step with Microsoft DHCP that's why I can't find it easy :)

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

                I assume those devices have a static address?  If so, just give them addresses outside of the DHCP address pool.  For example, you might have the pool configured for 192.168.0.100 to 192.168.0.199.  You then can give static addresses outside that range to those devices.  Or you could configure them to use DHCP and create a static mapping between the MAC address and IP address.  Either way will work fine.

                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
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  The devices with static IPs on your network should be outside your pool.  If you have devices inside your pool, even if the client is already set inside the pool.  And you want to be clean about it create multiple pools skipping those IPs.  But would prob just be easier to change those devices so they are not in the pool range.

                  You can have multiple pools.  So for example with your .80 just create pools

                  192.168.0.11-79

                  Then create next pool

                  192.168.0.81-99

                  You can have many pools setup skipping over single IPs or ranges of IPs if your setting those clients as static.. But its much simpler and cleaner to just put your devices outside the pool.. If your pool is .11-99 then your statics could be .1 to .10 and .100 to .254 if your using a /24

                  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
                  • H
                    Hamooda
                    last edited by

                    In fact I can't change some devices IP. But now I got a question, when I enabled the DHCP server I defined the range of IPs but didn't make Pools, though my DHCP still handing out IPs! So you mean if I make pool range my DHCP will pass IP from pool ranges only and not from the whole range?

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

                      @Hamooda:

                      In fact I can't change some devices IP. But now I got a question, when I enabled the DHCP server I defined the range of IPs but didn't make Pools, though my DHCP still handing out IPs! So you mean if I make pool range my DHCP will pass IP from pool ranges only and not from the whole range?

                      All you have to specify is the available range.  You'd only use the additional pools if you needed more pools.  As for those devices you can't change, you can always create a DHCP entry for their address and use the device's MAC address.  That way, no other device can get that 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
                      • H
                        Hamooda
                        last edited by

                        Thanks a lot, I will try thatbnext Sunday and will let you know. Much appreciated your advice.

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

                          "you can always create a DHCP entry for their address and use the device's MAC address."

                          No not really, you can not create a reservation for IP inside the pool.. If you mean create a dummy lease? How exactly you going to do that?

                          Why not just do the pools.. Clickity Clickity done!

                          multplepools.png
                          multplepools.png_thumb

                          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
                            last edited by

                            "you can always create a DHCP entry for their address and use the device's MAC address."

                            No not really, you can not create a reservation for IP inside the pool.

                            Sorry, forgot about that.

                            Still, I don't think I've ever seen an IP device that couldn't be configured for a specific address, if not DHCP.  However, I have seen some that were difficult to configure in that I had to manually create an arp entry and then use that IP to access the device.

                            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
                            • H
                              Hamooda
                              last edited by

                              Thanks to all, I solve it by IP reservation and used fake MAC address.

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

                                How exactly did you do that, pfsense does not allow you to create reservations for IPs "inside" the pool range..

                                dhcpreservation.png
                                dhcpreservation.png_thumb

                                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
                                • First post
                                  Last post
                                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.