How to Configure DNS on Windows with Multiple NICs

domain-name-systemnetworkingwindows

I have two network adapters on my PC each connected to a different network (one LAN and one Wireless). I set up routing tables to have some of the addresses routed to the LAN and others to the Wireless, but I'm having problems with the DNS configuration. I'd like the DNS lookup to first try the default DNS for the LAN and then if there was no match, try the default DNS for the wireless.

The problem is that DNS servers (and hence their order) are defined per network connection. I can't figure out which of the DNS's are used when I try to i.e. ping a server by name.

Is there a concept of a primary network adapter?

Can I create or manage a global list of DNS servers without regard to the adapter?

Best Answer

You can prioritize one adapter over another. Read through this article for how to do it.

However, when you say "I'd like the DNS lookup to first try the default DNS for the LAN and then if there was no match, try the default DNS for the wireless.", that is not going to work. Your LAN DNS Server, if available, will either resolve the name for you, answer that the name does not exist, or refer you to another DNS server. While you might think that the third option would be your ticket, understand that the DNS resolver in Windows (an most other systems) is a stub resolver that can not follow referrals, and so your DNS query will fail at that point.

If what you truly want is to get the internal IP adresses of your systems when you are connected through your LAN, and external resolved addresses when connected outside, or in general for any external names. This can be achieved by setting up split DNS on your LAN DNS server.

Related Topic