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 Tue, Aug 22, 2023 at 08:23:26PM -0400, Greg Troxel wrote:
> 
> > the address will be reused.
> 
> This isn't really true.   The address will be available for
> reassignment, according to the protocol, so that if the server chose to
> reuse it, it would not be wrong.
> 

Yes, correct.

> 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.
> 

I have seen the opposite happen on a linux server where a vm I was
constantly rebuilding would get a different IP despite the interface
MAC being the same every time.

As long as it doesn't double allocate it really shouldn't matter if
dhpcd hands out the same address to something reappearing after the
lease time has expired it.

-- 
Brett Lymn
--
Sent from my NetBSD device.

"We are were wolves",
"You mean werewolves?",
"No we were wolves, now we are something else entirely",
"Oh"


Home | Main Index | Thread Index | Old Index