当我这样做时dig
我没有得到答案......
red@localhost:~$ dig +noall +answer name-one.name-two.com @mydns-server.name-one.com
...但是当添加时name-two.com soa
我得到了答案name-one.name-two.com
...
red@localhost:~$ dig +noall +answer name-one.name-two.com name-two.com soa @mydns-server.name-one.com
name-one.name-two.com. 868 IN A xx.xxx.xxx.xxx
name-two.com. 2926 IN SOA ns41.name-three.com. dns.name-four.net. 2013120202 28800 7200 604800 600
... 这里发生了什么?
谢谢
答案1
直接来自dig -h
:
Usage: dig [@global-server] [domain] [q-type] [q-class] {q-opt}
{global-d-opt} host [@local-server] {local-d-opt}
[ host [@local-server] {local-d-opt} [...]]
[...]
global d-opts and servers (before host name) affect all queries.
local d-opts and servers (after host name) affect only that lookup.
当你写:
dig +noall +answer name-one.name-two.com @mydns-server.name-one.com
dig
将其视为:
+noall +answer
- 全局选项,适用于所有查询
name-one.name-two.com @mydns-server.name-one.com
- 在特定名称服务器上查找主机
但是当你写下:
dig +noall +answer name-one.name-two.com name-two.com soa @mydns-server.name-one.com
dig
将其视为:
+noall +answer
- 全局选项,适用于所有
name-one.name-two.com
- 查找主机
name-two.com soa @mydns-server.name-one.com
- 再次查找 SOA RR,但这一次是在特定服务器上
因此,您收到的第一个主机的 A RR 响应不是来自@mydns-server.name-one.com。