0

How to forward DNS query from the server 1 (NS1) to another DNS server 2 (NS2) when the requested query is not found in server 1 (NS1).

Eg: I've two DNS servers (NS1, NS2)

On NS2 I've a zone (host1.ns2example.vm)

On NS1 named.conf "options" I've added "forwarders { 10.277.125.76;};" //This is the IP address of NS2.

When I try to ping host1.ns2example.vm from Windows command prompt the url is not resolving but when I try to ping the NS1 zone, I can see the response.

Expected Result: I should be able to get the IP address of the NS2 when I try to ping the NS2 zone (host1.ns2example.vm) from the windows command prompt!

Please share your knowledge on this.

Thank you. Hari

Krish
  • 1
  • 1

1 Answers1

0

You misunderstand completely the concept of zone replication and the concept of forwarding.

First, forwarding is used for cases when a DNS zone isn't local. Global forwarding list is used to add defaults for every zone that doesn't have forwarders configured explicitly. When the forwarding is used, it means the server knows nothing bout a zone. Au contraire, when the NS has the local zone configured, it interprets this fact that I know everything about this zone and i serve it.

Thus, is zone is master-slave replicated, both NSes (or ever the whole chan of NSes), or the whole chain should have complete and consistent copies of given zone. Thie situation when you sequentually ask all of the NSes in case someone knows anything about a host is a nonsense. If you configured properly your NSes, then an NXDOMAIN answer is authoritative, and it stands for a given TTL timeout.

Furthermore, if for some reason one of the NSes doesn't answer at all, or is answering with SERVFAIL, the client resolver asks all of the other NSes for a zone automatically, without using the forwarder list. This design is the core functionality of the whole DNS system.

drookie
  • 8,051
  • 1
  • 17
  • 27
  • Hi, Thank you for your quick reply. I'm not sure I completely understand the concept. I'm not sure how to resolve my query i.e., Scenario 1: When a client (Windows) sends a query to the DNS server (Say DNSServer1) (www.example.com) it sends back the IP address of (www.example.com) since it is already registered on that particular server (Which is good). Scenario 2, if client makes another request (www.exampleDNS2.com) to the same DNSServer1 it should be able to resolve the query and send back the IP address of www.exampleDNS2.com) which is registered in someother DNS server(say DNSServer2). TQ – Krish Oct 05 '17 at 16:12
  • Scenario 2 is a recursive query which is well documented and easily googled. – Brandon Xavier Oct 05 '17 at 21:55