[Gllug] Triggering an action on DHCPDISCOVER

Mark Williams mark at aziraphale.homeip.net
Sun Feb 22 23:40:21 UTC 2009


> I'm trying to set up a really low power usage system.  The idea is
> that all that's left on all the time is an NSLU2 (which draws about
> 2 watts) as a DHCP/DNS server.  When a potential client connects the
> NSLU2 should send a WOL packet to the main server to bring it on
> line.
> 
> Now I can think of various cludgy ways to detect the arrival of a
> client (e.g. tail -f on /var/log/syslog and search for
> "DHCPDISCOVER") but I'm sure there must be a better (read, cleaner)
> way.

A reasonably recent ISC DHCP server with a configuration clause like:

+---
|on commit
|{
|  execute( "/usr/local/bin/wakey_wakey", "mainserver" );
|}
+---

... in the relevant scope looks like it might do this---albeit on
DHCPACK and therefore also for lease renewals, too.  I've only looked
at the manpage and source but not actually tested this.

-- 
Mark
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list