![了解 dig@ip 地址](https://linux22.com/image/1621044/%E4%BA%86%E8%A7%A3%20dig%40ip%20%E5%9C%B0%E5%9D%80.png)
第一个dig命令中的ip地址起什么作用?
两次结果为何不同?
值 11 和 60 表示什么?
dig @1.1.1.1 instagram.com AAAA
; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> @1.1.1.1 instagram.com AAAA
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61356
;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;instagram.com. IN AAAA
;; ANSWER SECTION:
instagram.com. 11 IN AAAA 2406:da00:ff00::22e1:be08
instagram.com. 11 IN AAAA 2406:da00:ff00::3d7:facd
instagram.com. 11 IN AAAA 2406:da00:ff00::3e3:495a
instagram.com. 11 IN AAAA 2406:da00:ff00::22c4:a6ae
instagram.com. 11 IN AAAA 2406:da00:ff00::3d1:b623
instagram.com. 11 IN AAAA 2406:da00:ff00::3e6:95e
instagram.com. 11 IN AAAA 2406:da00:ff00::35e:9b98
instagram.com. 11 IN AAAA 2406:da00:ff00::22c0:373d
;; Query time: 135 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Fri Apr 17 00:26:29 GMT 2020
;; MSG SIZE rcvd: 279
dig instagram.com AAAA
; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> instagram.com AAAA
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 546
;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;instagram.com. IN AAAA
;; ANSWER SECTION:
instagram.com. 60 IN AAAA 2406:da00:ff00::3405:b701
instagram.com. 60 IN AAAA 2406:da00:ff00::36d1:47be
instagram.com. 60 IN AAAA 2406:da00:ff00::36d2:852d
instagram.com. 60 IN AAAA 2406:da00:ff00::3457:87a8
instagram.com. 60 IN AAAA 2406:da00:ff00::36a5:4ba
instagram.com. 60 IN AAAA 2406:da00:ff00::22c6:3041
instagram.com. 60 IN AAAA 2406:da00:ff00::3e1:6d03
instagram.com. 60 IN AAAA 2406:da00:ff00::3650:6426
;; Query time: 13 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Fri Apr 17 00:26:42 GMT 2020
;; MSG SIZE rcvd: 266
答案1
@IPAddress
告诉dig
要查询哪个 DNS 服务器。如果没有它,dig
则查询操作系统配置使用的任何 DNS 服务器(可能显示在 中/etc/resolv.conf
)。
结果可能会有所不同,因为 Instagram 或 Instagram 的 CDN 会给出不同的响应来进行负载平衡。或者可能是他们的 CDN 会将您引导到最接近您的 DNS 查询来源的不同 CDN 边缘节点/服务器。
11
在60
您的示例中是生存时间值,让 DNS 系统知道在重新查询更新的答案之前应该缓存这些答案多长时间。