Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I resolve a domain (let's say superuser.com), my request contacts the root servers, then the .com servers and they return the authoritative name servers for superuser.com... but do I get back the IPs of the name servers or I have to resolve again?

If you look at the name servers:

superuser.com.          32      IN      NS      ns3.serverfault.com.
superuser.com.          32      IN      NS      ns2.serverfault.com.
superuser.com.          32      IN      NS      ns1.serverfault.com.

Would I need to resolve also these? or the .com server would return the plain IP?

share|improve this question
    
You are probably never actually contacting the root domain servers, rather you are likely using a subordinate DNS server provided by your ISP, or some public DNS server like those run by Google. –  Andrew Lambert Jun 21 '13 at 0:22
    
I'm sure this must have been asked before but I can't find another question, so I guess I'll just answer :-) –  Celada Jun 21 '13 at 0:46
add comment

1 Answer

Nominally, a recursive resolver receives NS records when it gets a referral from an authoritative server. NS records, as you know, point to names, not IP addresses. However, the DNS protocol's response format has a provision for additional records, which is a collection of resource records that aren't part of the answer to the question that was asked but which the answering nameserver deems might be useful to the requester. Additional records are optional: sometimes the answering nameserver has such records to offer, and sometimes not, and that's ok.

An A or AAAA record for a nameserver that appears in the answer to a DNS query is one of the main uses for additional records. As the request originator, you might get such an additional record. If you do, you're lucky: it saves you from having to query for it. If you don't, it just means you have to issue an extra query.

In practice, most (all?) of the public delegation points (top-level gTLDs, second-level domains under many national registries, etc...) request the IP addresses of nameservers, not just their names, when domains are registered. This is so that they can place this information in the zone file as glue records, which are offered as additional records in responses.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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