When does a Windows client stop using a secondary DNS server and revert back to primary
I am trying to get a solid understanding of exactly how a Windows client works with DNS. For example, lets say that I configure a network adapter with a primary and a secondary DNS server.
How long does it take to fail over and start using the secondary DNS server if the primary DNS server fails?
What is required for it to start using the primary DNS server once the primary DNS server comes back online? Will this eventually happen automatically?
Solution 1:
If a query to your primary DNS server results in something analogous to host-not-reachable then the client resolver will automatically try the same query against the next DNS server, and so on until it either successfully contacts a DNS server or runs out of servers to try. So essentially it takes as long to fail over to the secondary server as it does to time out a connection to the first.
I believe the Windows resolver will then continue to use whichever server answers for a period of 15 minutes (or until the TCP/IP stack is reset via a reboot or something) and then will start over again at the top of the list.
Note that this failover only happens when a server is not reachable, not when the queried record is not resolvable. If the primary server can be reached but responds with a no-such-host answer then the failover does not occur.
Here's a KB article that mentions the 15 minute thing for XP.