解决方法
使用dig你可以检查记录的TTL – 就像这样:
; <<>> 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
具体来说,你需要注意答案中的值(在这种情况下为1800)
;; ANSWER SECTION: www.serverfault.com. 1800 IN CNAME serverfault.com. serverfault.com. 1800 IN A 64.34.119.12
1800是TTL到期之前的秒数,并且在名称服务器上刷新记录(8.8.8.8).
如果您运行该命令几次,您将看到TTL编号下降,因此截至编写本文时,TTL现在是这样(1659秒)
;; ANSWER SECTION: www.serverfault.com. 1659 IN CNAME serverfault.com. serverfault.com. 1659 IN A 64.34.119.12