[Dnsmasq-discuss] Mutliple Subnets - Different Servers - Chaining

richardvoigt at gmail.com richardvoigt at gmail.com
Wed Jul 14 04:20:58 BST 2010

On Tue, Jul 13, 2010 at 9:57 PM, Lord_Devi <lorddevi at gmail.com> wrote:

> On Tue, 2010-07-13 at 18:55 -0500, richardvoigt at gmail.com wrote:
> > If you visit http://www.thekelleys.org.uk/ you will see that dnsmasq
> > is not a relay, but there is a separate program dhcp-helper from the
> > same author to act as a relay.
> >
> > dnsmasq's dhcp server supports issuing addresses both directly and
> > indirectly (via a relay).  For direct dhcp, it will find the ip
> > address assigned to the interface where the request came in and give
> > out an address from a dhcp-pool in the same block (defined by the
> > subnet mask).  For indirect dhcp, the relay tells dnsmasq the address
> > of the interface where the request was received, all you have to do is
> > configure a dhcp-pool in the same block as the relay's interface which
> > faces toward the clients.
> >
> > Hope this helps.
> Oh yes ok this does help a bit. I found a thread in the dnsmasq archives
> demonstrating how simple defining a seperate pool is in dnsmasq as well.
> However I could still find no working examples on how to configure that
> pool to distribute a DIFFERENT gateway than the first pool recieves. It
> seems to me that the trick might be in 'labeling' the two subnets.
> Something like the following:

I guess I missed the part about needed different gateways.  dnsmasq tends to
do something sensible, direct leases get the IP address of the dnsmasq
server while indirect leases get the relay agent as gateway.  But in some
environments that isn't adequate.

> dhcp-range=set:lan1,,
> and
> dhcp-range=set:lan2,,

That's exactly right so far, be warned that for the "set:tagname" you need a
very recent (>= 2.53) version of dnsmasq.  2.52 and earlier versions used

> Note the set:lan1 and set:lan2. And then perhaps later on in the same
> configuration something like the following:
> server=/lan1/
> server=/lan2/

Here you'd use:


and again, the syntax for 2.52 and earlier versions is "net:tagname".  Yes
that's the same syntax for both setting and tag and matching it -- that's
why it got changed in version 2.53.

> But still.. Just blindly attempting this is to see if it works is
> something I call the 'dart board method' throwing random commands or
> configuration statements at my daemons or utilities in desperate hope
> they will begin doing what I wish them to do. Because this is such an
> important project, I would still feel very relieved if someone could
> demonstrate for me exactly how this might look when done correctly.
> Thank you again for all your help,
>   Casey Quibell <Lord_Devi>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20100713/bd59aacf/attachment.htm 

More information about the Dnsmasq-discuss mailing list