0

I have two subnets A and B, and their respective name servers both forward queries to local name server M, which finally forwards queries to the internet. All name servers run dnsmasq. On both subnets, local names are correctly resolved (i.e. on subnet A, nslookup works for all machines in A, and likewise for B), but names on the other subnet are not.

What would be the best way to resolve this? I'm thinking there should be some magical feature in dnsmasq that would let the subnet name servers to push all local hostnames to M, but I haven't found a such option (yet).

1

The server option allows you to specify a local server for a domain. This allows you to indicate to one DNSmasq server the presence of the other server and the sub-domain that it handles. The server will then query the other server for names belonging to that sub-domain.

An entry like this should work:

server=/subdomain.example.com/2.0.192.in-addr-arpa/192.0.2.5

Use appropriate values for your network. You will need to configure both DNSMasq servers to reference the other.

If you want to look-up hosts without specifying a FQDN (Fully Qualified Domain Name), you will need to provide an appropriate DNS search list. Configuring DHCP options is documented in the dnsmasq man page.

  • How would this help? Can you be more specific? – jaymmer - Reinstate Monica Apr 12 '15 at 0:54
  • @jaymmer Edited response. This setting allows your DNSMasq server to lookup each other's entries. – BillThor Apr 12 '15 at 23:18
  • If I understood the answer correctly, this would require both IP subnets to be on separate DNS subdomains... is this correct? Currently, all machines are on the same domain. Is this a bad/"wrong" setup? – jaymmer - Reinstate Monica Apr 14 '15 at 0:24
  • @jammer It may work with both machines on the same domain. Try it. It would be cleaner with separate domains. – BillThor Apr 14 '15 at 2:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.