Any time doing a migration of data from one IP to another where that data has a DNS record that points users towards the data, we need to keep the amount of time it takes to repoint the record to a minimum. To see the TTL of a given record, let’s run dig using +trace, +nocmd to turn off showing the version and query options, +noall to turn off display flags, +answer to still show the answer section of my reponse and most importantly for these purposes +ttlid to toggle showing the TTL on. Here, we’ll use these to lookup the TTL for the www.krypted.com A record:
dig +trace +nocmd +noall +answer +ttlid a www.krypted.com
The output follows the CNAME (as many a www record happen to be) to the A record and shows the TTL value (3600) for each:
www.krypted.com. 3600 IN CNAME krypted.com.
krypted.com. 3600 IN A 126.96.36.199
We can also lookup the MX using the same structure, just swapping out the a for an MX and the FQDN with just the domain name itself:
dig +trace +nocmd +noall +answer +ttlid mx krypted.com
The response is a similar output where
krypted.com. 3600 IN MX 0 smtp.secureserver.net.
krypted.com. 3600 IN MX 10 mailstore1.secureserver.net.
krypted January 23rd, 2014