Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-11-25
4
Medium Priority
?
414 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I wrote this article to explain some important DNS concepts that should be known to avoid some typical configuration errors I often see in forums. I assume that what is described here is the typical behavior of Microsoft DNS client. I don't know …
Occasionally you run into the website or two that will not resolve properly using your own DNS servers.  Some people simply set up global forwarders for their DNS server.  I don’t recommend doing this because it can cause problems resolving addresse…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

610 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