Netgate SG-1000 microFirewall

Author Topic: client last transaction time not updating  (Read 106 times)

0 Members and 1 Guest are viewing this topic.

Offline jcamel32

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
client last transaction time not updating
« on: December 20, 2017, 04:12:30 pm »
I'm hoping someone here has some experience or knowledge about this. I'm having absolutely no luck elswhere, and would be very appreciative of any help or feedback.

The DHCPD leases file contain a "client last transaction time" (cltt) which should give the date/time that a client last communicated DHCP with the server. It does not look like it is updating when it should be.

For example, there is a lease active for a specific device:


lease 10.1.93.54 {
  starts 3 2017/12/20 21:20:08;
  ends 3 2017/12/20 23:20:08;
  cltt 3 2017/12/20 21:20:08;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet xx:xx:xx:00:f1:40;
  uid "\001\370/[\000\361@";
  set vendor-class-identifier = "udhcp 1.26.2";
  client-hostname "1612020235";
}


When I restart the device (via power cycle, so there is no DHCP release), the device is given the same lease, but the above lease declaration does not have an updated cltt to match this recent transaction:


Dec 20 14:21:20 lookout dhcpd: DHCPDISCOVER from xx:xx:xx:00:f1:40 (1612020235) via igb1
Dec 20 14:21:21 lookout dhcpd: DHCPOFFER on 10.1.93.54 to xx:xx:xx:00:f1:40 (1612020235) via igb1
Dec 20 14:21:21 lookout dhcpd: reuse_lease: lease age 73 (secs) under 25% threshold, reply with unaltered, existing lease for 10.1.93.54
Dec 20 14:21:21 lookout dhcpd: DHCPREQUEST for 10.1.93.54 (10.1.10.1) from xx:xx:xx:00:f1:40 (1612020235) via igb1
Dec 20 14:21:21 lookout dhcpd: DHCPACK on 10.1.93.54 to xx:xx:xx:00:f1:40 (1612020235) via igb1



The reason I'm looking at this is because we have devices that have multiple network interfaces with different MAC addresses, using the same hostname. When the device switches communication methods, a new lease with a different IP address is created because of the MAC difference.

We register DHCP leases to the DNS resolver so we can reliably locate the devices via hostname. The problem is, it seems that the lease created most recently is the one that ends up being resolved. In many cases we switch the devices from using interface1 to interface2, then back to interface1, and at this point the DNS resolves to the lease associated with interface2 which is incorrect.

If the cltt is reliable, I'm hoping to modify the dhcpleases program to sort leases and write the most recently requested lease to the hosts file.

We can't rely on Avahi for mDNS because of a bug that causes it to clash with it's own request.

I'm hoping someone here has experience with this, I'm not having any luck elsewhere. I'd try setting dhcp-cache-threshold to 0 so it doesn't "reuse" leases (though it should still update cltt), but as I understand you can't modify the configuration directly so if there's a good way to do it please let me know.