Our company network uses xxx.companyname.local for all the servers on our local network. Whenever I access one of these servers on my Mac, I have a 10 second delay. I have found out that this delay is caused by DNS lookups, because apparently Lion resolves .local domains in the following order:
- check
/etc/hostsfor IPv6 address - check DNS server for an AAAA record (IPv6 address)
- check via MDNS (Bonjour) for an AAAA record
- check
/etc/hostsfor an IPv4 address - check DNS server for an A record (IPv4 address)
- check MDNS for A record
Now, the problem is, we don't have an IPv6 network. All xxx.companyname.local servers on our network have only IPv4 addresses and the DNS server has only A records. This means that the address is resolved in step 5. The problem with this is that step 3 takes ten seconds before it times out! Every time I connect to our wiki, SVN server, Kerberos server, etc, there is a 10 second delay.
I have managed to trick Lion by adding lines like the following to /etc/hosts
::FFFF:10.99.99.99 xxx.companyname.local
If I do this, Lion thinks there is an IPv6 address for the domain and stops after step 1. However, this workaround totally circumvents all the useful features of DNS. I don't want to manually keep track of the IP addresses of dozens of internal domains! I could as well stop using host names and just type IP addresses!
So: Does anybody have an idea how to change this lookup order? Or disable IPv6 lookup since we don't have an IPv6 network anyway?