[Dnsmasq-discuss] problem distributing dhcp-option to certain net: hosts

Simon Kelley simon at thekelleys.org.uk
Mon May 22 19:09:54 BST 2006


Brent Cook wrote:
> Hi all,
> 
> I really like dnsmasq! If only all network servers could be so simple to use!
> 
> I am having a bit of an issue though; it might be a bug. If it is, I will 
> track it down and try to fix it. For now though, can you tell me if I'm just 
> specifying options wrong?
> 
> What I am trying to do is netboot a few different types of machines. I'm 
> allowing dnsmasq to identify different machines by the MAC address prefix. 
> For instance:
> 
> dhcp-host=00:50:C2:*:*:*,net:pe-xes
> dhcp-option=net:pe-xes,17,"/srv/nfsroot/powerpc"
> dhcp-boot=net:pe-xes,kernel-xes,build,192.168.2.1
> 
> So, all machines with the above MAC prefix get a specific kernel and NFS root 
> option passed to them.
> 
> The problem is that the 'dhcp-option' specification does not work. When a 
> machine gets a DHCP reply, option 17 is not passed. If I change the 
> dhcp-option to not check net: option, option 17 _is_ passed:
> 
> dhcp-host=00:50:C2:*:*:*,net:pe-xes
> dhcp-option=17,"/srv/nfsroot/powerpc"
> dhcp-boot=net:pe-xes,kernel-xes,build,192.168.2.1
> 
> But, I have a few other machines that have different NFS roots, so this isn't 
> a great option. Any ideas on what I am doing wrong?
> 

Do you have a more specific dhcp-host line which matches this host? 
dnsmasq will only find one dhcp-host line, so if there's another one 
matching the whole MAC address or hostname or similar, then it will use 
that, and not the one you show.

To get round this, use the dhcp-mac directive: replace your dhcp-hsot 
line with

dhcp-mac=pe-xes,00:50:C2:*:*:*

If that doesn't work, then there is a bug for sure.

Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list