Greatestswordsman Asked: 2012-02-24 21:11:59 +0800 CST2012-02-24 21:11:59 +0800 CST 2012-02-24 21:11:59 +0800 CST Check remaining TTL for nameserver 772 Is it possible to check how much time is left before a nameserver like 8.8.8.8 will update its records from my nameserver? domain-name-system bind domain nameserver 2 Answers Voted Best Answer thinice 2012-02-24T21:18:06+08:002012-02-24T21:18:06+08:00 Using dig you can check the TTL of a record - like so: ; <<>> DiG 9.7.3 <<>> @8.8.8.8 www.serverfault.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3937 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.serverfault.com. IN A ;; ANSWER SECTION: www.serverfault.com. 1800 IN CNAME serverfault.com. serverfault.com. 1800 IN A 64.34.119.12 ;; Query time: 88 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Thu Feb 23 23:15:23 2012 ;; MSG SIZE rcvd: 67 Specifically, you'll want to pay attention to the values in the answer (1800 in this case) ;; ANSWER SECTION: www.serverfault.com. 1800 IN CNAME serverfault.com. serverfault.com. 1800 IN A 64.34.119.12 1800 is the number of seconds until the TTL expires and the record is refreshed on the nameserver (8.8.8.8). If you run the command a few times, you'll see the TTL number go down, so as of the time of writing this, the TTL is now like so (1659 sec) ;; ANSWER SECTION: www.serverfault.com. 1659 IN CNAME serverfault.com. serverfault.com. 1659 IN A 64.34.119.12 Dave 2012-02-25T18:32:50+08:002012-02-25T18:32:50+08:00 For Windows (natively) you can use nslookup. C:\>nslookup -debug www.serverfault.com 8.8.8.8 Got answer: HEADER: opcode = QUERY, id = 4, rcode = NOERROR header flags: response, want recursion, recursion avail. questions = 1, answers = 2, authority records = 0, additional = 0 QUESTIONS: www.serverfault.com, type = A, class = IN ANSWERS: -> www.serverfault.com canonical name = serverfault.com ttl = 1791 (29 mins 51 secs)** -> serverfault.com internet address = 64.34.119.12 ttl = 1791 (29 mins 51 secs)**
Using
dig
you can check the TTL of a record - like so:Specifically, you'll want to pay attention to the values in the answer (1800 in this case)
1800 is the number of seconds until the TTL expires and the record is refreshed on the nameserver (8.8.8.8).
If you run the command a few times, you'll see the TTL number go down, so as of the time of writing this, the TTL is now like so (1659 sec)
For Windows (natively) you can use
nslookup
.C:\>nslookup -debug www.serverfault.com 8.8.8.8