Multiple DNS servers configured on a client - which one is used when and why?

I am building the Magic Triangle setup where we have Mac laptops bound to both Active Directory on a Windows 2012 server & bound to Open Directory on a Mac Server 10.8.

If I manually configured 2 DNS servers on the Mac laptop: (Windows server)

How do I control which DNS server gets used when?

I want the laptop to use our Windows server while the laptop is on the LAN, but when Bob takes his laptop home, I want his laptop to use the other DNS server since it won't be able to talk to our Windows server when he has his laptop at his home.

Who is Participating?
MaheshConnect With a Mentor ArchitectCommented:
How user connect to internet from home ?

I mean even if you set (Public IP) on his machine as static, user must connect to its internet service provider through some thing like data card, cable modem etc.
He most probably will be getting public IP through DHCP IP, or some natted IP with pointing to their own ISP DNS server as well, then why its computer will go to for name resolution \ internet access ?

It may use dns server, but only after got internet connectivity through its datacard \ modem.As a result is not required at home.

In corporate network you are using (DC) as primary and as secondary.
In that case, if your DC goes down, still client will get internet connectivity through IP address.

Hope that helps
Nathan PConnect With a Mentor Systems ArchitectCommented:
First listed = first attempted, in most cases.
Any second, third, 'nth DNS servers are queried if the one before it doesn't respond.

That's usually the case.

So, you want it set up like you have there, so that in the office, it tries first, then if it can't reach that, it tries

I hope this helps.
EdTechyConnect With a Mentor Commented:
I had issues with Magic Triangle logins a few years ago with the first dns entry being internal and the second entry external on the clients. As long as I had the external entry in the clients, I could not login. I fixed the issue by only pointing clients to my internal dns. If your dns server is configured correctly, any request your internal server cannot resolve will be forwarded to the external ( server.
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Nathan PConnect With a Mentor Systems ArchitectCommented:
If that's the case, do you need to consider a tertiary DNS setting?

Memory fails me if you can even configure one on Mac clients.

Eg: (win DNS) (Mac DNS) (ext DNS)
Nathan PConnect With a Mentor Systems ArchitectCommented:
His point is, if you give out DNS servers via corporate DHCP, then when they are in the office, just give them the DNS servers they need for the office.  Just make sure that your DNS servers are willing to answer requests for external internet addresses too.

If you're going to try to give them static info, then their computer won't work anywhere else because you're enforcing a static IP..

So it's kind of a valid point.  When they are at home, they'll get their own IP and DNS info, which won't need to include your servers config.
strungConnect With a Mentor Commented:
You may need to set two network locations in the Mac - one for the office and one for elsewhere:
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.

All Courses

From novice to tech pro — start learning today.