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

networkingopenwrtwireless-networkingwireless-router

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.

Best Answer

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.

Related Question