答案通常是“否”-更具体的记录应该获胜,因此这应该按照您的描述/预期进行。我的猜测是您在某个地方缓存了通配符A记录,并且需要等待该缓存过期。
使用BIND 9.6.2-P2 / FreeBSD 8.1进行的快速测试:
包含记录的区域:
example.net. IN A 127.0.0.2
*.test.example.net. IN A 127.0.0.1
specific.test.example.net. IN CNAME example.net.
解决如下:
% dig specific.test.example.net
; <<>> DiG 9.6.2-P2 <<>> specific.test.example.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17222
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;specific.test.example.net. IN A
;; ANSWER SECTION:
specific.test.example.net. 3600 IN CNAME example.net.
example.net. 3600 IN A 127.0.0.2
;; AUTHORITY SECTION:
example.net. 3600 IN NS ns1.example.net.
;; ADDITIONAL SECTION:
ns1.example.net. 3600 IN A 127.0.0.1
(返回CNAME)
和
% dig nonspecific.test.example.net
; <<>> DiG 9.6.2-P2 <<>> nonspecific.test.example.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26980
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;nonspecific.test.example.net. IN A
;; ANSWER SECTION:
nonspecific.test.example.net. 3600 IN A 127.0.0.1
;; AUTHORITY SECTION:
example.net. 3600 IN NS ns1.example.net.
;; ADDITIONAL SECTION:
ns1.example.net. 3600 IN A 127.0.0.1
(返回通配符A记录)