Saturday, August 04, 2012

Ubuntu DNS slow in 12.04

I noticed recently that I had slowness in Ubuntu.  It was taking forever to surf the web.  No problems using IP addresses but pinging with dns was very slow.

I run Ubuntu 12.04 (yes I enjoy Unity!) and as a consultant I go to many different customer sites.  I had recently run updates so I thought something got screwed up on my machine or it was slowness at a site.  After a couple of days, updates, and different sites I noticed no change so I investigated.

In 12.04, DNS was changed quite a bit and uses something called resolvconf now.  This actually works much better with some VPN networks I connect to in terms of split tunneling so I've been happy with it. I had to change some scripts I use on my machine for stats but that wasn't a big deal.  No more /ets/resolv.conf or so I thought.

I checked my DNS stats and everything checked out.


nmcli dev list | grep DNS
IP4.DNS[1]:                             208.67.222.222
IP4.DNS[2]:                             208.67.220.220

I finally looked at resolv.conf and found entries in the file for a site I had been to a few days ago.  Clearly my machine was trying to hit those DNS servers, timing out, and finally using my real ones.  I manually edited resolv.conf to remove those servers and I'm blazing again.

Not sure why the reslov.conf file wasn't clearing out but something to keep an eye on.

No comments: