dig 和 host/ping 使用相同的名称服务器进行不同的解析

dig 和 host/ping 使用相同的名称服务器进行不同的解析

我想这更多的是一个哲学问题。

记录已经改变,但dig似乎只看到了新的。ssh/ping等使用旧地址。

看到的记录的 TTLdig也正确滴答。

这真的是域名服务器响应不同还是只是隐藏的 DNS 缓存?

$ host -v boing
Trying "boing"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7276
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;boing.             IN      A

;; ANSWER SECTION:
boing.      1213    IN      CNAME   ec2-52-209-211-218.eu-west-1.compute.amazonaws.com.
ec2-52-209-211-218.eu-west-1.compute.amazonaws.com. 514066 IN A 52.209.211.218

Received 112 bytes from 192.168.0.1#53 in 1 ms

然而:

$ dig @192.168.0.1 boing

; <<>> DiG 9.10.4-P2 <<>> @192.168.0.1 boing
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34806
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

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

;; ANSWER SECTION:
boing.      3441    IN      CNAME   ec2-52-211-117-189.eu-west-1.compute.amazonaws.com.
ec2-52-211-117-189.eu-west-1.compute.amazonaws.com. 604641 IN A 52.211.117.189

;; Query time: 1 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Sat Sep 24 12:08:50 CEST 2016
;; MSG SIZE  rcvd: 123

相关内容