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

    Duplicate DHCP Leases?

    Scheduled Pinned Locked Moved DHCP and DNS
    49 Posts 3 Posters 12.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.
    • johnpozJ Offline
      johnpoz LAYER 8 Global Moderator
      last edited by

      With dok on this - WTF dude.. Do you want help, or do you want to hide that the names of your shit.. Did you name them after porn stars or something and are embarrassed..

      What exactly are you asking..  How to delete the Jami-PC stuff?  Those are static – so you go to the dhcp server, bottom of page will be static.. Deleted them there..  Worse case directly edit the conf file.  See the Trashcan icon -- click that it deletes it..

      Do you have dhcp running on more than 1 interface.. Check those for the ones that don't list an IP.

      deletestatic.png
      deletestatic.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
      • W Offline
        wharris623
        last edited by

        Hey Johnpoz, what I've posted is what I'm asking about.  The rest of the names of the machines and mac addresses on the network are irrelevant to the question being asked.

        What I'm asking is how do I delete the Jami-PC and the Jim-PC that don't have an IP address next to them.  Those are not listed under DHCP Server.  The only ones listed under DHCP Server are the ones with the IP addresses.

        I do have DHCP running on 4 interfaces but those DHCP Reservatrions that do not show an IP are not found on any of those.  Please see the updated picture.

        Thanks!

        ![DHCP Leases.JPG](/public/imported_attachments/1/DHCP Leases.JPG)
        ![DHCP Leases.JPG_thumb](/public/imported_attachments/1/DHCP Leases.JPG_thumb)

        1 Reply Last reply Reply Quote 0
        • D Offline
          doktornotor Banned
          last edited by

          Use the goddamn trashcan icon. On the proper DHCP server interface. Geeeeeeez.

          1 Reply Last reply Reply Quote 0
          • W Offline
            wharris623
            last edited by

            You're not listening.  Those entries don't show up on any DHCP Interface

            1 Reply Last reply Reply Quote 0
            • D Offline
              doktornotor Banned
              last edited by

              Yeah, on any out of the censored one you keep showing us. Go edit config.xml and restore it. Enough time wasted here with your censored BS.

              1 Reply Last reply Reply Quote 0
              • W Offline
                wharris623
                last edited by

                If they were showing up on any interface I would show them to you.  The point is, that it is possible with pfSense 2.3.2 release p1 that you can create a DHCP Reservation Entry from the DHCP Status Menu that you cannot delete from within pfSense.  I think that's a bug.  If you are talking about deleting those entries from

                /var/dhcpd/var/db/dhcpd.leases

                and

                /var/dhcpd/var/db/dhcpd.leases~

                I'm unable to find those two entries in there.

                I can find the entries that have IP's associated to them, but I'm not trying to delete the DHCP Reservations that have IP's.  I'm trying to delete the ones that are pulling from the pool aka the IP address field is blank as is shown by the arrows in the picture on the previous post.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  doktornotor Banned
                  last edited by

                  No, I am not. I am specifically talking about deleting them from config.xml.

                  
                  foreach ($config['dhcpd'] as $iface => $lease) {
                  	print_r($lease['staticmap']);
                  }
                  
                  

                  There are all your static leases.

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

                    They clearly are showing up on an interface - since I pointed out the trashcan icon in one of your posts.

                    If you create a reservation and do not give it an IP.. It will pull an address from the pool. It should still be listed in the dhcp server static listing on the bottom of the dhcp server page.  Look in all your dhcp servers running, or maybe check your ipv6 dhcp server?

                    If still not showing up, as dok so eloquently put it.. (Oh its great to have you back dok!!)  You were missed when you were gone!  Your posts always make my day that much better!

                    Download your xml, find the offending entry and delete from the xml and then restore that section of the xml.

                    edit:  Oh my gawd.. I posted a mac address and a host name.. Oh the black helicopters are going to get me for sure now ;) heheheh

                    Obfuscating clearly personal information like a public IP or fqdn that could point to your public IP, ok..  If your tinfoil hat is really tight - maybe the mac of wifi AP that could be on some wifi war driving database, ok..  But hiding rfc1918 space, or fqdn of something that is local or some hostname without a domain name, etc.  This just is frustrating for the person wanting to help because they don't have a full picture.  And as quite often on this board and the many others many of us here frequent.  The piece of the puzzle that solves the issues is quite often not given by the user, or they on purpose hide it because they think it is in some way private, etc.

                    Have as much of the puzzle as possible makes it easier and faster for us to help you..

                    dhcpxml.jpg
                    dhcpxml.jpg_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
                    • W Offline
                      wharris623
                      last edited by

                      @doktornotor:

                      No, I am not. I am specifically talking about deleting them from config.xml.

                      
                      foreach ($config['dhcpd'] as $iface => $lease) {
                      	print_r($lease['staticmap']);
                      }
                      
                      

                      There are all your static leases.

                      That's the first useful suggestion you've made this entire thread! Thank you!

                      1 Reply Last reply Reply Quote 0
                      • W Offline
                        wharris623
                        last edited by

                        @johnpoz:

                        They clearly are showing up on an interface - since I pointed out the trashcan icon in one of your posts.

                        If you create a reservation and do not give it an IP.. It will pull an address from the pool. It should still be listed in the dhcp server static listing on the bottom of the dhcp server page.  Look in all your dhcp servers running, or maybe check your ipv6 dhcp server?

                        If still not showing up, as dok so eloquently put it.. (Oh its great to have you back dok!!)  You were missed when you were gone!  Your posts always make my day that much better!

                        Download your xml, find the offending entry and delete from the xml and then restore that section of the xml.

                        Johnpoz, I totally agree!  It should show up on the DHCP Server Static listings at the bottom of the various DHCP Server pages based upon what server is running on what interface.  I did check them all thanks to your suggest but still not finding them there.  I did also check the IPV6 DHCP server but since I'm not running IPV6 it's disabled.  Can you tell me how I can point out the "bug" of being able to create a DHCP Reservation from the DHCP Status page that you cannot delete from the GUI to the proper people?

                        Thanks in advance!

                        Wes

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          doktornotor Banned
                          last edited by

                          If all you are going to provide is white boxes, then there's no need to bother with any bugs. What you are posting here does not reproduce on any sane box.

                          1 Reply Last reply Reply Quote 0
                          • W Offline
                            wharris623
                            last edited by

                            I can reproduce it on two different boxes.  So I'd dare say it's a bug.  If this wasn't a public forum I'd post the uncensored screen.  Since it is, it's getting censored.  My right to do so.  If you want to do a joinme or team viewer and look for yourself I'm down.

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

                              I could try and reproduce your issue I guess..  So you what created a static from your lease but did not give an IP?  And then you changed your mind and created another static while giving the IP?

                              If I take a lease from the leases page and try and make it a static, while leaving the IP off - it gives me an error

                              errorstatic.jpg
                              errorstatic.jpg_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
                              • W Offline
                                wharris623
                                last edited by

                                Kind of.  What I did was created a static lease without giving it an IP from the DHCP Status screen using the blue + with the white back ground.  It was at that point that I found I wasn't able to delete it.  Creating a static lease from the DHCP Server works fine.

                                Thanks for listening and trying Johnpoz

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

                                  Like my attached screenshot in the previous post.. Yeah that creates an error and does not allow you to create..

                                  You can only create those without an IP in the dhcp server page..  From what I can tell. Even then doesn't seem like the name can match with an active lease or it gives you an error.  But I can create one with name that is close

                                  eventhen.jpg
                                  eventhen.jpg_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
                                  • D Offline
                                    doktornotor Banned
                                    last edited by

                                    ZOMG. That is NOT the place to look for static leases! All configuration is stored in /cf/conf/config.xml.

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

                                      If your saying you can reproduce it, then please post your steps so we can do the same on our systems.  If so we can create a redmine for the issue.. But without a way to reproduce what your seeing.  I points to PEBKAC or some very off the wall glitch that is unique to your setup??

                                      Even if some off the wall sort of fluke that can cause the problem - you can always edit any dhcp reservation in the xml directly to correct such problem.  If we can reproduce your problem then the devs might be able to put in check to prevent it from happening again.  But we need to know how to reproduce it..  I tried doing it from a lease in the leases section and it would not allow me to create the lease reservation without an IP.  Only in the dhcp server section can you do that.

                                      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
                                      • D Offline
                                        doktornotor Banned
                                        last edited by

                                        He still did not have a look at the config.xml for sure. Since there's no way the stuff would appear in the GUI unless it is in $config['dhcpd'][$if]['staticmap']

                                        https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/services_dhcp.php#L131
                                        https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/services_dhcp.php#L1338

                                        1 Reply Last reply Reply Quote 0
                                        • W Offline
                                          wharris623
                                          last edited by

                                          I can do that.  If you hit the blue + with the white background from the DHCP Status screen which is what I initially did.  I wanted to create a static mapping with the IP being within the pool provided by that DHCP server.  I noticed that when you hit the + on either of these two boxes running at separate places is that at the top it says, "Services / DHCP Server /  / Edit Static Mapping".  It doesn't list the interface that it's adding the mapping to.  You can see this in the example below of "DHCP Status - No Interfaces" that I attached.

                                          On the other hand if you go to Services / DHCP Server / InterfaceName it shows the Interface name at the gray bar at the top.  As shown in "Services - DHCP - Interafce is listed" that I also attached.

                                          So back to how to repeat my steps.

                                          Go to status DHCP leases, chose a victim device and use the Blue + with the white background, chose save.  Apply the changes.  At that point you will now see a DHCP Static Mapping with no IP address listed. You cannot delete it, and it doesn't show up on any of the DHCP Servers running on any interface.

                                          Now if I go and create DHCP Static Mappings from Services / DHCP Server / InterfaceName it works fine and I can remove them from the same screen.

                                          To answer doktornotor's post, yes I looked in the config.xml and yes I can remove them from there, but it occurs to me that if you can add it from the GUI you should be able to remove it from the GUI.

                                          ![DHCP Status - No Interface.JPG](/public/imported_attachments/1/DHCP Status - No Interface.JPG)
                                          ![DHCP Status - No Interface.JPG_thumb](/public/imported_attachments/1/DHCP Status - No Interface.JPG_thumb)
                                          ![Services - DHCP - Interface is listed.JPG](/public/imported_attachments/1/Services - DHCP - Interface is listed.JPG)
                                          ![Services - DHCP - Interface is listed.JPG_thumb](/public/imported_attachments/1/Services - DHCP - Interface is listed.JPG_thumb)

                                          1 Reply Last reply Reply Quote 0
                                          • D Offline
                                            doktornotor Banned
                                            last edited by

                                            Screenshots censored to a new level!!! Lookie, now there's NOTHING shown, just the GUI menu and breadcrumbs. Are you dude kidding us? No idea what are you trying to illustrate, and as already noted above, noone can reproduce your problem. It either does not let you create the lease (presumably <=2.3.2), or redirects you to the DHCP server GUI and lets you create AND delete whatever you want, incl. a static lease with no IP specified (2.3.3+).

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