[Dnsmasq-discuss] Specifying boot options for specific type of hardware.

Simon Kelley simon at thekelleys.org.uk
Sun Aug 21 15:41:42 BST 2005


Josef Wolf wrote:
> On Sun, Aug 21, 2005 at 12:37:43PM +0100, Simon Kelley wrote:
> 
> Thanks for the quick answer!
> 
> 
>>>I would like to specify specific boot options for a set of machines which
>>>can be identified by the first three MAC octetts. I have tried this:
>>>
>>>dhcp-range=192.168.1.130,192.168.1.150,15m
>>>dhcp-range=192.168.1.155,192.168.1.190,15m
>>>dhcp-host=00:50:9c:*:*:*,myvendor
>>>dhcp-boot=net:myvendor,/tftpboot/myvendor-boot,tftpserver,192.168.1.253
>>>
>>>But this (obviously) fails because dhcp-host gives no way to set a
>>>network-id.
>>>
>>
>>You can set the network-id in the dhcp-host, your example is almost 
>>correct, just change the dhcp-host line to:
>>
>>dhcp-host=00:50:9c:*:*:*,net:myvendor
> 
> 
> Hmm, the man-page seems to be inaccurate here.  The dhcp-host section
> refers to the dhcp-range section for the <network-id> description.  But
> the dhcp-range section says:
> 
>    When it is prefixed with 'net:' then its meaning changes from setting
>    a tag to matching it.
> 
> That is, the meaning is reversed.

Sorry, it's actually the configuration language which is inconsistent. 
In a dhcp-host line, network-ids _must_ be prefixed by "net:". A name 
not prefixed by "net:" (as in your example) will be interpreted as a 
hostname. For dhcp-host lines, only tag setting function is available, 
not the matching function. I'll try and make the man page clearer (it is 
confusing), but the real fix for this is a dnsmasq version 3, with 
properly designed configuration language.


> 
> 
> An other problem is the specification of the ip-address.  When I omit the
> ip-address from the dhcp-host setting, I get
> 
>    BOOTP(eth0) 00:03:12:54:ab:de no address configured
> 
> How do I specify that for the given range of mac addresses dynamic
> ip-adresses should be used?
> 

 From that log line, it looks like your host is using BOOTP, not DHCP. 
BOOTP is a older subset of DHCP, and doesn't support dynamic address 
allocation. Unless you can persuade your hosts to do DHCP, you will have 
to use static address allocation.

HTH

Simon.




More information about the Dnsmasq-discuss mailing list