A “wasted” evening !

Yesterday I completed a long pending task. Something that I’d wanted to do for a very long time but never had the need, nor the compulsion to do it.

Over the past couple of days my router had been exhibiting DNS resolution issues. DNS resolution is the process of translating a URL like google.com to an ip address which a computer can understand.

This DNS resolution happens at multiple places:

1. Your internet service provider (ISP) has a DNS server. Which is like a constantly updating online table. Which maps URLs to ip addresses.

2. Your router (wifi modem) has another piece of software which stores (caches) the URL to ip mappings that the DNS server returns, so that it can get you to the URL faster.

3. Your computer (laptop or desktop) has software that caches the URL, ip mappings as well.

To identify the source of the problem I first connected the Ethernet cable that my ISP provides directly to my computer. All the URLs openednup fine. So the problem was not with my ISP’s DNS server. So problem with #1 is ruled out.
Some of you might not be able to follow this step signce your ISP gives you internet via a telephone cable which needs to go through a modem to connect to a computer.

Next, I cleared the DNS cache on my Mac (the command to do that is : dscacheutil -flushcache;sudo killall -HUP mDNSResponder) and tried to traceroute google.com , no change in latency. So, the only problem could be the DNS cache on my router.

So, I tried rebooting my router, Resetting it to factory settings, Flashing the latest firmware, to no avail.

Now, I had the motive, the will and the need to change the firmware of my router to dd-wrt. The open source router firmware running the latest linux kernel #superAwesome. After a couple of minutes of flashing the firmware and couple more to configure the settings I had the router working as new again !

Dd-wrt brings along with it, a bunch of goodies ! But that’s something I’ll leave for the dd-wrt website to explain.

Until next time ….

[1] http://dd-wrt.com/site/content/about