DNS - secondary / backup entry - when is this used?


Question about DNS. My colleage says that the secondary DNS is only ever used if the primary DNS is completely unavailable. Therefore if the irst is available but cannot resolve the DNS query the secondary server is not used.

However I was of the belief that if the first DNS server could not resolve the particular query then the secondy DNS would also be checked to see if it could resolve the query.

Which version is correct?

Many thanks.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If a primary DNS server cannot resolve a query, it will likely use a process known as recursion whereby the primary will query other outside DNS servers (after checking its cache for a response first). The secondary will be used when the primary is down or unavailable (but is not queried when the primary cannot resolve a query because the secondary only has the same entries in its database that the primary does; the secondary copies from the primary)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
afflik1923Author Commented:
But what about a circumstance when you say you have your local server for the primary server and then google DNS as the secondary?


and you put this on a workstation. Lets say the server at thr first IP is only resolving local DNS, I always though the secondary would allos the workstation still to get out on the internet?
It depends on the operating system:

"Yes. You can set Google Public DNS to be your primary or secondary DNS resolver, along with your current DNS resolver. Please remember that operating systems treat DNS resolvers differently: some will only use your primary DNS resolver and use the secondary in case the primary one fails, while others will round-robin among each of the resolvers."

Source: http://code.google.com/speed/public-dns/faq.html#services

If your operating system only queries the local primary it would seem that you would not be able to get out to the internet unless your internal resolver also knows how to get out to the net.

Hope this helps!
Hi afflik1923,

You are correct that multipe DNS entries on clients only allow failover if the first DNS server is not contactable.
If it is contactable but cannot resolve DNS the client usually stops trying as it accepts this as a valid response.

if you have a DNS server, you should set your main DNS server to use multipe DNS forwarders so if one is down it can use another. You can also set it to use 'root hints' to resolve the address itself if its DNS forwarders are not available.
If you are using a router for DNS you can often set a backup DNS in there so it will fall back to the 2nd option if the 1st doesnt work.

"and you put this on a workstation. Lets say the server at thr first IP is only resolving local DNS, I always though the secondary would allos the workstation still to get out on the internet? "

it is very rare the the primary DNS server can only resolve internal addresses as they are designed to forward queries for external domains to another server, often the ISP provided one.
It would be an odd setup and wouldnt really work with many clients as the internal DNS's response of 'no record found' would be a valid response and would cause the client to stop looking.

a DNS server responding that no record was located is still a response which is accepted by clients as an answer.

afflik1923Author Commented:
Excellent input and well explained. Many thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.