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-22 15:41, Greg Troxel wrote:
This works and I do it all the time.
Edit the file and delete the specific lease. Then restart dhcpd.
However, I am unclear on when it writes the lease file and if it reads
it other than at startup. I think it reads it on startup, and then
the
working copy in RAM is what counts and it writes it when it issues a
lease. So if you write/restart without a lease renewal, this works.
Best practice is surely to stop the daemon, edit, and restart.
Ok, good, thank you!
But basically you shouldn't care, unless you want your IP address space
tidy. If that's what you want, then you probably should configure your
dhcpd:
[...]
statically assign (NOT in the pool!) in dhcpcd addresses to specific
devices based on IP address or client-id (you can steal these lines
from the lease file) organized in some way that makes senes to you,
like a block of 8 or 10 for one persons phone-type devices, a block
for accees points, etc.
[...]
The basic expression is
host foo {
hardware ethernet bar;
fixed-address 192.168.100.11;
}
I am not sure that I understood what you are meaning. Are you suggesting
to explicitly specify in /etc/dhcpd.conf some entries for some selected
devices, so that - if they make a dhcp request - they always get the
same
IP, fully controlled by me?
After you edit and restart, make sure it's running because it will fail
to start on syntax error and you will notice hours later when devices
can't get leases.
This also is a very useful advice.
Thanks!
Rocky
Home |
Main Index |
Thread Index |
Old Index