Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have custom-built router, based on Intel D510MO motherboard with Slackware 13.37 on it. I'm using hostapd-2.0 and iptables to make it act as a router. Client is a laptop with Windows 7 on it. Both router and laptop have Atheros AR5BXB72 mini pci-e wlan cards.

When it's configured as 802.11g, there are basically no problems - it is stable and works at full speed, something around 2.7 MB/s (= ~21 Mbps), which seems to be OK for 802.11g.

When it's configured as 802.11n, funny things start happening:

  • web pages in my country seem to open at full speed <-- OK
  • speedtest.net reports speeds between 75-95 Mbps for local servers (100Mbps Internet connection) <-- OK
  • speedtest.net reports speeds up to 3-4 Mbps download, 7-9 Mbps upload for foreign servers <-- why?!
  • everything else (e.g., downloading huge files) outside my country works at 300-400 KB/s <-- why?!

What I've tried:

  • googled a lot…
  • various drivers on client (Windows)
  • update driver on router (Linux)
  • update hostapd to force operating in 40MHz even when BSSes overlap

Drivers on Windows - tried both default Windows drivers (from Win7 installation, from Windows Update) and drivers from atheros.cz (9.0.0.173, 9.1.0.314, 10.0.0.45, 10.0.0.221) - no changes, besides blinking orange WLAN status LED.

Drivers on Linux - used compat-drivers package to update ath9k driver. 802.11n used to be unusable, because it was very unstable, e.g., usually only half of web page loaded, or most of images did not load. I also tried pinging some foreign hosts - response times mostly were more than 1-2 secs, with lots of timeouts. After updating driver everything works stable, e.g., pages are fully loaded, bigger files are being dowloaded just fine, but the speeds are low - 300-400 KB/s for foreign resources.

Also, I noticed that hostapd often disables 20/40 MHz operation because of overlapping BSSes. Patched it to skip this check. With 20 MHz, Windows reports 130 Mbps connection speed, with 40 MHz - 300 Mbps. Internet works the same in both cases, but local network - 16-17 MB/s in 20 MHz mode and 20-21 MB/s in 40 MHz mode. Channels are chosen carefully, so my neighbours should not be affected by this.

Any ideas what else I could try? I really don't like the fact that I can use foreign resources with max 2-3 MB/s (with 802.11g), when I should have speeds up to 10-12 MB/s…

share|improve this question
add comment

3 Answers

If in-country connectivity is good, then the bottleneck is most likely your ISP. It's definitely not related to your AP. It's either the connectivity between your country and others, or your ISP may just not have good connectivity to foreign sites. You may be able to narrow it down by doing some traceroute tests to foreign sites to see if there's an obvious bottleneck.

As to the 40MHz, if you are in the 2.4GHz range, there are only 3 (or maybe 4 where you are) non-overlapping channels and your use of 2 of those channels may still be causing issues for your neighbors and possibly you, as well. But as I said before, that has nothing to do with the problem you're trying to solve, so long as you can get good bandwidth to local servers.

share|improve this answer
    
Well, if it was ISP, then both 802.11n and 802.11g would be slow. The funny thing is that while 802.11n works with 300-400 KB/s, 802.11g - with 2.7 MB/s (probably about the maximum what can be achieved in 802.11g). It shouldn't matter for ISP what type of network I use locally. –  binaryLV Mar 19 '13 at 2:03
    
If you use a 20MHz channel, does throughput on large files improve? –  scottm32768 Mar 19 '13 at 2:06
    
As for the neighbors, there's one on ch11 (802.11g), I'm on ch3 and ch7 - no overlapping here. Other networks are so weak that I rarely see them (signal strength is around -90, -100 dBm for those). –  binaryLV Mar 19 '13 at 2:06
    
scottm32768, no, it didn't seem so. To be honest, I even thought that switching to 20MHz (automatic disabling 40MHz) might cause the problems, therefore I disabled the check that switches to 20MHz. –  binaryLV Mar 19 '13 at 2:07
1  
ch7 overlaps with channel 11 (not a lot, but it does). You should use ch1 if your neighbors are on ch11 and you're using a 40MHz wide channel. –  scottm32768 Mar 19 '13 at 2:08
show 11 more comments

This part of the default hostapd.conf is very misleading:

# ieee80211n: Whether IEEE 802.11n (HT) is enabled
# 0 = disabled (default)
# 1 = enabled
# Note: You will also need to enable WMM for full HT functionality.
ieee80211n=1

If you're like me, you probably read that and enabled WMM:

wmm_enable=1

That's what's killing the throughput. WMM is a QoS service designed to leave bandwidth available for high-priority packets. Comment-out that wmm_enable=1 line, restart hostapd, and you should find your n speeds up where they should be -- faster than g!

share|improve this answer
    
I tried to enable/disable wmm_enable and it did not give desired results (I believe it was even worse without WMM). As for speeds being just "faster than g" - local network was up to 20-21 MB/s which is MUCH faster than g. The problem was that accessing foreign resources was awfully bad. It had basically nothing to do with my ISP, tested that. Anyway, it doesn't matter anymore as I've moved since then, changed ISP from 100Mbps fiber optics (which is even faster now, ISP upgraded speeds to 250Mbps) to 10-12 Mbps 3G connection and replaced custom-built router with Mikrotik's router. –  binaryLV Feb 5 at 11:30
add comment

"The speed of light sucks." - John Carmack

share|improve this answer
    
I'm slightly tired now, at 5am, but while giving a quick look to that article, I noticed that it suggests to enable TCP window scaling to solve that issue. Another article states that on Linux it's enabled by default since 2.6.8. Neither disabling it, nor re-enabling did not change anything. –  binaryLV Mar 19 '13 at 2:47
    
The TCP Window has to be changed on both ends of the connection, as well as all 'buffering' connections between the two end-points. –  Danack Mar 19 '13 at 2:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.