Releases and Monitoring

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Jul 25 18:51:14 UTC 2007


Nathan Michaels wrote:

>A single DHCP server (running on Linux) is going to be used for a pretty
>large (10,000+ clients) network. There may be more DHCP servers in the
>future for load handling, but this is how it will be to start. Our
>systems (clients) all have similar (regex-able) MACs, but they're not
>the only systems that will use the DHCP server. They're also going to
>have infinite leases on their addresses. This brings me to the first
>question. Is there a way to, if I know the MAC of the unit I'm pulling
>off the network, tell the server directly to release that MAC's lease?

It there a reason for having very long leases - it does make more 
work for you. Starting with version 3.1.0 you can now set a lease as 
reserved which means that it will not be given to any other client 
even when it's expired. I suspect you may be able to use OMAPI to set 
a lease to released state - I'm not sure. Or you can stop the server, 
edit the leases file, start the server. Or you could knock up a 
program that will craft a suitable DHCP-Release packet and send it to 
teh server.

>Secondly, I'd like to be able to see when our units join the network. Is
>there a way to do that short of tailing the dhcpd.leases file? Ideally,
>I'm looking for a setting where if a MAC requesting a lease matches a
>regex the server will run a program. I don't want to be constantly
>monitoring the dhcpd.leases file because of all the other unrelated
>traffic I'd have to filter out.

Monitor dhcpd.leases, monitor log file, use the "on commit()" 
function and call an external program when a lease is committed.


More information about the dhcp-users mailing list