Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Tuesday, January 17, 2012

Ping request could not find host


Fix for Ping request could not find host "FQDN of server" Error
I can ping by their IP address but not by their name
ping 192.168.1.3 --works
ping familypc --doesn't work
Ping request could not find host ___ Please check the name and try again
Solution
Need to setup WINS server or service on one of the computer. Or if you're using one of those gateway/router for internet sharing, you can set your wins server as that since it has capabilities of DHCP
Best solution
Windows firewall was blocking port 137. After unblocking it worked fine.
At command prompt
ping myserver.mydomain.local
I get back the message “Ping request could not find host myserver.mydomain.local. Please check the name and try again.”
An nslookup works fine, so I know the SBS server is there and is responding to DNS requests.
In fact, I can “ping myserver” without problems. But for some reason, pinging the fully-qualified internal name doesn’t work.
Sometimes, I can just type “ipconfig /flushdns” to clear this up. Today that didn’t work. However once I actually stopped and started the DNS cache, ping started working
net stop DNScache
net start DNScache
---------
Windows XP Home SP3. “PING name” does not find the host, and “PING ip-address” works fine. Also, “NSLOOKUP name” and also “NSLOOKUP name dns-server-ip-address” both work fine; that is NSLOOKUP works using it’s own default, and also using any valid DNS server I specify. But, PING and various other software like browsers, anti-virus, and pretty much any other name-dependent software will not function.
--------
Can still ping both ways by IP addr but not by computer name and hence Network Neighborhood only shows the source PC name, and can not see the other shared folders
---------------
 Are NSLOOKUPs resolving the names correctly? Does it help if you stop then start the “DNS Client” service (not just “DNSCache”)?

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..? 
--------------------------
nslookup does not use the same references as ping
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.
---------------------------
Win 2k3 'Round Robin' setting
I didn't set this box up - looking at the DNS settings, i see it's set for round robin.
configured on the workstations? To clarify, on your workstations, do you have the primary DNS server as the ADC and a secondary DNS server ip that points to a non-Active Directory DNS server?
Answer
On Windows 2000 and later, if a request to your primary DNS server times out, it switches to the secondary DNS server and stays with it for a period of time. However, nslookup always connects to the primary.
Take a look at this article and be sure to read the part about caching negative responses.
Windows contains a client-side Domain Name System (DNS) cache. The client-side DNS caching feature may generate a false impression that DNS "round robin" is not occurring from the DNS server to the Windows client computer. When you use the ping command to search for the same A-record domain name, the client may use the same IP address. This behavior is different from Microsoft operating systems earlier than Windows 2000. These operating systems do not include the client-side DNS caching feature. This article describes how to disable DNS caching.
Note This article refers to the client portion of DNS. Do not use this information for making changes to DNS servers.
To stop DNS caching, run either of the following commands:
  • net stop dnscache
    -or-
  • sc servername stop dnscache
To disable the DNS cache permanently in Windows, use the Service Controller tool or the Services tool to set the DNS Client service startup type to Disabled. Note that the name of the Windows DNS Client service may also appear as "Dnscache."
Note The overall performance of the client computer decreases and the network traffic for DNS queries increases if the DNS resolver cache is deactivated.
The DNS Client service optimizes the performance of DNS name resolution by storing previously resolved names in memory. If the DNS Client service is turned off, the computer can still resolve DNS names by using the network's DNS servers.
When the Windows resolver receives a positive or negative response to a query, it adds that positive or negative response to its cache, and as a result, creates a DNS resource record. The resolver always checks the cache before querying any DNS server. If a DNS resource record is in the cache, the resolver uses the record from the cache instead of querying a server. This behavior expedites queries and decreases network traffic for DNS queries.
You can use the Ipconfig tool to view and to flush the DNS resolver cache. To view the DNS resolver cache, type ipconfig /displaydns at a command prompt. Ipconfig displays the contents of the DNS resolver cache, including the DNS resource records that are preloaded from the Hosts file and any recently queried names that were resolved by the system. After a certain time period, the resolver discards the record from the cache. The time period is specified in the Time to Live (TTL) associated with the DNS resource record. You can also flush the cache manually. After you flush the cache, the computer must query DNS servers again for any DNS resource records previously resolved by the computer. To delete the entries in the DNS resolver cache, type ipconfig /flushdns at a command prompt.
[...]
Subnet Prioritization 
The Windows XP DNS resolver also uses Subnet Prioritization. If the resolver receives multiple IP address mappings (A resource records) from a DNS server, and some of the records have IP addresses from networks to which the computer is directly connected, the resolver places those resource records first. This behavior reduces network traffic across subnets by forcing computers to connect to network resources that are closer to them.
Although subnet prioritization does reduce network traffic across subnets, in some cases you may prefer to have the round robin feature work as described in RFC 1794. If so, you can disable the Subnet Prioritization feature on your clients by adding the
PrioritizeRecordData
registry entry with a value of 0 (REG_DWORD data type) in the following registry key: For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DnsCache\Parameters
297510  How to Modify Time to Live on Domain Name System Records
286834  The DNS Client Service Does Not Revert to Using the First Server
For more information, see the Microsoft Windows XP Professional Resource Kit Documentation, chapter "DNS Caching, Network Prioritization, and Security."
Reply
We have no secondary internal DNS, and had round-robin set on the DNS server: i already turned that off. We are serving 2nd/tertiary DNS servers via DHCP to client workstations. I've turned off neg caching for all stations, serving a .reg via GPO. So far, on my own machine, i have seen no issues. Since this has been sporadic, it'll likely be a few days before i know it's gone for good.
I'm hoping this will also clear up the weird sudden-loss-of-shares and exchange issues
...
So: it is NOT resolving the CNAME correctly, but when asked about the machine itself, data, it resolves to the correct IP, and then the CNAME resolves "thru" the machine name to the target IP.
I incremented the serial the last time i made DNS changes. I made the above-suggested zero-neg-cache registry change. I have rebooted the machine and ensured all settings are current and policies are being applied.



