More DD-WRT / Linksys WRT54G troubleshooting

{% raw %}
After my evening spent getting my DD-WRT firmware to a stable version (as opposed to the version recommended by the DD-WRT website), I had hoped that I had seen the end of my wireless issues.

No such luck.

I have definitely seen an improvement - in a ping flood test, I'm only seeing 0.5% dropped packets now, which is an improvement over the 2% I was seeing before.  But there are still periodic ping spikes where I drop a packet, then get something like an ~1100ms ping, then ~110ms, then back to normal at ~2ms.  I tried leaving a ping running in the background today, and every Skype audio drop was accompanied by a dropped packet.  So I'm going with correlation = causation and assuming that these periodic spikes which are causing my Skype audio drops.

The first thing to do is understand the nature of the beast.  So I graphed my pings:


What's interesting about this chart is not that Excel makes it difficult to label your axes.  Excel is a pain in the ass sometimes, there's no revelation there.

I'm looking for patterns here.  With one ping per second, my timeouts occur for packets 91, 128, 158, 160, 171, 199, 214, 219, 259, 274, and 366.  The ping spikes occurred at 91, 183, 274, and 366.  Note that dropped packets don't count, so the spike at packet 91 is really after the one failed attempt for packet 91.

Well, there's definitely a pattern in the ping spikes - I get pings of >800ms every 90 seconds or so.  So one problem is happening every minute and a half.  The other problem starts after that first dropped packet, where I drop a packet every 10-20 seconds.

The first culprit to suspect is always wireless interference, and sure enough, the vast majority of my neighbors are sharing channel 6 (2.437 Ghz range) with me.  Here's a handy chart I used to work out the best channel to avoid my neighbors' traffic.

Most of my neighbors are on 6 or 11, with a couple on 3.  So I chose channel 1.  This seemed to cut out a lot of the 10 second interval drops.  Next I disabled the SPI firewall, to make sure I was minimizing the processing required for each packet.  Here's my ping graph after the change:



As you can see, no more problem with dropped packets every 10-20 seconds, but I still get enormous ping spikes every 90 seconds, which resulted in only one dropped packet.  Hey, it's improvement!  Another interesting element is that the ping spikes actually improved over time, while my average ping was significantly higher (23ms vs 19ms).  I'm going with chance fluctuation on that one, I don't have a good explanation for it.  (note - I was using the web interface for the router at the time, and loaded up diagnostic pages for the two smaller spikes... so I'm not worried about them)

So I had a look at DD-WRT's own diagnostic pages, and noticed that the errors it was aware of were all transmit errors. The number one and two causes of transmit errors are too high ACK timing and too high transmit power.  Dropping the ACK to 0 and setting transmit power to the (factory) 22mW didn't help.

So now I'm stuck.  I definitely got some benefit here, though I'm not too happy that my average ping rose like that.  But every 90 seconds SOMETHING happens that breaks my wireless connection.  I'm going to puzzle over this for awhile.
{% endraw %}
comments powered by Disqus