Forum Discussion

Earvin_247775's avatar
Earvin_247775
Icon for Altocumulus rankAltocumulus
Oct 02, 2017

How does Root Servers answers DNS query if you have two GTM?

Hi F5 Experts,

 

I just want to ask how does a root server answers DNS query for a domain with multiple name server? is it by random or in order?

 

For example, i have 2 Datacenters with 1 gtm each. my domain ej.com has 2 name servers which are GTM1(121.56.42.11) and GTM2(203.55.13.65).

 

my question is if a user queries , how does .com root server decide which NS record it will forward to user? Is it always GTM1, or randomly between GTM1 and GTM2 floating IP?

 

2 Replies

  • Hi Earvin,

     

    The DNS Server that requests the NS records from the root servers (as well as next level down, etc), makes a request for all NS records for the domain. The authoritative servers return all relevant NS records for the domain.

     

    It is then up to the DNS server making the final A record request to pick one of the available NS records, and make the query there.

     

    If the NS does not respond, then after the time-out has passed, it queries the next one.

     

    You will find that the Users (computers) themselves will rarely, if ever, have the NS records for your domain since they query either their organisation's DNS Servers, or the ISP. These servers typically recurse on the client's behalf, and are the ones that get the NS records in their cache, and choose on a random/round robin basis (depends on implementation) NS to query.

     

    Typically, the distribution of the requests should be pretty equal across all NS records.

     

    Hope that clarifies things for you a little bit.

     

    Regards,

     

    JohnB

     

  • Here's one more Q&A asking the same stuff. Hope it helps.

     

    Quoting from previous article,

     

    ok, so you will delegate your sub zone wip to two GTMs. when client will request for its resolution, the public server will advertise a cname to the wip subzone and both GTMs as NS for this subzone. don't remember if it's in the same responseor a second one but it doesn't mater. At one time you client (ldns) will receive both GTM IP as NS for the subzone and he will pick up one! which one is depending on the public DNS server advertising NS in different order and ability of your client to manager two NS for a zone.

     

    But this should not be imporant, either one will be choosen by the client. Why it is not important : first GTM are synchronize in a GTM group, which means they have the same view of your network, they exchange states, persistence records, ie if you send a request at the same time on both they should give you same response. secondo, if you have latencies for example one GTM in the US another one in europe, the DNS querie is just a one time action, meaning you will suffer from RTT just for the resolution request.