2 个网络,但名称解析仅对一个网络完全有效

2 个网络,但名称解析仅对一个网络完全有效

我在 vmware 工作站上有一个配置了 DNS 的 Windows 2012 Server。

名称服务器为“ad.nuglab.local”,“主机(A)”记录为 172.16.202.109 和 192.168.1.111

在我的主机 PC 上,将 DNS 服务器设置为 172.16.202.109,我可以 ping/nslookup/浏览 Windows Server 上配置的任何主机,例如指向 192.168.1.101 的“esxi-1”。

> nslookup esxi-1.nuglab.local
Server:  ad.nuglab.local
Address:  172.16.202.109

Name:    esxi-1.nuglab.local
Address:  192.168.1.101

> ping -a 192.168.1.101

Pinging esxi-1.nuglab.local [192.168.1.101] with 32 bytes of data:
Reply from 192.168.1.101: bytes=32 time<1ms TTL=64
Reply from 192.168.1.101: bytes=32 time<1ms TTL=64

浏览器: https://esxi-1.nuglab.local-> 已解决。

但是,如果我在主机 PC 上将 DNS 服务器更改为 192.168.1.111,名称解析将无法完全正常工作。以下是我得到的结果:

我首先ipconfig /flushdns

> nslookup esxi-1.nuglab.local
Server:  ad.nuglab.local
Address:  192.168.1.111

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
Name:    esxi-1.nuglab.local
Address:  192.168.1.101

> ping -a 192.168.1.101

Pinging 192.168.1.101 with 32 bytes of data:
Reply from 192.168.1.101: bytes=32 time<1ms TTL=64
Reply from 192.168.1.101: bytes=32 time<1ms TTL=64

浏览器: https://esxi-1.nuglab.local-> 未解决。

因此,nslookup 在两次“DNS 请求超时”之后找到了“192.168.1.101”。ping 无法解析名称,但可以 ping 资源。

如何解释为什么当我选择我的 DNS 地址为 192.168.1.111 时它不起作用?

答案1

不建议使用带有 2 个网卡的 AD DNS 服务器,请看这个:https://www.petri.com/configure-dns-on-domain-controller-two-ip-addresses

答案2

我的主机 PC 物理上位于“172...”网络上,而虚拟上仅位于“192...”网络上。

Windows Server VM 桥接在 172 网络上,并且具有“192...”的“仅主机”接口。

在主机 PC 上,我需要在“192...”网络适配器(而不是“172...”)上添加 DNS 服务器地址。

相关内容