I'm having an issue which recurs every few days, whereby ping cannot resolve a hostname on my LAN (but nslookup is able to). This is on OSX 10.9.2 (latest).
The machine in this case is called 'solo', although it can occur with other hostnames at different times. There have been no changes to my network infrastructure, and I know from experience that it will fix itself after a period of time (although what occurs to fix it is unclear).
I understand ping will refer to local resources before finally making a dns request, but I have nothing in /etc/hosts and I've flushed my local dns cache (aswell as the server cache)
Can anyone explain this phenomenon?
ping cant resolve 'solo'
[carpii@imac:~]$ ping solo
ping: cannot resolve solo: Unknown host
flush local dns cache for good measure
[carpii@imac:~]$ flushdns````
ping 'creek' which is my dns server
[carpii@imac:~]$ ping creek
PING creek.carpnet (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: icmp_seq=0 ttl=128 time=2.640 ms
64 bytes from 192.168.1.2: icmp_seq=1 ttl=128 time=2.702 ms
nslookup CAN resolve solo, and using correct dns server
[carpii@imac:~]$ nslookup solo
Server: 192.168.1.2
Address: 192.168.1.2#53
Name: solo.carpnet
Address: 192.168.1.79
ping 'solo' by ip
[carpii@imac:~]$ ping 192.168.1.79
PING 192.168.1.79 (192.168.1.79): 56 data bytes
64 bytes from 192.168.1.79: icmp_seq=0 ttl=64 time=6.294 ms
64 bytes from 192.168.1.79: icmp_seq=1 ttl=64 time=2.801 ms
but still i cant ping by hostname
[carpii@imac:~]$ ping solo
ping: cannot resolve solo: Unknown host
even with dns suffix
[carpii@imac:~]$ ping solo.carpnet
ping: cannot resolve solo.carpnet: Unknown host
ping another LAN machine served by same dns server
[carpii@imac:~]$ ping nelson
PING nelson.carpnet (192.168.1.66): 56 data bytes
64 bytes from 192.168.1.66: icmp_seq=0 ttl=64 time=6.297 ms
64 bytes from 192.168.1.66: icmp_seq=1 ttl=64 time=2.712 ms
[update: can ssh into another lan host, and able to resolve solo from there]
[carpii@imac:~]$ ssh node@node
/www/nodechat> ping solo
PING solo.carpnet (192.168.1.79) 56(84) bytes of data.
64 bytes from solo.carpnet (192.168.1.79): icmp_seq=1 ttl=64 time=2.02 ms