電腦無法加入網域 - 可能是 DNS 問題

電腦無法加入網域 - 可能是 DNS 問題

我安裝並設定了 Active Directory 控制器 (Windows Server 2019),也執行了 Windows 10 企業版的全新安裝。兩者都安裝在 Hyper-V 中,並且都使用相同的專用交換器。

伺服器上的網域已成功創建,已升級為網域控制器,並且 DNS 伺服器正在運行。我關注了這個影片:https://www.youtube.com/watch?v=aC-KIVYewAM和這個影片:https://www.youtube.com/watch?v=XzMDb-ZtzRY來設定兩者。

但是,當我嘗試在客戶端上加入網域時,出現以下錯誤:

已成功查詢 DNS 以取得用於定位網域「testdomain.local」的網域控制站的服務位置 (SRV) 資源記錄:

該查詢針對 _ldap._tcp.dc._msdcs.testdomain.local 的 SRV 記錄

查詢識別出下列網域控制器:WIN-A9VDVHB8U8M.testdomain.local

但是無法聯繫網域控制器。

我使用伺服器的 IP 位址作為客戶端的主 DNS 伺服器,並驗證兩者可以互相 ping 通。

我也在ping testdomain.local客戶端和伺服器上嘗試過,但都無法解析網域。我會在客戶端上失敗,但它怎麼會在伺服器上失敗呢?我是否缺少 DNS 伺服器上的某些記錄?

這是我的 DNS 伺服器區域在我的伺服器上的樣子:

DNS管理器

還有來自伺服器的 ipconfig-all 輸出:

C:\Users\Administrator>ipconfig -all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : WIN-A9VDVHB8U8M
   Primary Dns Suffix  . . . . . . . : testdomain.local
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : testdomain.local

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
   Physical Address. . . . . . . . . : 00-15-5D-26-E1-12
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::b8f7:6aea:3eb4:8957%4(Preferred)
   Autoconfiguration IPv4 Address. . : 169.254.137.87(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 67114333
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-27-7D-9A-F9-00-15-5D-26-E1-12
   DNS Servers . . . . . . . . . . . : ::1
                                       127.0.0.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

和來自客戶:

C:\Users\User>ipconfig -all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : DESKTOP-BMP0DM7
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
   Physical Address. . . . . . . . . : 00-15-5D-26-E1-13
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::9c44:a92d:4d65:50bf%6(Preferred)
   Autoconfiguration IPv4 Address. . : 169.254.80.191(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 100668765
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-27-7D-A1-8F-00-15-5D-26-E1-13
   DNS Servers . . . . . . . . . . . : 169.254.137.87
   NetBIOS over Tcpip. . . . . . . . : Enabled

您能幫我解決這個問題嗎?我按照影片一步步操作,還是不行。

如果您需要任何其他信息,請告訴我。

謝謝

編輯:

根據要求:

Ipconfig-伺服器:

C:\Users\Administrator>ipconfig -all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : WIN-A9VDVHB8U8M
   Primary Dns Suffix  . . . . . . . : testdomain.local
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : testdomain.local

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
   Physical Address. . . . . . . . . : 00-15-5D-26-E1-12
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::b8f7:6aea:3eb4:8957%4(Preferred)
   IPv4 Address. . . . . . . . . . . : 169.254.137.91(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 67114333
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-27-7D-9A-F9-00-15-5D-26-E1-12
   DNS Servers . . . . . . . . . . . : ::1
                                       169.254.137.91
   NetBIOS over Tcpip. . . . . . . . : Enabled

ipconfig客戶端:

C:\Users\User>ipconfig -all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : DESKTOP-BMP0DM7
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
   Physical Address. . . . . . . . . : 00-15-5D-26-E1-13
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::9c44:a92d:4d65:50bf%11(Preferred)
   Autoconfiguration IPv4 Address. . : 169.254.80.191(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 100668765
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-27-7D-A1-8F-00-15-5D-26-E1-13
   DNS Servers . . . . . . . . . . . : 169.254.137.91
   NetBIOS over Tcpip. . . . . . . . : Enabled

DNS A記錄:

第一記錄

第二筆記錄

客戶端上的 Nslookup:

C:\Users\User>nslookup testdomain.local
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  169.254.137.91

Name:    testdomain.local
Address:  169.254.137.91

答案1

APIPA 位址不會在 DNS 中註冊,因此雖然您的區域看起來不錯,但我懷疑網域控制站沒有相應的 A 記錄。因此客戶端無法解析網域控制器的IP位址。

為伺服器和用戶端指派位於 RFC1918 位址範圍之一的相同子網路中的 IP 位址(您可以選擇)。確保網域控制器在 DNS 中為新 IP 位址註冊 A 記錄。確保伺服器正在使用網域網路設定檔和網域防火牆設定檔。然後嘗試再次將客戶端加入網域。

答案2

您應該在 DC 上設定固定 IP,而不是使用自動產生的 IP。 IP 需要滿足您在虛擬機器管理程式的 vNet 中設定的 IP 範圍。

也要將 DC 的 IP 設定中的 DNS 設定為該位址。

當您在 DC 上執行 nslookup 時,它不得傳回任何問題,並且您應該能夠解析您的 NETBIOS 網域。

最好在此 DC 上設定 DHCP 並配置與虛擬機器管理程式的 vNet 相符的範圍 - 這將向具有正確 IP 位址和 DNS 的用戶端 VM 發出租約

相關內容