Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a centos linux running as a virtual machine in a Virtual Box on my Mac OS 10.8.2. The virtual machine has the IP address I created an entry in /etc/hosts with centos.dev

When I try to ping the virtual machine via

ping centos.dev

it takes about 30 seconds for the first ping, after that, everything works as expected:

meckbuck2:~ mimi$ ping -n centos.dev
PING centos.dev ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=0.521 ms
64 bytes from icmp_seq=1 ttl=64 time=0.294 ms
64 bytes from icmp_seq=2 ttl=64 time=0.274 ms

If I use ping (no DNS resolution), everything is fast and the first ping starts within fractions of a second. So it seems as something is broken with the name resolution on my computer. Can anybody give me a hint how to solve this? It is a new MacBook Retina 15" which I set up from scratch less than a week ago.

I have also tried centos.localhost as a domain name - same problem here.

Once the domain is resolved and the IP is there, everything works as expected (ssh, smb, http...). Any hint is welcome!

Edit: I used dtruss to get a dump of the syscalls when I ping the server name. The ping gets stuck at the end of the trace. You can find it here: http://pastebin.com/JXgeHsBu

Edit 2: I followed the instructions on http://blog.root-of-all-evil.com/2012/07/how-to-bypass-os-x-lions-reverse-dns-lookup-order-to-resolve-slow-local-host-lookups/ to set up a local DNS server. Still the same issue.

tcpdump gives me the following output when I start a ping on the virtual machine:

01:16:27.668409 IP > 26754+ A? www.isg-apple.com.akadns.net. (46)
01:16:27.668456 IP > 41456+ AAAA? www.isg-apple.com.akadns.net. (46)
01:16:27.670650 IP > 26754 3/8/0 CNAME www.apple.com.edgekey.net., CNAME e3191.c.akamaiedge.net., A (275)
01:16:27.670932 IP > 41456 2/1/0 CNAME www.apple.com.edgekey.net., CNAME e3191.c.akamaiedge.net. (176)
01:16:33.178960 IP > 21942+ A? e3191.c.akamaiedge.net. (40)
01:16:33.180452 IP > 21942 1/8/0 A (200)
01:16:46.876547 IP > 6871+ A? 1.courier-push-apple.com.akadns.net. (53)
01:16:46.877900 IP > 6871 8/10/5 A, A, A, A, A, A, A, A (494)
01:16:53.863153 IP > 32328+ A? e3191.c.akamaiedge.net. (40)
01:16:53.884441 IP > 32328 1/8/0 A (200)

Edit 3: Here is my output of scutil --dns

meckbuck2:~ mimi$ scutil --dns
DNS configuration

resolver #1
  search domain[0] : hil-allhw.phl.wayport.net
  search domain[1] : phl.wayport.net
  nameserver[0] :
  reach    : Reachable,Local Address

resolver #2
  domain   : local
  options  : mdns
  timeout  : 5
  order    : 300000

resolver #3
  domain   : 254.169.in-addr.arpa
  options  : mdns
  timeout  : 5
  order    : 300200

resolver #4
  domain   : 8.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  order    : 300400

resolver #5
  domain   : 9.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  order    : 300600

resolver #6
  domain   : a.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  order    : 300800

resolver #7
  domain   : b.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  order    : 301000

DNS configuration (for scoped queries)

resolver #1
  search domain[0] : hil-allhw.phl.wayport.net
  search domain[1] : phl.wayport.net
  nameserver[0] :
  if_index : 4 (en0)
  flags    : Scoped

reach : Reachable,Local Address

share|improve this question

migrated from serverfault.com Dec 29 '12 at 16:22

This question came from our site for system and network administrators.

The trace is interesting, but I suspect you might see more useful info if you try running tcpdump -n port 53. You'll probably need to add a -i interface name also. –  Zoredache Dec 27 '12 at 18:22
This might be helpful. –  Aaron Copley Dec 27 '12 at 19:04

1 Answer 1

Might be some program is trying to update. I would guess you have already looked at setting the the Domain Name Server to something like Google DNS. There is a freeware for Apple that is called NameBench, which might provide more data.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.