以下 AD DS 域是新设置的:
- DNS域名,FLZ,只有DNS后缀:
internal.example.co.uk
- DC 操作系统:Windows Server 2016 标准版
- DC #1 DNS 服务器:172.16.233.2、127.0.0.1
- DC #2 DNS 服务器:172.16.233.1、127.0.0.1
- DNS 转发器:8.8.8.8、208.67.222.222
无论如何,域和 DNS 工作正常。
但是,nslookup
行为非常奇怪:
nslookup <any FQDN> <any DC server>
工作不正确,附加example.co.uk
(notinternal.example.co.uk
) 并解析为相同的未知公共 IP 地址。nslookup <any FQDN>. <any DC server>
工作正常。
我确定路由、文件hosts
、Windows 服务DNS Server
等不相关,并且未知公共 IP 地址不存在 DNS PTR RR。
我知道您应该在 FQDN 后添加 a 后缀.
,但我从来没有这样做过,也从未见过它的行为如此。
我在网上找不到合适的分辨率,因此这篇文章。
以下匿名命令提示符输出证明了这一点:
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\username>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : DC2
Primary Dns Suffix . . . . . . . : internal.example.co.uk
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : internal.example.co.uk
Ethernet adapter Ethernet 2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #2
Physical Address. . . . . . . . . : 00-15-5D-9E-13-07
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::45fd:755c:e86d:eed3%14(Preferred)
IPv4 Address. . . . . . . . . . . : 172.16.233.2(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.16.233.254
DHCPv6 IAID . . . . . . . . . . . : 100668765
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-21-42-DF-91-00-15-5D-9E-13-05
DNS Servers . . . . . . . . . . . : ::1
172.16.233.1
127.0.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Tunnel adapter isatap.{DEFCF64F-0919-47F6-8206-DA42E6828191}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
C:\Users\username>ping internal.example.co.uk
Pinging internal.example.co.uk [172.16.233.2] with 32 bytes of data:
Reply from 172.16.233.2: bytes=32 time<1ms TTL=128
Reply from 172.16.233.2: bytes=32 time<1ms TTL=128
Reply from 172.16.233.2: bytes=32 time<1ms TTL=128
Reply from 172.16.233.2: bytes=32 time<1ms TTL=128
Ping statistics for 172.16.233.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Users\username>nslookup internal.example.co.uk 127.0.0.1
Server: localhost
Address: 127.0.0.1
Non-authoritative answer:
Name: internal.example.co.uk.example.co.uk
Address: <unknown public IP address>
C:\Users\username>nslookup internal.example.co.uk. 127.0.0.1
Server: localhost
Address: 127.0.0.1
Name: internal.example.co.uk
Addresses: 172.16.233.1
172.16.233.2
C:\Users\username>ping DC1
Pinging DC1.internal.example.co.uk [172.16.233.1] with 32 bytes of data:
Reply from 172.16.233.1: bytes=32 time=1ms TTL=128
Reply from 172.16.233.1: bytes=32 time<1ms TTL=128
Reply from 172.16.233.1: bytes=32 time<1ms TTL=128
Reply from 172.16.233.1: bytes=32 time<1ms TTL=128
Ping statistics for 172.16.233.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
C:\Users\username>nslookup DC1 127.0.0.1
Server: localhost
Address: 127.0.0.1
Name: DC1.internal.example.co.uk
Address: 172.16.233.1
C:\Users\username>ping google.co.uk
Pinging google.co.uk [74.125.133.94] with 32 bytes of data:
Reply from 74.125.133.94: bytes=32 time=11ms TTL=49
Reply from 74.125.133.94: bytes=32 time=11ms TTL=49
Reply from 74.125.133.94: bytes=32 time=11ms TTL=49
Reply from 74.125.133.94: bytes=32 time=15ms TTL=49
Ping statistics for 74.125.133.94:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 11ms, Maximum = 15ms, Average = 12ms
C:\Users\username>nslookup google.co.uk 127.0.0.1
Server: localhost
Address: 127.0.0.1
Non-authoritative answer:
Name: google.co.uk.example.co.uk
Address: <unknown public IP address>
C:\Users\username>nslookup google.co.uk. 127.0.0.1
Server: localhost
Address: 127.0.0.1
Non-authoritative answer:
Name: google.co.uk
Addresses: 2a00:1450:4007:80e::2003
216.58.208.227
C:\Users\username>
使用
nslookup
的调试模式,我发现这是由于 DNS递归传递(感谢 @ joeqwerty)和以前存在但未知的公共根通配符 DNS RR (*.example.co.uk. IN A <unknown public IP address>
)。具体来说,我发现在这种情况下,有一个 DNS 后缀;:
.
; 并且启用了 DNS 递归(默认),nslookup
是:.
;并且启用了 DNS 递归(默认),nslookup
是:.
;并且 DNS 递归被禁用,nslookup
是:启用递归(默认)时,以下匿名命令提示符输出演示了这一点:
禁用递归时,以下匿名命令提示符输出演示了这一点: