On my Windows XP workstation, I can find the machine I want to connect to in DNS with nslookup
:
nslookup wolfman
Server: dns.company.com
Address: 192.168.1.38
Name: wolfman.company.com
Address: 192.168.1.178
But, when I try to connect to that machine, I get an error telling me that the machine can't be found (i.e., can't be looked up in DNS):
C:\> ping wolfman
Ping request could not find host wolfman. Please check the name and try again.
I am able to connect if I use the IP address directly:
C:\> ping 192.168.1.178
Pinging 192.168.1.178 with 32 bytes of data:
Reply from 192.168.1.178: bytes=32 time=41ms TTL=126
Reply from 192.168.1.178: bytes=32 time=41ms TTL=126
Reply from 192.168.1.178: bytes=32 time=44ms TTL=126
Reply from 192.168.1.178: bytes=32 time=38ms TTL=126
I could work around this by adding an entry to my hosts
file, but I would rather find out why this is happening. The problem is transient, most of the day I can connect to the machine just fine.
How is this possible?
ETA: I left this out for brevity, but it was asked for:
C:\> ping wolfman.company.com
Ping request could not find host wolfman.company.com. Please check the name and try again.
ETA: Other applications get the same results. I only tried ping to simplify. telnet can't connect, Cygwin apps print a "unknown host wolfman" message.
Update: Using wireshark, I found that my workstation is not attempting a DNS lookup. It's just reporting the "could not find host" error message.
.company.com
.nslookup
which uses thesearch domain
parameter of a DHCP offer (or whatever you specify for a static IP configuration). Confirm this by doing what @SLaks has said and pinging the FQDN of the host :)ping -4 wolfman
?