[Dnsmasq-discuss] DHCP - multiple ranges on the same interface
Simon Kelley
simon@thekelleys.org.uk
Sun, 23 Jan 2005 12:19:14 +0000
Mark Wiater wrote:
> Hello,
>
> I'm hoping you can help guide me in the right direction with this.
>
> I've got a situation where i need to use the dhcp-vendorclass option...
>
> I want to reserve a small block of addresses for those hosts who present
> a specific vendor id, all others get an address out of the pool without
> an associated network id.
>
> This is the relevant configuration:
>
> dhcp-range=test,172.16.1.4,172.16.1.15,1h
>
> dhcp-range=172.16.1.32,172.16.1.199,12h
> dhcp-vendorclass=test,vendor.class.identifier
> dhcp-option=test,176,opt1=10.0.0.50,opt2=1719,opt3=10.0.0.49
> dhcp-option=7,172.16.1.1
>
>
For the record, this is possible from version 2.20 on. That release adds
a new feature; if the network-id tag in a dhcp-range option is preceeded
by "net:" then it is used to filter that range rather than being added
to the list of network ids.
So
dhcp-vendorclass=test,vendor.class.identifier
dhcp-range=net:test,172.16.1.4,172.16.1.15,1h
dhcp-range=172.16.1.32,172.16.1.199,12h
Will set the "test" tag only when the vendor class matches, and in that
case will use the 172.16.1.4,172.16.1.15 range. All other requests will
ignore the 172.16.1.4,172.16.1.15 and use only the
172.16.1.32,172.16.1.199 range.
Simon.