Monday, March 29, 2010

DNS issues with Netgear WGR614v5

Sooo... here's the story.

I keep getting stuck on "Resolving host" when browsing the web. I developed a simple test. Open 9 tabs at the same time and see which get through and which don't. My Godaddy sites never come through, and most of the time neither do Twitter and Blogger.

What's really going on? Since it was stuck on "Resolving host" I reverted to some manual nslookup debugging. Even nslookup showed "DNS request timed out", and "timeout was 2 seconds".

I then updated my local LAN card to use Comcast's server instead of relying on the router's ability to do lookups. No change.

Solution:
Convert UDP DNS requests to TCP!! It seems that this router gets overwhelmed by routing the DNS requests and drops them.

When this happens, the WGR614v5 loses the ability to resolve DNS for about 5 - 10 seconds. During this time, I tested a custom DNS lookup using both UDP and TCP. The UDP lookup failed, and the TCP lookup worked. This prompted me to write a simple server which listens for DNS requests, wraps the data with the customary 2 byte size header and sends it on as a TCP request. Once the response comes back, I remove the 2 byte size header from the response, and I send it back to the requester.

The router may have a general UDP problem, as opposed to a UDP DNS problem, but all I care about at the moment is my ability to get to my webpages. As HTTP is TCP and it just relies on the DNS requests to get the address, this solves my problem well enough for now.

A new router is being purchased in the next few days...

4 comments:

  1. Thanks! I was struggling troubleshooting the issue of delays with this router and did the same, got another one, but all this makes me wonder if there is a way to fix the wgr614v5 by replacing (downgrading) the firmware or something similar. Did you try to fix it?

    ReplyDelete
  2. Since you asked, I just tried both 1.03 and 1.07 firmware versions. Besides being a huge pain b/c this router is sooo badly designed, it also doesn't work. The same issue exists.

    Regarding the huge pain part - the router keeps the wireless off unless you let it perform an autodetection sequence. And it doesn't give you any way to manually turn the wireless on. The wireless radio checkbox by default is checked and still the wireless is off.

    ReplyDelete
  3. Yes, I completely agree about that pain, my old wgr614v5 served me well for the last 5 years until this udp issue appeared, maybe it was time for a replacement. Also found several forums regarding bad udp dns behaviour on similar netgear routers.

    Now using a linksys home router, cheaper, smaller and way more capable than wgr614v5.

    I recommend you getting one, I chose the wrt54gh with speedburst

    ReplyDelete
  4. We are replacing it with a WRT54GL. I already have one for the office, and it's the best router I have ever used. I loaded it with DD-WRT and it's really amazing.

    ReplyDelete