Late last week, the stalwart soupnazi née jerry crashed hard, taking a lot of data with it. Both Devan and I have since recovered most of our lost data, but the peculiar thing is that some hosts are still resolving dangerouslyinc.com to the old IP (including the Dal CS machines, which run the planet).
DNS is such a dark magic to me. I do not know how it works, nor do I wish to know.
DNS lookups at home were extremely slow for me. For instance, while doing some profiling of yum this afternoon, 10 out of 15 seconds were taken up resolving the IP of download.fedora.redhat.com. Replacing Road Runner’s DNS servers with OpenDNS took this down to 5 seconds. Putting OpenDNS before my router’s DNS server makes the time negligible.
Anyways, the details:
- Copy /usr/share/doc/dhclient-$VERSION/dhclient.conf.sample to /etc/dhclient.conf
- Edit /etc/dhclient, removing everything before the ‘prepend domain-name…’ line, and everything after the ‘initial-interval 2;’ line.
- On the ‘prepend domain-name-servers’ line, replace ‘127.0.0.1’ with
- Take down and bring back up your network connection. /etc/resolv.conf should now start with the two 208… IP addresses.
The important part I believe is to keep the ‘request’ and ‘require’ bits in dhclient.conf. This setup will play nicely with NetworkManager, too. Mad props to Orangebat for pointing out OpenDNS.
Here’s a sample dhclient.conf, to make it easy:
prepend domain-name-servers 126.96.36.199, 188.8.131.52; request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, host-name; require subnet-mask, domain-name-servers; timeout 60; retry 60; reboot 10; select-timeout 5; initial-interval 2;