I'm having issues with one of my servers taking a long time to look up host names.
This is an Ubuntu 12.04 box, so I've tried following the new resolvconf
directives.
In my /etc/network/interfaces
file, I defined my name servers like this:
auto eth0
iface eth0 inet static
address someaddress
netmask 255.255.255.0
gateway 198.58.103.1
dns-nameservers 74.14.179.5 72.14.188.5
In my /etc/resolv.conf
, I see these name servers, like this:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 74.14.179.5
nameserver 72.14.188.5
On another box, I edited the resolv.conf
directly as directed by my hosts' setup help files. It looks like this:
domain members.linode.com
search members.linode.com
nameserver 72.14.179.5
nameserver 72.14.188.5
options rotate
This second box has no issues with host name look ups and responds quite quickly.
Could not having the domain
and search
directives make my look ups slow? By slow, I mean it's taking anywhere from 5 to 15 seconds to find the IP address of a host.
If I do a time dig @72.14.179.5 www.google.com
I get a response quickly with a "real" time of .170 seconds.
If I do a ping google.com
I get a real time of 10.078 seconds, even if I quit the ping after one response. Like this:
time ping google.com
PING google.com (74.125.228.37) 56(84) bytes of data.
^C64 bytes from iad23s06-in-f5.1e100.net (74.125.228.37): icmp_req=1 ttl=54 time=34.2 ms
--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 34.291/34.291/34.291/0.000 ms
real 0m10.078s
user 0m0.001s
sys 0m0.005s