DNS protocol – additional and authoritative section of the DNS response

  DNS, DNS theory, Protocol of DNS

DNS servers have an additional relation between names and IP addresses. If you are asking some DNS server for NS or MX record (which contains the name) and the server has authoritative information about IP addresses for obtained names, it returns to us additional section in packet (packets) DNS responses and these IP addresses.

In the next section, the authority section is also returned NS records for the domain(and in an additional section can be found appropriate IP addresses to these NS records). The purpose of these two sections is obvious, it saves us a lot of other possible inquiries for IP addresses to all obtained records.

We will ask the DNS server ns.ms.mff.cuni.cz for MX records for the domain ms.mff.cuni.cz with a detailed dump of the result (to simplify have been deleted some uninteresting rows and columns):

;ms.mff.cuni.cz.          MX

ms.mff.cuni.cz.           MX    20 smtp2.ms.mff.cuni.cz.
ms.mff.cuni.cz.           MX    40 smtp1.kolej.mff.cuni.cz.
ms.mff.cuni.cz.           MX    20 smtp1.ms.mff.cuni.cz.

ms.mff.cuni.cz.           NS    golias.ruk.cuni.cz.
ms.mff.cuni.cz.           NS    ns.ms.mff.cuni.cz.
ms.mff.cuni.cz.           NS    ns.kolej.mff.cuni.cz.
ms.mff.cuni.cz.           NS    sns.ms.mff.cuni.cz.

smtp1.ms.mff.cuni.cz.     A
smtp2.ms.mff.cuni.cz.     A
smtp1.kolej.mff.cuni.cz.  A
smtp1.kolej.mff.cuni.cz.  AAAA  2001:718:1e03:a01::4
ns.ms.mff.cuni.cz.        A
ns.kolej.mff.cuni.cz.     A
sns.ms.mff.cuni.cz.       A
golias.ruk.cuni.cz.       A


We can see that server really told us all known IP addresses to all names in responses and save to us and himself a lot of further work with other requests.