Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of the five fields of the ANSWER SECTION in dig query

Tags:

dns

dig

Here is the ANSWER SECTION when I run dig www.google.com:

;; ANSWER SECTION: www.google.com.         108     IN      A       74.125.239.115 www.google.com.         108     IN      A       74.125.239.114 www.google.com.         108     IN      A       74.125.239.116 www.google.com.         108     IN      A       74.125.239.113 www.google.com.         108     IN      A       74.125.239.112 

I think the first field contains the URL and the second field contains the port number. I am not sure about the third and fourth fields. I think the fifth field contains the IP address.

I've reviewed http://www.madboa.com/geek/dig/ and https://kb.mediatemple.net/questions/909/Understanding+the+dig+command, and am still unsure what each section represents.

like image 965
user3051464 Avatar asked Nov 30 '13 06:11

user3051464


People also ask

What is answer section in dig command?

The “ANSWER” section provides us with an answer to our question. As we already mentioned, by default dig will request the A record. Here, we can see that the domain linux.org points to the 104.18. 59.123 IP address.

What is the additional section in dig?

The Additional Section provides any extra information that may be wanted but not specifically requested by dig. In this example, the Additional Section displays the IP addresses of the authoritative nameservers. Another example of a common lookup using dig would be to look up the mx, mail exchange, record for a domain.

What does the dig command do in Linux?

The dig command in Linux is used to gather DNS information. It stands for Domain Information Groper, and it collects data about Domain Name Servers. The dig command is helpful for troubleshooting DNS problems, but is also used to display DNS information.


1 Answers

Reference: http://www.zytrax.com/books/dns/ch15/#answer and http://www.zytrax.com/books/dns/ch8/a.html

The first field is the NAME: The domain name being returned

The second field (108 in your example) is the TTL in seconds.

IN is the CLASS. Here, IN stands for Internet.

A is the TYPE. Here, A stands for mapping a domain name to an IPv4 address.

The last field is of course the IP Address.

like image 75
Vliu Avatar answered Oct 02 '22 12:10

Vliu