[Dnsmasq-discuss] Using Vendor Class to determine range

Simon Kelley simon at thekelleys.org.uk
Fri Mar 4 16:51:10 GMT 2011


Michael P. McDonnell wrote:
> I understand this isn't EXACTLY the scenario I need to fix for - but I
> kind of want to learn what I'm doing wrong as well. (This will help me
> learn more about dhcp in general)
> 
> Here's my dnsmasq.conf:
> ###DNSMASQ CONF
> no-resolv
> no-poll
> dhcp-vendorclass=set:custom,"Magic Server"
> dhcp-range=tag:custom,10.230.240.50,10.230.240.150,12h
> dhcp-range=10.230.240.151,10.230.240.254,12h
> dhcp-script=/root/bin/doit
> log-queries
> log-dhcp
> #####END


The problem is that the second dhcp-range is still valid, even without
the tag set, as shown here:


> Mar  4 10:33:54 pxeserv dnsmasq[18619]: Available DHCP range:
> 10.230.240.50 -- 10.230.240.150
> Mar  4 10:33:54 pxeserv dnsmasq[18619]: Available DHCP range:
> 10.230.240.151 -- 10.230.240.254


You need to make that range out-of-bounds when the "custom" tag is set,
like this:

dhcp-range=tag:!custom,10.230.240.151,10.230.240.254,12h

and then renew the lease.


HTH

Simon.




More information about the Dnsmasq-discuss mailing list