[Dnsmasq-discuss] DHCP options and SIGHUP

Simon Kelley simon at thekelleys.org.uk
Mon Jul 13 11:50:25 BST 2009

Olaf Westrik wrote:
> Hi everyone,
> I have a question and/or problem with using various DHCP options and 
> reloading them by using SIGHUP.
> Following use case:
> 'global' DHCP settings (rarely changing) and several static leases, some 
> of which using dhcp-boot for PXE boot.
> Now I would like to reread the static leases after changes have been 
> made by using SIGHUP. No problem if I put the dhcp-host configuration 
> lines in a file referenced by dhcp-hostsfile, but what to do with the 
> dhcp-boot lines?
> Any thoughts?

It's (mostly) possible. The trick is to use dhcp-optsfile which, like 
dhcp-hostfile get re-read on SIGHUP.

dhcp-optsfile contains dhcp-option lines, not dhcp-boot lines, but the 
filename and  servername information in dhcp-boot can be represented as 
  dhcp options.

So, if you have

dhcp-host=<mac address>,<IP address>,net:<tag>

then you can put

<mac address>,<IP address>,net:<tag>

in a  dhcp-hostfile



in dhcp-optsfile

and get the same effect, but the configuration is re-read on SIGHUP.

The only thing that this doesn't work for is the server address field in 
dhcp-boot, since there's no option defined to represent this. As long as 
you're relying on the default that's OK. A "pseudo option" should 
probably be defined for this data too, to fix this hole.



More information about the Dnsmasq-discuss mailing list