Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ideas for where to look for IP definition of particular subdomain?

Status
Not open for further replies.

BobMCT

IS-IT--Management
Sep 11, 2000
756
0
0
US
Here's what's up:

Running windows 7. From CLI run nslookup sub.domain.name and it returns the correct IP
Then from CLI run ping sub.domain.name and it resolved to a local IP (192.168.8.x).
So I figure the resolve must be preceeding any lookup. So I check my \windows\system32\drivers\etc\hosts and as well as the lmhosts file and there is NO entry for the referenced sub.domain.

So I'm wondering where else the domain resolve can be from? What other mechanisms would return the incorrect IP?

I should know this but because I'm really a *nix guy, I'm asking for ideas?

Thanks ???
 
BobMCT said:
What other mechanisms would return the incorrect IP

Whatever is the DNS server on your network.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
The OP has already mentioned that they used nslookup, which uses the current DNS server
 
And, my dns server is OpenDNS which is resolving correctly. Its something internal that is returning the altered IP. I know I must have set it somewhere, somehow for internal testing, but all the usual places all seem to NOT reference this host so it should rely on the DNS.
 
which uses the current DNS server
As does ping, to 'know' the IP to send the 'pings' to

The reply was to the question I quoted, was "What other mechanisms exist [other than /etc/hosts] to act as resolvers.

However there are a couple of blanks in the information provided such as what does "the correct IP mean?

Is it internal or external for instance

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
That isn't the question that was asked.

The question asked was: nslookup (DNS) gave the right address. Ping got the wrong address. I've checked my local hosts file and my lmhosts file, both of which are OK. Are there any other name resolution mechanisms that I haven't checked yet?

>As does ping, to 'know' the IP to send the 'pings' to

ping, unlike nslookup, does not always use the DNS server(s) to resolve a name - it depends on the name resolution search order. Even with the default order, it searches a local cache first, then the HOSTS file and then, and only then, the DNS server(s) (and subsequently WINS, then NetBIOS broadcast, and finally the LMHOSTS file).

>Is it internal or external for instance
The OP specifies that as well, alebit not as clearly as you might hope - ('a local IP ' is indicated to be incorrect, from which we can infer that the correct address returned by nslookup was an external address)
 
Both on the right track. I use an Ubuntu server locally for development/testing and work from my Windows 7 desktop. The subject web site is an externally hosted one remote to me and the client. Normally I will had an entry to my windows' hosts file pointing to my own linux server. Then, after testing, I remove the hosts entry and it reverts back to the "real" dns address. Unfortunately it is not doing that this time. I did run the ipconfig /flushdns and it reported successfully completed but a ping continued with the local IP.

So I'm continuing to work on this as well as hope that someone has a better idea than me.

Thanks for your help.
 
For you nslookup what was the query type set to if it was set at all?

Because 'nslookup domain' returns the IP of the name server it queried (probably your router) rather than the IP of the domain host.

To get the IP of a hostname you need to use 'nslookup t=A domain.tld' to retrieve the 'A' record (IP).

Ping simply does an implied 'A' lookup to get the 'A' record for the ping to be sent to.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top