Web Development



Windows DNS weirdness: nslookup finds, ping doesn't

By munsch ·
The fact that this is possible boggles me:

C>ping myhost
Ping request could not find host myhost. Please check the name and try again.

C>nslookup myhost
Server: dns.mydomain.loc

Name: myhost.mydomain.loc

C>ping myhost
Ping request could not find host myhost. Please check the name and try again.

C>ping myhost.mydomain.loc
Ping request could not find host myhost.mydomain.loc. Please check the name and try again.


Despite multiple cache clearings, browsers can't find it either (it's an internal website). I am suspecting this is why. I am not sure how, after several /flushdns and /registerdns, if nslookup finds it right off, why can't anything else..?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

nslookup does not use the same references as ping

by LarryD4 In reply to Windows DNS weirdness: ns ...

Ping will directly query the DNS server defined in ipconfig

nslookup will quiery the DNS server, on the AD domain controller your security was authenticated on.

Ping simply asks DNS give me the ip so I can ping it.

Their is no record in DNS for a myhost PC. But the code within the AD DNS schema has a refernce for a nslookup so you are returned the address of your authentication server..

If you invoke nslookup and put a x in front of it, you will get a > prompt. Type in a question mark at the prompt and you can see the switches to get the info you need with nslookup.

nslookup x

Collapse -


by munsch In reply to nslookup does not use the ...

if you look at what i posted, nslookup of course prints what server it is asking: but then it prints, on the next two lines, the answer. And the answer is correct: myhost in this case is indeed

So the AD DNS server knows this (as reported via nslookup), but the workstations do not (as reported by ping)? How is this possible? Bad AD DNS server config?

The primary DNS server for all workstations is - you guessed it! - the AD DNS server.

So i still don't see how this is possible, or how to fix something that seems to be set up correctly.

Collapse -

another question....

by ---TK--- In reply to actually,

so when you ping server.com, it cant find it. Can you ping the IP address? If you can ping by IP I would lean towards a netbios-WINS setting issue....

Collapse -


by ---TK--- In reply to another question....

I reread that question. and forgot that you said ping did not work... I would look into how WINS is set up...

Collapse -


by munsch In reply to ignore....

Something i haven't looked at, at all. So good hint, thanks. Just happened again: was on an internal website, left it alone for about half an hour, went to follow a link on the page and got bupkis. As every time before, ipconfig /flushdns and /registerdns instantly fixes it: can immediately browse to the internal server again.

Collapse -

heh, well...

by munsch In reply to ignore....

yeah, i don't think it's WINS. The machine in question is a linux box, and its name isn't remotely similar to any of the windows machines. Or do i need to add a manual entry to WINS? Why isn't DNS good enough..?

Collapse -


by ---TK--- In reply to heh, well...

Is on the DNS server, it handles NetBIOS name translation.... http://technet.microsoft.com/en-us/library/cc784180.aspx

I think I need to take a step back... you added another twist... lol... So the DNS server is an NT box? correct? and your are accessing the network from a linux box? correct? what distro are you using? If so are you authenticating to the domain with kerbrose? and is this box the onlyone that is having issues?

Collapse -

network setup

by munsch In reply to WINS....

DNS server is Win2k3, and is the DC.
Intranet site is on a linux box running Ubuntu.

DNS has an A record pointing at the linux box. There are also two CNAME records for two other intranet sites hosted on the same box. When it's all working, it works perfectly.

The clients are all WinXP Pro.

Every now and then, the intranet names stop resolving from the clients and are not browseable in IE or Firefox. If i do a "ipconfig /registerdns" on the affected client, they resolve again and are browseable in IE and Firefox. (We use firefox, but i tried IE as well just to see).

I am seeing people logging in (successfully) - therefore authenticating to the DC - but not connecting their network shares consistently. Usually yes, sometimes just no, for no reason. Again, /registerdns instantly fixes that.

Outlook, for some people, will also occasionally forget where the exchange server is - and again, /registerdns fixes it.

I am assuming all this points to Stupid Crap on our DNS server, but i'm open to suggestions.

Collapse -

on the linux server...

by ---TK--- In reply to WINS....

Have you set up kerberos? If Kerberos isn't authenticating to the DNS correctly it can cause this issue, because once the DNS send the Linux box a request to check out who they are, the Linux box then has incorrect stuff and the DNS says... ok, you are not communicating correctly, Im dropping you... see ya...

Collapse -

That was my point!

by LarryD4 In reply to actually,

Nslookup does not ask the same question as ping.

Ping is generic app that needs to ask the basic question that applies to all DNS servers, linux, Unix, MAC Servers, etc...
Which is, do you have a record for "myhost" and when the AD DNS server checks for a "A Record" it does not have an entry, so you don't get a ping response.

But nslookup asks the AD DNS Schema or
"AD for DNS" service, what server did I authenticate with using the keyword "myhost".

If you go look at your DNS records you will not see a record for "myhost".

The "myhost" keyword is built in to the "AD DNS" code. But will not respond to a normal DNS lookup which is what ping does.

It happens the same way on my network as well.

Related Discussions

Related Forums