On Tue, Jul 13, 2010 at 10:20 PM, [email protected] < [email protected]> wrote:
> On Tue, Jul 13, 2010 at 9:57 PM, Lord_Devi <[email protected]> wrote: > >> On Tue, 2010-07-13 at 18:55 -0500, [email protected] 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,192.168.1.50,192.168.0.150 >> >> and >> >> dhcp-range=set:lan2,192.168.2.50,192.168.0.150 >> > > 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 > "net:tagname". > > >> >> Note the set:lan1 and set:lan2. And then perhaps later on in the same >> configuration something like the following: >> >> server=/lan1/192.168.1.1 >> server=/lan2/192.168.2.1 > > > Here you'd use: > > dhcp-option=tag:lan1,option:gateway,192.168.1.1 > dhcp-option=tag:lan2,option:gateway,192.168.2.1 > oops, should be option:router There's even an example in the man page. http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html > > 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> >> >> >
