How to share names with dnsmasq?

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).

jaymmer - Reinstate Monica

Posted 2015-04-11T23:32:30.417

Reputation: 131

Answers

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.

BillThor

Posted 2015-04-11T23:32:30.417

Reputation: 9 384

How would this help? Can you be more specific? – jaymmer - Reinstate Monica – 2015-04-12T00:54:38.990

@jaymmer Edited response. This setting allows your DNSMasq server to lookup each other's entries. – BillThor – 2015-04-12T23:18:41.577

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 – 2015-04-14T00:24:28.447

@jammer It may work with both machines on the same domain. Try it. It would be cleaner with separate domains. – BillThor – 2015-04-14T02:44:51.787