2 dns servers

Johnny Broe 526 Reputation points
2025-04-09T11:34:38.56+00:00

I have 2 domain controllers DC1 with the IP address 192.168.10.10 and DC2 with the IP address 192.168.10.9 where DNS is installed on both of them

If I make a correction to the DC1 DNS configuration then I can see this correction on the DC2 DNS

The DHCP server delivers an IP address to the clients including dns servers DC1 and DC2

Everything works perfectly

Then I turn off DC1 due to an update and then trouble starts.

If I do an nslookup in a command prompt on a client it asks the DC1 which is turned off and comes up with the following response: DNS request timed out.

How do I get the client to automatically ask DC2?

If I manually change the DNS configuration on the client to only DC2 it works again. I can also in the command prompt write nslookup mailbox1 dc2 and get the correct response

Best Regards

John B

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
0 comments No comments
{count} votes

Accepted answer
  1. Marcin Policht 50,895 Reputation points MVP Volunteer Moderator
    2025-04-09T11:43:10.8433333+00:00

    This is simply how nslookup works. It always picks the primary DNS server from the list of DNS servers configured on the DNS client. This does NOT mean that the DNS client won't be able to automatically failover to the next DNS server on the list and use it for name resolution. That should happen by default.

    If you want to expedite this automatic failover, you can try the following:

    • Use the DnsQueryTimeouts registry key:
      • It controls how quickly the client times out and attempts alternate DNS servers.
      • Registry path:
            HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters
        
      • Create a REG_SZ value named DnsQueryTimeouts with the format:
            1 2 2
        
        This means:
        • Try first DNS server, wait 1s.
        • Retry after 2s, then 2s
        • Move on to next DNS server quicker.

    After applying this, restart the DNS Client service:

    Restart-Service dnscache
    

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Johnny Broe 526 Reputation points
    2025-04-09T13:36:49.8533333+00:00

    Hi Marcin
    Thanks for yor reply

    Is it on the client that I have to make the registry correction?

    If it's just a behavior in nslookup I can live with it but I also lose the connection from Outlook to my exchange server when I stop DC1.

    Best Regards

    John B


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.