DNS resolve problem with ping but not nslookup
windows XP SP3
my PC was not able to resolve DNS with most internet software
I tried pinging google and it also fails.
ping www.google.com
Ping request could not find host www.google.com. Please check the name and try again.

But nslookup can still work
*** Can't find server name for address 192.168.0.1: Non-existent domain
*** Default servers are not available
Server: UnKnown
Address: 192.168.0.1
Non-authoritative answer:
Name: www.l.google.com
Addresses: 209.85.165.103, 209.85.165.104, 209.85.165.147, 209.85.165.99
Aliases: www.google.com

------------------
Ping isn't going to work with many of the external host sites, so this is normal. If you can do an nslookup on a site, then dns is resolving correctly.
------------------
tenroc2o0o:
I've had the exact same issue on two computers and until I read this form it didn't occur to me it might have to do with SP3. I had just deployed SP2 & SP3 via group policy to over 40 PCs at my clients location while joining all of their computers to the new active directory network.
Basically, unless I use nslookup, DNS doesn't work. This includes Firefox, Internet Explorer, as well as internal active directory lookups to authenticate usernames and passwords against the domain. Noone could log on to the computer as a domain user - had to logon as local admin to work on it.
This means I could, say, "nslookup myserver.mydomain.local", get the IP, and then manually ping the IP and get a reply.
However, if I said "ping myserver.mydomain.local" it would say "Ping request could not find host myserver.mydomain.local. Please check the name and try again."
To me, basically this means nslookup can query because it simply opens a winsock connection on the DNS port and gets a query itself, whereas ping, IE, Firefox, and Windows itself for active directory domain authentication all cannot since they use the DNS Client service.
I had this same problem on now two computers. The first one, which I worked on earlier this week, I ended up formatting the computer to fix.
I tried specifying a static IP & DNS instead of using DHCP.
I tried uninstalling/reinstalling the network adapter.
I checked the Winsock using LSPFix to make sure there weren't any files missing or malware.
I checked hijackthis log for other malware - all clean.
I tried resetting all of the registry entries for the TCP/IP stack using
netsh int ip reset c:\resetlog.txt
SP3 reinstallation fixed all of the DNS query issues.
It's worth noting that even though DNS didn't work, WINS and NetBIOS still did so I could still connect to our server via \\myservername (or by IP of course). (whereas \\myservername.mydomainname.local did not because that's a DNS entry)
I just connected to my server & ran the SP3 update again and it fixed all of the DNS resolution problems.
----------------
Linux
I got the same problem with my two new virtual redhat and suse. It was the directory LDAP client which was the problem. Now both servers are running correctly.
If using linux (redhat or suse):
look at nsswitch.conf & ldap.conf
1) put "bind_policy soft" in /etc/ldap.conf
2) nsswitch.conf must minimum have:
passwd: compat
group: compat
hosts: files dns
networks: files dns
services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files
publickey: files
bootparams: files
automount: files nis
aliases: files
3) reboot
4) check with: ping, nmap localhost.
5) now you can enable your ldap client again. (RH: authconfig ; suse: yast2 ldap). It will modify your nsswitch.conf
-------------------
pings and nslookup problems are not related to AD, rather they are based on the client's network configuration and the client side resolver service

1 comment:

Unknown said...

I had a hard time learning why sometimes nslookup works and ping does not. Even most of the dns specific command will just work, however, ping wont. And most of the time was checking my resolve.conf and DNS setting, but the problem turn out to be the route. Once I setup the route properly it worked fine.