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.

Check Cisco md5 checksum on Ubuntu

Here's a quick tip.  You may have noticed when downloading files from certain locations such as Cisco.com, MD5 checksums are listed.

Something like this:
MD5 Checksum:04f9d3f5a91a8b80397773a265a88848

MD5 checksums verify integrity of files you have downloaded.

In Ubuntu (and most other distros), md5sum is a program automatically included that allows you to check MD5 Checksums.

Simply run md5sum from terminal.

md5sum waas-universal-4.5.1.2-k9.bin
04f9d3f5a91a8b80397773a265a88848  waas-universal-4.5.1.2-k9.bin

One more tip.  Depending on the device and IOS image, you can verify MD5 on Cisco routers as well.  
Simply run
verify /md5 flash:iosimage.bin

Router#verify /md5 flash:c2800nm-spservicesk9-mz.124-25f.bin
.....Done!
verify /md5 (flash:c2800nm-spservicesk9-mz.124-25f.bin) = 09322ffb9111bce00a8eef38165f30e4