Solved

Which DNS server is connected?

Posted on 2013-01-23
6
263 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
Comment Utility
%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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 16

Assisted Solution

by:PaciB
PaciB earned 83 total points
Comment Utility
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
Comment Utility
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 25

Accepted Solution

by:
DrDave242 earned 84 total points
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Learn about cloud computing and its benefits for small business owners.
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…

743 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

21 Experts available now in Live!

Get 1:1 Help Now