Hello.<br><br>I have a fairly simple home network, to which I have recently added a second subnet to for my virtual machines. While my primary DNS/DHCP server is a Dnsmasq instance running on my DD-WRT router, my second subnet is hosted from a machine inside the Lan. On that machine I run multiple virtual machines, and desire to serve DHCP and DNS information to them from a second Dnsmasq instance running on the first virtual machine. However I&#39;ve managed to confuse myself greatly on this subject going through the Dnsmasq archives. So I will simply try to state my intentions and current configuration as clearly as possible, and hope someone can clarify some things for me.<br>
<br>My current network resembles the following:<br><br>Subnet A:<br>
 Network Range: <b><a href="http://192.168.1.0/24">192.168.1.0/24</a></b><br>
 <i>Gateway 1A</i>: <b><a href="http://192.168.1.1/255.255.255.0">192.168.1.1/255.255.255.0</a></b> (This is my DD-WRT router which provides internet access)<br>
  Gateway Interfaces:<br>
  <i>br0</i>: <b><a href="http://192.168.1.1/255.255.255.0">192.168.1.1/255.255.255.0</a></b><br>
  <i>vlan1</i>: <b><a href="http://70.76.84.224/255.255.252.0">70.76.84.224/255.255.252.0</a></b><br>DNS / DHCP (Dnsmasq): <b>192.168.1.1</b> (Both served from the above DD-WRT router)<br>
 LAN Domain: tec.lan<br>
 Example <i>Host 1A</i>: <b>perpetrator.tec.lan - 
<a href="http://192.168.1.10/255.255.255.0">192.168.1.10/255.255.255.0</a></b><br>
 Example <i>Host 2A</i>: <b>rapine.tec.lan - <a href="http://192.168.1.12/255.255.255.0">192.168.1.12/255.255.255.0</a></b><br>
<br>
Subnet B:<br>
 Network Range: <b><a href="http://192.168.2.0/24">192.168.2.0/24</a></b><br>
 <i>Gateway 1B</i>: <b><a href="http://192.168.2.1/255.255.255.0">192.168.2.1/255.255.255.0</a></b> (This is my internal machine which hosts my virtual machines)<br>
  Gateway Interfaces:<br>
  <i>eth0</i>: <b><a href="http://192.168.1.11/255.255.255.0">192.168.1.11/255.255.255.0</a></b><br>
  <i>eth1</i>: <b><a href="http://192.168.2.1/255.255.255.0">192.168.2.1/255.255.255.0</a><br></b>DNS / DHCP (Dnsmasq): <b>192.168.2.2</b> (This is the very first virtual machine hosted on Gateway 1B)<br>
 LAN Domain: tec.lan<br>
 Example <i>Host 1B</i>: <b>ubuntu-01.tec.lan - 
<a href="http://192.168.2.10/255.255.255.0">192.168.2.10/255.255.255.0</a></b><br>
 Example <i>Host 2B</i>: <b>ubuntu-02.tec.lan - 
<a href="http://192.168.2.11/255.255.255.0">192.168.2.11/255.255.255.0</a><br>
</b><br><br>First off I have to say that working with multiple subnets in such a manner is a new task for me, and I may indeed be going about things improperly in relation to Dnsmasq here. But what I have been trying to do up until now is have client machines on Subnet B use 192.168.2.2 as their DHCP and DNS server, and have it so when they need DNS information for either Subnet A, OR the Internet itself, they would then pass queries on to the Dnsmasq server on 192.168.1.1. In effect, sort of chaining requests.. I have attempted things like manually adding both 192.168.1.1 and 192.168.2.2 to /etc/resolv.conf on guest machines hosted on Subnet B, but have had mixed results with that.For instance if I list 192.168.2.2 FIRST in /etc/resolv.conf on those machines they can get DNS queries for ubuntu-01.tec.lan just fine say, but when I ask them about rapine.tec.lan or <a href="http://google.ca">google.ca</a>, they do not get resolved. (I had thought that if a domain to be resolved was not found on the first nameserver inside resolv.conf, they would then ask the second in the list and THEN get the results needed. But it does not appear to work this way.)<br>
<br>So then I thought maybe, clients on Subnet A could be configured to ask ONLY 192.168.2.2 for DNS information, and then the Dnsmasq server on 192.168.2.2 would then itself know to ask 192.168.1.1 for DNS information for which it itself did not know about. So to that end, I appended the following line to my dnsmasq.conf file on <a href="http://192.168.2.2">192.168.2.2</a>:<br>
<br>server=192.168.1.1<br><br>This seems to allow machines on Subnet B to be able to contact rapine.tec.lan and <a href="http://google.ca">google.ca</a> just fine. However when I tried to add:<br><br>server=192.168.2.2<br>
<br>to Gateway 1A: to try to get my Dnsmasq on <a href="http://192.168.1.0/24">192.168.1.0/24</a> to ask 192.168.2.2 about machines on the <a href="http://192.168.2.0/24">192.168.2.0/24</a> subnet, all my Subnet A client machines then started to have problems and delays when trying to resolv information for the Internet. So obviously I was doing something wrong.. At this point I am kind of stuck. I fear I have confused myself greatly and am having great difficulties figuring this one out.<br>
<br>Even if there is an option I can add to my Dnsmasq server on Gateway 1A to achieve my ends, I would still be left with a sense of unease that I may not be doing things correctly in the first place. If someone could both help me configure this so that machines on both Subnet A and B can resolv each other fine, AND help instruct me a bit on the &quot;best practises&quot; of such a configuration I would  be very appreciative!!<br>
<br>Following I have pasted the contents of my relevant dnsmasq.conf files to demonstrate further what it is I am CURRENTLY doing.<br><br>Subnet A&#39;s relevant dnsmasq.conf on <a href="http://192.168.1.1">192.168.1.1</a>:<br>
<br>interface=br0<br>resolv-file=/tmp/resolv.dnsmasq<br>domain=tec.lan<br>dhcp-leasefile=/tmp/dnsmasq.leases<br>dhcp-lease-max=54<br>dhcp-option=lan,3,192.168.1.1<br>dhcp-authoritative<br>dhcp-range=lan,192.168.1.100,192.168.1.149,255.255.255.0,1440m<br>
<br><br>Subnet B&#39;s relevant dnsmasq.conf on <a href="http://192.168.2.2">192.168.2.2</a>:<br><br>interface=eth0<br>domain=tec.lan<br>dhcp-leasefile=/tmp/dnsmasq.leases<br>dhcp-lease-max=54<br>dhcp-option=option:router,192.168.2.1<br>
dhcp-authoritative<br>dhcp-range=lan,192.168.2.100,192.168.2.149,255.255.255.0,1440m<br>server=192.168.1.1<br>expand-hosts<br><br><br>(An example of the sort of things I am uncertain about, is how you might notice I have &quot;dhcp-authoritative&quot; set on both of my Dnsmasq servers. I have a feeling this is wrong, and even IF I was getting the network DNS resolutions I am looking for, am not sure if that is correct.)<br>
<br>Please help unconfuse me!!<br><br>Best regards, <br>  Casey Quibell.<br><br>p.s. If there is any further information I can provide to help in diagnosing my issue, please ask!<br><br>