[Dnsmasq-discuss] Custom DHCP Options

Simon Kelley simon at thekelleys.org.uk
Mon Aug 22 15:03:48 BST 2005


Michael Barnwell wrote:
> Hi,
> 
> I'm a little new to dnsmasq and I'm trying to set it up with several 
> custom options so my Sunray (thin net client) can pick up the right 
> settings.
> 
> This is what the custom settings look like in dhcpd.conf (It's been 
> tidied up a little but I don't think I missed anything important).
> 
> option space NewT;
> option NewT.AuthSrvr    code 21 = ip-address;
> option NewT.FWSrvr      code 31 = ip-address;
> option NewT.NewTVer     code 23 = text;
> option NewT.Intf        code 33 = text;
> option NewT.LogHost     code 24 = ip-address;
> option NewT.LogKern     code 25 = integer 8;
> option NewT.LogNet      code 26 = integer 8;
> option NewT.LogUSB      code 27 = integer 8;
> option NewT.LogVid      code 28 = integer 8;
> option NewT.LogAppl     code 29 = integer 8;
> 
> subnet 192.168.2.0 netmask 255.255.255.0 {
>         vendor-option-space NewT;
>         option NewT.AuthSrvr 192.168.0.2;
>         option NewT.FWSrvr 192.168.0.2;
>         option NewT.NewTVer "3.0_51,REV=2004.11.10.16.18";
>         range 192.168.2.2 192.168.2.254;
> }
> 
> How can I make these work in dnsmsaq? I understand I need to use the 
> dhcp-option and dhcp-vendorclass options but I can't understand the 
> format it's suppose to be in.


Try this: it's untested, but should be more-or-less correct. Please feel 
free to come back if it doesn't work. Note that this checks for clients 
which present vendor-class "NewT", you should include another dhcp-range 
for host which don't.

# set tag "newt" when a client sends vendor-class "NewT"
dhcp-vendorclass=newt,NewT

# send vendor-class encapsulated options when "newt" tag set....
dhcp-option=newt,vendor:NewT,21,192.168.0.2   #AuthSrvr
dhcp-option=newt,vendor:NewT,31,192.168.0.2   #FWSrvr
dhcp-option=newt,vendor:NewT,23,"3.0_51,REV=2004.11.10.16.18" #NewTVer

# Use this range for address allocation when tag "newt" set
dhcp-range=newt,192.168.2.2,192.168.2.254


Cheers,

Simon.




If I've guessed correctly that the "range 192.168.2.2 192.168.2.254;" in 
the ISC config sets up a decicated rangerq

> 
> I'm using dnsmsaq version 2.22 on IPCop version 1.4.6 with a 2.4.29 kernel.
> 
> Thanks,
> 
> Michael Barnwell.
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list