dig 查詢 DNS TTL (Time to Live)

2021052511:59
 
$ dig +noall +nocmd +answer nidbox.com
nidbox.com.             18000   IN      A       107.167.188.58
  18000秒 即 TTL
 
 $ dig +noall +nocmd +answer google.com google.com. 103 IN A 172.217.27.142
  103秒 即 TTL


若懶得記參數,可以
$ dig nidbox.com

; <<>> DiG 9.10.3-P4-Raspbian <<>> nidbox.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49605
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

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

;; ANSWER SECTION:
nidbox.com.             18000   IN      A       107.167.188.58

;; Query time: 41 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Wed Jun 09 19:00:35 CST 2021
;; MSG SIZE  rcvd: 55
 
$ dig google.com

; <<>> DiG 9.10.3-P4-Raspbian <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15957
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

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

;; ANSWER SECTION:
google.com.             178     IN      A       216.58.200.46

;; Query time: 24 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Wed Jun 09 19:01:39 CST 2021
;; MSG SIZE  rcvd: 55