NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dhcpd(8) and unused or old MAC addresses



On 2023-08-23 02:23, Greg Troxel wrote:

the address will be reused.

This isn't really true.

I can confirm this, at least in my experience.

But dhcpd keeps track of previous leases long after their expiration; I
have had entires in the lease file from 6 months ago.  It will assign
addresses from the pool that have never been used for a lease, and then
I am pretty sure it will start reusing addresses probably in order of
least recently leased.  This is 100% compliant with the spec and means
that if a device gets an address and comes back next week, it will get
the same address. I think this is what Rocky is seeing in the lease file.

Yes, it perfectly makes sense. I've never reached the point where the new addresses are "sold out", so no "old" IP has never been reused so far, but
I think dhcpd(8) would behave this way.

1 hr, 1 day, is not going to matter much.  If you don't use all the
addresses, a returning device (with same mac addr) will get the same
address, even after a year.

I agree. My /var/db/dhcpd.leases includes entries almost older than two
years.

Rocky


Home | Main Index | Thread Index | Old Index