Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - logan

#1
General Discussion / Re: Strange dhclient lease times!
February 26, 2025, 09:00:40 PM
Quote from: EricPerl on February 21, 2025, 10:42:50 PMI believe these timestamps are server originated.
Bogus times in DHCP leases are likely to complicate renewal...
I suspect the IP mentioned in the DHCP ACK is used regardless of time validity. But again, it would be difficult to trigger a renewal in the past...

That makes sense! Thank you! I ended up using a script to test the connection and reset the interface when the lease expires. Internet goes down for five minutes, but so far nobody has noticed. Might write another one to get a new lease every night when nobody cares. Pretty hacky!
#2
General Discussion / Strange dhclient lease times!
February 21, 2025, 08:14:09 AM
I'm running OPNsense 25.1.1-amd64 with a fresh install. Had this same problem on an older version--OPNsense 22 (tried updating it to 23 and then 24 previously, but had to revert to a snapshot and finally got around to a new install). This is running as a VM on Proxmox if that matters.

My old ISP rarely changed my address assigned by DHCP, but my new ISP seems to do it once a week or so. Every time the lease expires, I do not get a new address and the gateway is marked down.

I have been reading and it sounds like something similar is a known issue in both pfSense and OPNsense and people deal with it with scripts that reset the WAN interface and such. What's weird to me is the details on the lease as found in /var/db/dhclient.leases.vtnet1


lease {
  interface "vtnet1";
  fixed-address 100.117.19.212;
  next-server 100.117.19.213;
  option subnet-mask 255.255.255.248;
  option routers 100.117.19.213;
  option domain-name-servers 192.168.254.1;
  option host-name "wocket";
  option broadcast-address 100.117.19.215;
  option dhcp-lease-time 86400;
  option dhcp-message-type 5;
  option dhcp-server-identifier 100.117.19.213;
  option dhcp-renewal-time 38734;
  option dhcp-rebinding-time 71134;
  option option-125 0:0:d:e9:20:4:6:30:30:44:30:44:30:5:c:33:32:30:32:34:33:37:32:31:32:39:33:6:8:4d:43:37:30:31:30:43:41;
  renew 6 1970/1/3 07:47:48;
  rebind 6 1970/1/3 15:51:55;
  expire 6 1970/1/3 21:02:14;
}
lease {
  interface "vtnet1";
  fixed-address 100.117.117.32;
  next-server 100.117.117.33;
  option subnet-mask 255.255.255.192;
  option routers 100.117.117.33;
  option domain-name-servers 192.168.254.1;
  option host-name "wocket";
  option broadcast-address 100.117.117.63;
  option dhcp-lease-time 86400;
  option dhcp-message-type 5;
  option dhcp-server-identifier 100.117.117.33;
  option dhcp-renewal-time 43200;
  option dhcp-rebinding-time 75600;
  option option-125 0:0:d:e9:20:4:6:30:30:44:30:44:30:5:c:33:32:30:32:34:33:37:32:31:32:39:33:6:8:4d:43:37:30:31:30:43:41;
  renew 6 1970/1/3 14:12:38;
  rebind 6 1970/1/3 23:12:38;
  expire 0 1970/1/4 02:12:38;
}

Apparently there are two valid leases for the same WAN interface? What happened today, was the gateway went down, I renewed the IP from the web interface and clearly dhclient thinks that both are still valid.

What's even more bizarre is the dates for renew, rebind and expire are only a few days from epoch time. I have a valid time though and had a valid time when these leases were acquired! All the other logs show the correct date and time.

logan@wocket:/var/db # date
Fri Feb 21 06:59:15 UTC 2025

QuoteThe Internet Systems Consortium DHCP client keeps a persistent database of leases that it has acquired that are still valid.

Does dhclient think that both of the leases are still valid because the date/time for expiry is long in the past? Some sort of bug? A misconfiguration?

Thanks in advance for any help you can offer!