[Dnsmasq-discuss] Re: DNSMASQ - multiple default routes, dependent on address assigned?

Simon Kelley simon at thekelleys.org.uk
Wed Nov 26 13:53:15 GMT 2008


John Grant wrote:
> 
> On 25 Nov 2008, at 21h08, Simon Kelley wrote:
> 
>  > John Grant wrote:
>  >> If I am handing out address on multiple networks and each one has  
> specific settings, e.g. each ip range has a different default gateway,  
> how would I let dnsmasq know which dhcp-option went with each address  
> assignment?
> 
>  > Two steps: first tag each dhcp-rangem statement
> 
>  > dhcp-range=red-net,192.168.1.0.........
> 
>  > then tag options which are for a particular range with the same tag
> 
>  > dhcp-option=red-net,3,192.168.0.4
> 
>  > untagged options will containue to be sent to all clients.
> 
>  > Note that is the deafult route is through the machine running 
> dnsmasq, then the defaults will be correct, without any configuration.
> 
>  > Cheers,
> 
>  > Simon.
> 
> 
> Thanks for that, I had the name and option number the wrong way around!
> 
> On a very related note, I have many dhcp-ranges defined, derived from 
> dhcp-mac and client-ids, and I put  them together,
> oh what the heck, here is an extract:
> 
> dhcp-range=net:radio-ethernet,172.20.4.1,172.20.4.254,255.255.0.0,168h
> dhcp-range=net:radio-wireless,172.21.6.1,172.21.6.254,255.255.0.0,168h
> dhcp-range=net:ipod-wireless,172.21.7.1,172.21.7.254,255.255.0.0,168h
> 
> then to make the option specifications easier, I put them together:
> 
> dhcp-range=network-ethernet,172.20.0.0,172.20.255.255
> dhcp-range=network-wireless,172.21.0.0,172.21.255.255
> 
> unfortunately dnsmasq then thinks that these ranges are OK to give out!
> I put a catch-all network ahead of these lines:
> 
> dhcp-range=172.20.6.1,172.20.6.254,12h
> 
> in the hope that it would offer up that range first, but is there a 
> better way?
> 
> ---
> john
> 


If you need to make a subnet valid for fixed IP addresses, without 
giving dynamic addresses over the whole subnet, just do

dhcp-range=172.20.0.0,static

I'm not quite sure that's what you're trying to achieve, if it isn't, 
please explain more.

Simon.




More information about the Dnsmasq-discuss mailing list