I have a challenge lately, and I don’t know which end it is, so I hope someone here will recognize the problem. Up until yesterday, I thought the “expires-after” and “last-seen” values under “/ip dhcp-server lease” were related. The two values always added up to the lease time. But that is not true, at least with my new device. This new device is a Wiznet w5100 ethernet controller connected to an embedded processor (Arduino Mega 2560).
I changed one of my localnets to a 2 hour dhcp lease time to check this so I wouldn’t have to wait days for the result. I use “print detail” to see this. Note after the initial lease issue and before the renewal, the expires-after and the last-seen add up to two hours.
1 D address=192.168.2.248 mac-address=DE:AD:BE:EF:FE:ED
client-id=“1>> ad:be:ef:fe:ed” server=dhcp3 status=bound
expires-after=1h13s last-seen=59m47s active-address=192.168.2.248
active-mac-address=DE:AD:BE:EF:FE:ED
active-client-id=“1>> ad:be:ef:fe:ed” active-server=dhcp3
host-name=“WIZnetEFFEED”
Then a few seconds later after the device says it renewed the dhcp lease:
1 D address=192.168.2.248 mac-address=DE:AD:BE:EF:FE:ED
client-id=“1>> ad:be:ef:fe:ed” server=dhcp3 status=bound
expires-after=59m43s last-seen=9s active-address=192.168.2.248
active-mac-address=DE:AD:BE:EF:FE:ED
active-client-id=“1>> ad:be:ef:fe:ed” active-server=dhcp3
host-name=“WIZnetEFFEED”
The last-seen and expires-after no longer add up to two hours. The total isn’t even an hour. This isn’t the bad part. In another hour, this lease will expire before the device renews again. What I end up with is this:
1 D address=192.168.2.248 server=dhcp3 status=busy expires-after=1h55m12s
last-seen=1h25m2s active-address=192.168.2.248 active-server=dhcp3
src-mac-address=DE:AD:BE:EF:FE:ED2 D address=192.168.2.247 mac-address=DE:AD:BE:EF:FE:ED
client-id=“1>> ad:be:ef:fe:ed” server=dhcp3 status=bound
expires-after=1h56m last-seen=4m active-address=192.168.2.247
active-mac-address=DE:AD:BE:EF:FE:ED
active-client-id=“1>> ad:be:ef:fe:ed” active-server=dhcp3
host-name=“WIZnetEFFEED”
Note the lease ip changed, and the old lease ip is now “busy”. I know why that happens, but not why the expires-after does not change after the dhcp lease renewal. Then this wouldn’t happen. And the expires-after and last-seen now add up to two hours again.
Isn’t the expires-after value supposed to change when the lease is renewed? Any ideas?
add: and this happens every two hours. It will have 192.168.2.246 then. ![]()
Oh, and I forgot to mention: RB433AH running v5.22