lundi 8 décembre 2014

How to understand TTL values in dig command output?


I am reading about how DNS works in general. From the wiki entry of TTL, I understand TTL (Time to Live) occur in the Domain Name System (DNS), where they are set by an authoritative name server for a particular resource record. When a caching (recursive) nameserver queries the authoritative nameserver for a resource record, it will cache that record for the time (in seconds) specified by the TTL.


Now, I needed to use the Linux CLI tools (dig) to figure out what is the actual TTL set in the authoritative name server and so used my command as below.



dig +trace +nocmd +noall +answer +ttlid a http://ift.tt/fyw30c

#I have omitted the root name server output for better readability.

http://ift.tt/fyw30c. 300 IN CNAME stackoverflow.com.
stackoverflow.com. 300 IN A 198.252.206.140
;; Received 80 bytes from 173.245.59.4#53(cf-dns02.stackoverflow.com) in 9 ms


As I could see from the A record of stackoverflow.com., the TTL value in the authoritative name server is 300.


So, does this mean, if I search for stackoverflow.com after 300 seconds or 5 minutes, the IP address of stackoverflow.com would be resolved all the way from the .com domain?



Aucun commentaire:

Enregistrer un commentaire