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.

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
share|improve this question

closed as off-topic by MDMarra, EEAA, Jacob, Scott Pack, Katherine Villyard Mar 23 at 17:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – MDMarra, Jacob, Scott Pack
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Is the client configured to use only 192.168.1.2 as its DNS server, or does it also have other DNS servers? Also, what does the flushdns command do (it's not standard on OS X)? –  Gordon Davisson Mar 23 at 17:06
    
Thanks, you helped me look into this further as I had been focusing purely on the dns server config. It turns out it was my DHCP server at fault, which was telling client to use a secondary DNS of 8.8.8.8 –  carpii Mar 24 at 23:50
    
No idea what is causing this but I always do a sudo ifconfig en0 down && sudo ifconfig en0 up –  null Sep 9 at 17:47

Browse other questions tagged or ask your own question.