cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Etc


Reference














.

protocol:dns:ttl.html



DNS

How to check TTL.

How to Check TTL with dig command

[root@centos7 ~]# dig google.com

; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7_2.3 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25853
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             196     IN      A       216.58.197.206

;; Query time: 45 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Wed May 31 22:19:09 JST 2017
;; MSG SIZE  rcvd: 55

[root@centos7 ~]#

[user01@centos7 ~]$ dig google.com | grep ^google.com
google.com.             287     IN      A       172.217.26.46
[user01@centos7 ~]$ 
[user01@centos7 ~]$ 
[user01@centos7 ~]$ dig google.com | grep ^google.com
google.com.             285     IN      A       172.217.26.46
[user01@centos7 ~]$ 
[user01@centos7 ~]$ dig google.com | grep ^google.com
google.com.             284     IN      A       172.217.26.46
[user01@centos7 ~]$ 
[user01@centos7 ~]$ while : ; do  echo -n "`date ` : " ; dig google.com | grep ^google.com ; sleep 1 ; done
Wed May 24 20:12:16 JST 2017 : google.com.              164     IN      A       172.217.26.46
Wed May 24 20:12:17 JST 2017 : google.com.              163     IN      A       172.217.26.46
Wed May 24 20:12:18 JST 2017 : google.com.              161     IN      A       172.217.26.46
Wed May 24 20:12:19 JST 2017 : google.com.              160     IN      A       172.217.26.46
Wed May 24 20:12:20 JST 2017 : google.com.              159     IN      A       172.217.26.46
Wed May 24 20:12:21 JST 2017 : google.com.              158     IN      A       172.217.26.46
^C





DNS




protocol/dns/ttl.html.txt ยท Last modified: 2017/05/31 by admin

Page Tools