Wireless is slow, but only to the internet, not local connections

8

2

I have a Ubiquity RouterStation Pro running the latest release of OpenwRT.

Connecting via a wire directly to the router, or through a switch, I get exactly the speed I would expect, both to my local network, and to the internet. Gigabit to the the local network, and about 1.2 megabytes/second to the internet.

Connecting via a wireless G connection, I get exactly the speed I would expect from local servers, which is about 3 megabytes/second (sure, it could be better, but it isn't bad).

When I use the same exact wireless connection as above, however, and download something from the internet, my maximum speed is about 30-60 kilobytes/second. There is no significant packet loss when I use ping.

The speed tests above were taken by downloading files via http or ssh (via scp and rsync). However, using the tool iperf, which does network performance testing, I can get my full internet speed for any connection on any port, even over wireless.

I am really confused. Any help?

Edit

After some more thought, I thought the problem might be related to packet size (I saw something similar before on another network). To test this, I used ping -f -c 500 -s $SIZE, (ie: sending pings of various size). Below a packet size of about 220, the pings had almost 0% drop rate. Above that the drop rate climbed rapidly, reaching 30% at a size of 512 bytes.

Using this data, I modified the route table on the laptop to set the MSS to 220, which as I understand it, limits the size of TCP/IP packets to about that size. Then I ran a speed test, and I get 600-700KB/s. Much better! I attribute the decreased speed compared to the wired connection to having such a pitiful packet size.

I don't consider this fixed, but just a work around. I still want to find out why this is happening, and how I can fix it.

Mike Cooper

Posted 2012-02-13T19:41:18.207

Reputation: 2 036

1

What results do you get from speed testing sites like speedtest.net?

– David Schwartz – 2012-02-13T19:58:28.157

speedtest.net matches the confusing http and scp performance, fast on the desktop and slow on the wireless. – Mike Cooper – 2012-02-13T20:08:13.017

@MikeCooper You may want to look at the Fragmentation Threshold on your wireless router - if you set it lower (default often 2346, depends on router), you can achieve the same effect as forcing smaller packets on the laptop, but affecting every device that connects to the router. It could be that your area is just extremely noisy. Recommended values are often multiples (fractions) of the MTU, e.g. if the MTU is 1500, maybe try a Fragmentation Threshold of 1500, 750, 375, etc. – Bob – 2012-02-16T08:55:20.077

ifconfig on OpenWRT size will show you state and settings of all interfaces. Better to increase MSS on OpenWRT, than decrease on other size – Lazy Badger – 2012-02-19T18:35:42.633

Unfortunately, this problem wasn't solved within the time limit of the bounty. If I could, I would extend it longer, but I can't. – Mike Cooper – 2012-02-23T21:48:57.573

Answers

4

I would guess that you are facing a problem of wireless interference, so that lowering the packet length minimizes the damage done by lost packets and the time it takes to resend the packet.

If the problem is interference exterior to your home, you could use a wireless network detector to detect the networks around you and the channels that are used. Some such products are inSSIDer or Kismet. You could then choose a channel that doesn't conflict with your neighbors. Channel 11 should be preferred, if possible, as it is the strongest.

The interference may also be caused by a heavy home appliance working (such as the dish-washer), at your place or at the neighbor's. This only applies if the effective network speed undergoes fluctuations.

The placement of the wireless router is very important. It should be positioned away from metallic or electrical elements and away from the floor. You could experiment with various places for it to see if this has any effect. The computers using it should not be placed too far away or at the end of its range.

Another possibility is that some wireless network card in your house is defective and deranges the entire network. It could be "bombarding" the network with packets and causing collisions. Try to turn on computers in a controlled manner and test network speed (turning them off by also unplugging the power cord).

Last, you wireless router may be defective. Try another router to test it out.

harrymc

Posted 2012-02-13T19:41:18.207

Reputation: 306 093

I don't think that the problem is wireless interference, because as I stated above, traffic between my laptop (over wifi) to a local server is quite fast, as fast as I can reasonably expect wifi to be. I have tested this with the wireless router on a clear channel (I did check that) and within a few feet of the laptop in question, it being the only wireless device connected. If this were simply that the wireless was universally slow, I would agree with you, and because of that, I have already tested everything you have mentioned. Thanks for the ideas though. – Mike Cooper – 2012-02-16T18:36:20.503

Have you tried another router (non-OpenwRT) ? – harrymc – 2012-02-16T19:59:10.850

Yes. Another router works fine all around. If it is a problem with the router being faulty, thats ok, but I want to be able to prove that. Another interesting thing is that this router allows me to switch out the wifi card, so just replacing the wireless card is also an option. – Mike Cooper – 2012-02-16T21:43:21.293

The conclusion is that the problem is with the router. The problem can be either hardware or firmware. For firmware you could reset the router to (1) default OpenwRT config, or (2) manufacturer's latest firmware (non-OpenwRT) downloaded from website. (2) is required if the router is still under warranty and will also tell you if the problem is really hardware. Frankly, with prices what they are, if it is not under warranty and if the manufacturer's firmware still doesn't work, I would advice to just buy a new one. – harrymc – 2012-02-17T07:32:59.393

I have reset the firmware, and the problem was not resolved. There is no "manufacturer's latest firmware". The official firmware is OpenWRT. While buying a new one would make the problem go away, it doesn't fix it, mainly because I still don't know what went wrong. – Mike Cooper – 2012-02-19T17:51:41.737

I have no knowledge of your router, but one solution that sometimes works is to turn off IPv6 everywhere. – harrymc – 2012-02-19T18:31:38.550

BTW, as regarding the lack of a manufacturer firmware, your router also supports DD-WRT. You could try this as another test for the hardware/firmware question. – harrymc – 2012-02-20T06:54:19.640

2

Sounds like a traffic shaping issue. Please try to do the following:

  1. Do you have qos-scripts installed?
    If you don't know, please check the /etc/config/qos file and see if there are any specific rules for the wireless interface.
  2. What build/version of OpenWRT are you using? Latest trunk, latest stable release, latest LTS? If it is latest trunk, try to roll back to the latest stable one.

Temikus

Posted 2012-02-13T19:41:18.207

Reputation: 363

I am currently running latest stable. I have set up qos-scripts in the past, but I am not sure if they are still running. I will check. – Mike Cooper – 2012-02-19T17:52:21.457

No, I don't have qos-scripts installed anymore. I guess I did a full system reset since I last installed that. – Mike Cooper – 2012-02-19T17:55:24.253

Well, there's been quite a lot of fixes since the last backfire release. Can you try the trunk version of the firmware? – Temikus – 2012-02-19T18:25:14.850

2

It seems you have MSS clamping

You have to check and fix iptables rules

Useful readings (partially related)

HTH

Lazy Badger

Posted 2012-02-13T19:41:18.207

Reputation: 3 557

As I understand it, wouldn't MSS clamping affect my wired connections just as much as my wireless connections? – Mike Cooper – 2012-02-20T23:58:51.703

@MikeCooper Can say nothing. It was only idea, I didn't read rules, and, at last, LAN and WLAN interfaces are just different – Lazy Badger – 2012-02-21T00:51:17.973