如果CNAME的TTL为1小时,指向TTL为1分钟的A记录,那么查找此CNAME的人将整个结果缓存1小时,或者是否会继续每次查找A记录1分钟?
解决方法
通过使用dig,您可以看到CNAME和后续记录具有不同的TTL.
dig docs.nwesd.org ; <<>> DiG 9.5.1-P3 <<>> docs.nwesd.org ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY,status: NOERROR,id: 28244 ;; flags: qr rd ra; QUERY: 1,ANSWER: 3,AUTHORITY: 4,ADDITIONAL: 4 ;; QUESTION SECTION: ;docs.nwesd.org. IN A ;; ANSWER SECTION: docs.nwesd.org. 7200 IN CNAME ghs.google.com. ghs.google.com. 16662 IN CNAME ghs.l.google.com. ghs.l.google.com. 195 IN A 74.125.95.121 ;; AUTHORITY SECTION: google.com. 32196 IN NS ns1.google.com. google.com. 32196 IN NS ns4.google.com. google.com. 32196 IN NS ns3.google.com. google.com. 32196 IN NS ns2.google.com. ;; ADDITIONAL SECTION: ns1.google.com. 32193 IN A 216.239.32.10 ns2.google.com. 32193 IN A 216.239.34.10 ns3.google.com. 70187 IN A 216.239.36.10 ns4.google.com. 242861 IN A 216.239.38.10 ;; Query time: 102 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 18:40:05 2010 ;; MSG SIZE rcvd: 232
要显示您同时获得CNAME及其指向的内容,请在递归服务器的单个请求中返回.
18:40:05.418435 IP 192.168.32.10.24712 > 216.146.36.113.53: UDP,length 43 0x0000: 4500 0047 4e58 0000 4011 4e98 c0a8 200a E..GNX..@.N..... 0x0010: d892 2471 6088 0035 0033 aae5 f66c 0100 ..$q`..5.3...l.. 0x0020: 0001 0000 0000 0001 0464 6f63 7305 6e77 .........docs.nw 0x0030: 6573 6403 6f72 6700 0001 0001 0000 2910 esd.org.......). 0x0040: 0000 0080 0000 00 ....... 18:40:05.519081 IP 216.146.36.113.53 > 192.168.32.10.24712: UDP,length 243 0x0000: 4500 010f b93a 0000 3511 eded d892 2471 E....:..5.....$q 0x0010: c0a8 200a 0035 6088 00fb 6ceb f66c 8180 .....5`...l..l.. 0x0020: 0001 0003 0004 0005 0464 6f63 7305 6e77 .........docs.nw 0x0030: 6573 6403 6f72 6700 0001 0001 c00c 0005 esd.org......... 0x0040: 0001 0000 1c20 0010 0367 6873 0667 6f6f .........ghs.goo 0x0050: 676c 6503 636f 6d00 c02c 0005 0001 0000 gle.com..,...... 0x0060: 4116 0008 0367 6873 016c c030 c048 0001 A....ghs.l.0.H.. 0x0070: 0001 0000 00c3 0004 4a7d 5f79 c030 0002 ........J}_y.0.. 0x0080: 0001 0001 11ac 0006 036e 7333 c030 c030 .........ns3.0.0 0x0090: 0002 0001 0001 11ac 0006 036e 7332 c030 ...........ns2.0 0x00a0: c030 0002 0001 0001 11ac 0006 036e 7334 .0...........ns4 0x00b0: c030 c030 0002 0001 0001 11ac 0006 036e .0.0...........n 0x00c0: 7331 c030 c0a2 0001 0001 0000 7dc1 0004 s1.0........}... 0x00d0: d8ef 200a c07e 0001 0001 0000 7dc1 0004 .....~......}... 0x00e0: d8ef 220a c06c 0001 0001 0002 0204 0004 .."..l.......... 0x00f0: d8ef 240a c090 0001 0001 0003 b4ad 0004 ..$............. 0x0100: d8ef 260a 0000 2910 0000 0080 0000 00 ..&...)........