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

;; QUESTION SECTION:
;ms.mff.cuni.cz.          MX

;; ANSWER SECTION:
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.

;; AUTHORITY SECTION:
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.

;; ADDITIONAL SECTION:
smtp1.ms.mff.cuni.cz.     A     195.113.20.4
smtp2.ms.mff.cuni.cz.     A     195.113.20.5
smtp1.kolej.mff.cuni.cz.  A     195.113.24.4
smtp1.kolej.mff.cuni.cz.  AAAA  2001:718:1e03:a01::4
ns.ms.mff.cuni.cz.        A     195.113.20.71
ns.kolej.mff.cuni.cz.     A     195.113.24.1
sns.ms.mff.cuni.cz.       A     195.113.20.77
golias.ruk.cuni.cz.       A     195.113.0.2

;; SERVER: 195.113.20.71#53(195.113.20.71)

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.

Byl pro Vás tento návod užitečný?