Solved

Which DNS server is connected?

Posted on 2013-01-23
6
266 Views
Last Modified: 2013-02-21
We have one DNS (named L) server and its failover server (B). Both are set as Primary and Secondary DNS on each server within the same LAN network. DNS settings are all same.

Somehow when I checked with DNS is in use/connected as DNS for each servers, some server shows L and some shows B. I used this command : >echo %LOGONSERVER%

Did I use the right command?
If so why I got this information?

Thank you very much!

Jing
0
Comment
Question by:hanjgr
6 Comments
 
LVL 9

Assisted Solution

by:TunerML
TunerML earned 83 total points
ID: 38812100
%LOGONSERVER% reflects which Domain Controller you are currently logged into, ipconfig /all look for Primary/Secondary DNS servers, as long as primary is available you should be using that one.
0
 
LVL 26

Assisted Solution

by:pony10us
pony10us earned 167 total points
ID: 38812142
You can also do an NSLookup of a device on the network and it will tell you which DNS server it pulls the information from. Normally that would be your primary.

The difference between methods is that TunerML's will only give you the IP address of the two DNS servers.  The NSLookup will give you the FQDN as well as IP address of the server that responds to the DNS query.
0
 
LVL 23

Assisted Solution

by:Suliman Abu Kharroub
Suliman Abu Kharroub earned 83 total points
ID: 38812461
The proper tool to check which DNS server is answering DNS queries is nslookup...

issue the nslookup from client machine and it will tell you the server which it uses.

To check the dns serer health run below command on both dcs:

Dcdiag /test:DNS
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 16

Assisted Solution

by:PaciB
PaciB earned 83 total points
ID: 38812524
Hi,

I just want to give some precision about DNS primary and secondary...

Microsoft DNS client on windows computers or server uses what we can call a "preferred DNS server". When the DNS client has to resolve a DNS name it will not request the primary DNS server but the "preferred DNS server".
Waht is the preffered DNS server ? Well... simply the last successfully requested DNS server.
That means that if for any reason the currentlu used DNS server did not answer or take too much time to answer the DNS client might have decided to interrogate the next one in the list and if this one answers it becomes the new preferred DNS server and will always be requested at first on next name resolution.

So the "primary" or "secondary" order is only useful at startup time. When a computer is started it will try to reach the first DNS server in the list, the one that is called "primary" in IP settings, but after that the "primary" notion no more exists... only the preferred DNS server notion exists.

Have a good day.
0
 
LVL 26

Assisted Solution

by:pony10us
pony10us earned 167 total points
ID: 38812566
PaciB:

Very good point.  To make that a little stronger, lets say you have two DNS servers. One is in your office and the other is on across the state from you. Now lets say that you "primary" DNS is set to the one across the state. Naturally you would think that it would use that one first however, due to network congestion, it is quicker to get the response from the one in your local office.  This becomse your "preferred" and will continue to be the one you resolve with unless/until it can't respond.

The same is true in the opposite scenario where the local may be your "primary" but can't respond for some reason so the one across the state becomes the "preferred".

nslookup is still the best way to determine what server is providing the lookups at any given point in time.
0
 
LVL 26

Accepted Solution

by:
DrDave242 earned 84 total points
ID: 38812729
I'm pretty sure nslookup always defaults to the preferred server.  In fact, I just tested this by setting my workstation's DNS servers to 127.0.0.1 (certainly not valid) and 8.8.8.8 and flushing the resolver cache.  I ran nslookup, and it defaulted to 127.0.0.1.  Then I closed nslookup and pinged www.google.com.  It was able to resolve the FQDN to an address, so DNS worked as it should.  Since there's no DNS server running on 127.0.0.1, it had to have gotten the address from 8.8.8.8.  However, I then ran nslookup again, and it defaulted to 127.0.0.1.

I don't think nslookup can tell you which server the Windows resolver is using, because it uses its own separate resolver.  The only surefire way I can think of to determine which DNS server is being used by a machine at a given time is to run a packet trace.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Resolve DNS query failed errors for Exchange
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now