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

Dhcp lease client hostname missing (with 2.3)

Scheduled Pinned Locked Moved DHCP and DNS
35 Posts 11 Posters 12.6k 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.
  • V
    vynce
    last edited by Jul 12, 2016, 2:55 AM

    Thanks Chris. I've posted to the dhcp-users mailing list. Hopefully they have some suggestions :)

    1 Reply Last reply Reply Quote 0
    • C
      cmb
      last edited by Jul 12, 2016, 3:58 AM

      @Vynce:

      Thanks Chris. I've posted to the dhcp-users mailing list. Hopefully they have some suggestions :)

      Thanks, I followed up on that thread with some specifics as well.

      1 Reply Last reply Reply Quote 0
      • Z
        zxvv
        last edited by Jul 13, 2016, 4:34 AM

        Are you synchronizing two dhcpd servers that are doing dynamic dns registration?

        I believe there is a known limitation in the isc-dhcpd sychronization, in that it transfers the lease between dhcpd servers, but fails to transfer the host name.

        1 Reply Last reply Reply Quote 0
        • V
          vynce
          last edited by Jul 13, 2016, 5:18 AM

          Thanks for the heads up on that sync issue. In my case it's just a super basic configuration – no redundancy, syncing, or anything.

          1 Reply Last reply Reply Quote 0
          • V
            vynce
            last edited by Jul 13, 2016, 6:33 AM

            Shawn Routhier (ISC DHCP lead engineer) suggested adding "dhcp-cache-threshold 0;" to dhcpd.conf to disable an optimization that allows dhcpd to skip updating dhcpd.leases when a client requests an updated lease after less than 25% of the lease time.

            Here's how I made that change in case anyone else wants to give it a try. Not sure if it's the best way, but the setting has been added to dhcpd.conf at least.

            • Diagnostics -> Edit File.

            • Paste "/etc/inc/services.inc" in the box and click Load.

            • Add "dhcp-cache-threshold 0;" on line 541. There's another location around line 1285 for dhcpdv6 if that applies to your configuration.

            • Click save.

            • Services -> DHCP Server.

            • Click save to regenerate dhcpd.conf and kick dhcpd itself to reload its config.

            Now to wait and see what happens :)

            1 Reply Last reply Reply Quote 0
            • A
              AsgardianFW
              last edited by Jul 13, 2016, 2:14 PM Jul 13, 2016, 12:29 PM

              My setup is also pretty simple.  The only non-default settings I have are some static leases and the default lease time is set to 86400 (24 hrs).  The longer lease time makes is easier to see the problem because the hostname comes back after a lease renewal.  The default time of 2 hours somewhat hides the hostname issue unless you're really watching it.

              I have made the suggested change to disable the optimization and I'll report back within 24 hours.

              1 Reply Last reply Reply Quote 0
              • A
                AsgardianFW
                last edited by Jul 14, 2016, 10:48 PM

                So far this works at my smaller office.  I'm deploying the "fix" to a larger office for additional verification.

                1 Reply Last reply Reply Quote 0
                • V
                  vynce
                  last edited by Jul 15, 2016, 1:34 AM

                  This workaround fixed my two installations as well :D. I'll reply to the dhcp-users mailing list and hopefully we can come up with a proper fix for the next version of isc-dhcpd.

                  1 Reply Last reply Reply Quote 0
                  • C
                    cmb
                    last edited by Jul 15, 2016, 7:10 PM

                    I implemented that workaround for 2.3.2, since disabling the cache threshold won't have any impact on our users' use cases and it does appear to avoid the root cause problem.

                    Thanks for getting the ball rolling on that one Vynce, had I realized a workaround would have come that easily, I'd have done so some time ago.

                    1 Reply Last reply Reply Quote 0
                    • A
                      AsgardianFW
                      last edited by Jul 15, 2016, 7:15 PM

                      Thanks Vynce for championing this effort with ISC.

                      Thanks cmb for incorporating this into the next version.  I wasn't looking forward to remembering to patch this in manually after every upgrade.  I wish you the best of luck for whatever is next for you.

                      1 Reply Last reply Reply Quote 0
                      • V
                        vynce
                        last edited by Jul 15, 2016, 7:22 PM

                        Thanks Chris! I've opened a bug ticket in the isc-dhcp project to address the root issue: [ISC-Bugs #42849]. Their bug tracker appears to be closed to the public due to privacy concerns. Do we need to try and get some pfSense project email address added as a watcher? Not sure if you intend for the workaround to be reverted when the root issue is fixed…

                        1 Reply Last reply Reply Quote 0
                        • C
                          cmb
                          last edited by Jul 15, 2016, 7:51 PM

                          Thanks Vynce. Once it's fixed, please start a new ticket at redmine.pfsense.org to revert that change, as it would be preferable to go back to the default there once it doesn't break other things.

                          1 Reply Last reply Reply Quote 0
                          • V
                            vynce
                            last edited by Jul 16, 2016, 12:10 AM

                            Sounds good, will do.

                            1 Reply Last reply Reply Quote 0
                            • V
                              vynce
                              last edited by Jul 27, 2016, 1:39 AM

                              Just a heads up that a patch for this issue has been committed to master in the isc-dhcp project and will be included in the isc-dhcp 4.3.5 beta. I will create a pfSense ticket to pull in isc-dhcp 4.3.5 final once it is released and revert Chris's workaround. I might try to build a pfSense-compatible dhcpd that includes this patch to verify the fix.

                              1 Reply Last reply Reply Quote 0
                              • D
                                driiper
                                last edited by Jul 31, 2016, 6:34 PM

                                I upgraded to 2.3.2 but are still having this issue with some of my boxes. I run a proxmox (KVM / LXC ) hypervisor. While the KVM boxes keeps their hostname in the dhcp records. The LXC boxes loses it after a while.

                                Do i have to do anything to apply this fix to a upgraded system (2.3.2)?

                                1 Reply Last reply Reply Quote 0
                                • V
                                  vynce
                                  last edited by Aug 2, 2016, 1:08 AM

                                  You shouldn't have to do anything AFAIK. You can verify that the workaround is in place:

                                  • Diagnostics -> Edit File.

                                  • Paste "/var/dhcpd/etc/dhcpd.conf" in the box and click Load.

                                  • Verify that dhcp-cache-threshold 0; is listed in the file.

                                  1 Reply Last reply Reply Quote 0
                                  • V
                                    vynce
                                    last edited by Oct 6, 2016, 3:05 AM

                                    isc-dhcp 4.3.5 was released today and includes the fix for this issue. I've opened a new bug ticket to track upgrading to 4.3.5 and revert the workaround that Chris added.

                                    1 Reply Last reply Reply Quote 0
                                    • R
                                      rsq
                                      last edited by Oct 8, 2016, 10:09 PM

                                      The workaround does not seem to be working for DHCPv6.

                                      I verified that the workaround is in place in /etc/inc/services.inc . It appeared in 2 locations in the file.

                                      Clients are ubuntu 14.04.3 LTS and 16.04 LTS.

                                      On this version:
                                      2.3.2-RELEASE-p1 (amd64)
                                      built on Tue Sep 27 12:13:07 CDT 2016
                                      FreeBSD 10.3-RELEASE-p9

                                      1 Reply Last reply Reply Quote 0
                                      • MikeV7896M
                                        MikeV7896
                                        last edited by Oct 8, 2016, 11:25 PM

                                        @rsq:

                                        The workaround does not seem to be working for DHCPv6.

                                        In DHCPv6, the client does not provide its hostname to the DHCP server. The only form of identification is the DUID, a unique identifier that is generated by the operating system when the computer is set up. The only way a hostname is present under DHCPv6 is if it's a static entry, where you can enter a hostname yourself.

                                        The S in IOT stands for Security

                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          anschmid Banned
                                          last edited by Mar 26, 2017, 8:34 AM

                                          I am on 2.3.3-p1 and have issues with missing hostnames.

                                          Found this threat and checked if dhcp.conf has the "dhcp-cache-threshold 0;" and it doesn't.

                                          Is this still needed or should this be fixed without the workaround?

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received