Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

At my site, we just moved an important service, and made the appropriate DNS changes internally and externally to make it work.

When you bring up the site in a browser, it works fine. (Works in Safari, Chrome, Opera, Firefox, on computers that have been on the network for a while and ones that have been off it for some time.)

That's good, to be sure. But when I type nslookup <hostname> or dig <hostname>, I get the old IP for the service. (If I put said IP in the browser, I get the former server for this service).

I'm perplexed. How is it that the browser resolving the new service but nslookup is not? [No, there is nothing about the site in /etc/hosts].

[Incidentally, is there any way to tell which IP a browser came up with for a site?]

share|improve this question
add comment

4 Answers 4

Another possibility is that the client machines on the network are going through an HTTP proxy server that picked up on the IP address change before they did.

share|improve this answer
1  
Hmm... I think we do have a transparent proxy. –  Clinton Blackmore Dec 11 '09 at 18:23
    
Nice catch Sean, this is the likely answer why HTTP works but raw DNS shows old info. –  Dave Drager Dec 11 '09 at 18:33
    
Transparent proxies generally don't do the DNS lookup IIRC? Regular ones definitely do. –  Tom Newton Dec 11 '09 at 21:42
add comment

My first thought was that you had an entry in /etc/hosts but it sounds like you checked there.

I would check the hostname at Squish to see what/who is involved in DNS resolution and the results that are currently being reported.

Don't forget that DNS can take a while to change over depending on nameservers involved and cache times. If you are only having issues locally there is probably some local DNS cache at play, and you need to reboot or let it time out. When it comes to DNS you have to think globally.

[ Squishywishywoo ]

share|improve this answer
1  
Nifty tool. Thank you. –  Clinton Blackmore Dec 11 '09 at 18:24
add comment

On Solaris and Linux there's getent (ex. 'getent hosts www.google.com') . This uses the system libraries to do the resolution rather than going directly to the name server (like nslookup). This is particularly useful when there are several naming services in play (local files, nis, dns) any of which could have an answer.

share|improve this answer
add comment

For your last question ("is there any way to tell which IP a browser came up with for a site"), I recommend, if you use Firefox, an extension like ShowIP or Site Information.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.