Solved

when pinging domain name the additional domain's IP is resolved

Posted on 2007-11-25
4
362 Views
Last Modified: 2010-04-07
One domain controller (Windows 2003 Enterprise edition) named company.com and the IP address is 192.168.2.2

Addition domain controller(Windows 2003 Enterprise edition) for company.com with IP address 192.168.2.3. In the additional Domain the preferred DNS server is set to 192.168.2.2 and the second DNS is set to 192.168.2.3.

When I ping company.com I am getting the IP of Additional domain controller all the time. But When I do an nslookup I am getting the IP of the DC i.e. 192.168.2.2

Can any one suggest a solution to solve this? I want the IP of the DC to be resolved when I ping company.com (i.e. 192.168.2.2)

0
Comment
Question by:Zacharia Kurian
  • 2
4 Comments
 
LVL 18

Expert Comment

by:Andrej Pirman
ID: 20345324
You must understand that PING and NSLOOKUP use different methods for name resolution.

Ping uses the IP or machine name string and looks up first in DNS, then WINS and finally in local broadcast. It does not modify your computer name during resolution. So, if you ping company.com, first query to DNS is for "company.com" A-record and CNAME.

On the other hand Nslookup first tries with constructing FQDN from your string by appending domain suffix to host name prior to resolution. If the name is not found, string is devoted from left to the right for string until first dot, and query is repeated.
See how it works by switching into DEBUG mode while running NSLOOKUP:
set d2

You will see how query is executed and where answers come from.

So, if you do not have "company.com" A-record in DNS, ping will resolve by NetBIOS name, while nslookup will resolve by querying DNS server, which is set to be your DNS server for LAN adapter.
0
 
LVL 9

Author Comment

by:Zacharia Kurian
ID: 20345348
the following are the NetBIOS names of the servers

Domain Controller (primary) company.com -DC

Additional Domain Controller of company.com -ADC

When I ping by NetBios names I am getting the correct IPs.

On  both the servers A-Record in the DNS are added i.e.

same as parent folder Host(A) 192.168.2.2
same as parent folder Host(A) 192.168.2.3

also the associated PTR records are added in the DNS entry of both the servers.

I do not have WINS installed in any of the above servers and I do not want to install it.
0
 
LVL 19

Expert Comment

by:SteveH_UK
ID: 20345440
If you ping company.com, you will get a DNS-round-robin response.  This means that DNS servers will alternate the responses they give, cycling through all possible A records.

Note that you are also getting the A records for the domain, not the A records for servers (i.e. dc1.company.com, dc2.company.com).

The way round-robin works, also lends itself to caching.  The Windows DNS client will typically cache the response from the DNS server, so excepting nslookup (which queries DNS servers directly), you will get the same result unless you flush the cache using:

ipconfig /flushdns

Also note that PRIMARY and SECONDARY DNS servers are really just a list of equally valid servers to try.  Windows does not prefer the PRIMARY server, it just uses it until it doesn't respond.  Then it uses the SECONDARY until it doesn't respond, even if the PRIMARY is restarted in the meantime.

hope that helps
0
 
LVL 19

Accepted Solution

by:
SteveH_UK earned 125 total points
ID: 20345442
If you try:

ping company.com
ipconfig /flushdns
ping company.com
ipconfig /flushdns
ping company.com

You should see alternating responses, depending on the configuration of the DNS servers.  I've assumed the usual and default round-robin configuration.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
Learn about cloud computing and its benefits for small business owners.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

11 Experts available now in Live!

Get 1:1 Help Now