# Slow WiFi connection

## alienjon

One of my roommates setup a LAN based file server in our house.  The server works fine, with both of my roommates reporting upload speeds of >5mb (one is >10mb).  Mine, however, seems to be capped off at 100KB/s in the best of cases and usually runs slower than that.  I'm connecting via a Zonet ZEW5200P to a WEP-encrypted router.  I'm also using wireless-tools on my machine to configure everything.

The only suggestions I found online (that seemed related) were to remove superfluous entries from /etc/hosts and to disable IPV6 in the kernel.  I removed IPV6 from the kernel and initially noticed a +30KB/s increase (this has since decreased again). Here's some files:

 */etc/hosts wrote:*   

> 127.0.0.1       localhost

 

 */etc/resolv.conf wrote:*   

> # Generated by dhcpcd from wlan0
> 
> # /etc/resolv.conf.head can replace this line
> 
> nameserver 192.168.0.1
> ...

 

 */etc/conf.d/net wrote:*   

> essid_wlan0="{network}"
> 
> key_{network}="{key}"

 

(Please note that, for the /etc/conf.d/net entry, items in braces were removed as they are the security info).

Does anyone have ideas why my connection isn't faster or what I could do to speed it up?  (I've always assumed that WiFi is naturally slower than wired, but only because my experience with WiFi has always BEEN slower, so I wonder if there's a kernel option/configuration options I've missed?)  I did check the gentoo network guide, and things should be setup correctly, but please feel free to correct me.

Also, in retrospect, outer-LAN downloads don't seem to go much faster than ~80KB/s max either (and some pages take a moment to load... DNS something maybe? -> I'm not even sure exactly what this is or how it works, though)

----------

## Bircoph

What iwconfig wlan0 (or whatever is name of your wifi device) is reporting to you?

You can change speed by, e.g.:

```

iwconfig wlan0 rate 36M

```

Please note: Higher wireless connection rate is not implying higher data transfer rate!! Because of packet losses you may have worse download speed with higher bitrate. You may use auto option to let device select speed itself and "<rate> auto" option to limit auto selected speed.

You may look for available rates by device and AP respectively:

```

iwlist wlan0 rate

iwlist wlan0 scan

```

----------

## alienjon

 *Bircoph wrote:*   

> iwconfig wlan0 rate 36M

 

Specifying the rate doesn't produce any output.  The standard iwconfig wlan0, however:

```
wlan0     IEEE 802.11bg  ESSID:"{XXXXXXXX}"

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:01:95:6A:3D:C7

          Bit Rate=1 Mb/s   Tx-Power=9 dBm

          Retry min limit:7   RTS thr:off   Fragment thr:off

          Encryption key:{XXXX-XXXX-XX}   Security mode:open

          Power Management:off

          Link Quality=34/70  Signal level=-76 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
```

 *iwlist wlan0 scan wrote:*   

>           Cell 05 - Address: 00:01:95:6A:3D:C7
> 
>                     Channel:11
> 
>                     Frequency:2.462 GHz (Channel 11)
> ...

 

Hmm, interesting.  Does this imply that the bitrate available for my network could be higher, but that I am just not connecting at that speed?

****EDIT****

Oh, I see.  'iwconfig wlan0 rate XX" SETS the rate to 'XX', not 'showing' the rate for that device.  Ok, well with that said I set the rate to 36M and restarted, but it reset back to 1M.

----------

## Dagger

You should get a better card. Intel or Atheros cards are much better supported under linux.

Also, why WEP?

----------

## alienjon

 *Dagger wrote:*   

> You should get a better card. Intel or Atheros cards are much better supported under linux.

 

Thanks for the tip!  As the issue isn't critical (I can certainly still use my computer and connect to the internet, albeit slower) and I don't have a whole lot of extra cash at the moment, I'm not really in the market for a new new one right now, but I'll look for one of those chipsets when I do have the extra cash, etc...

 *Dagger wrote:*   

> Also, why WEP?

 

Honestly, I've only had problems trying to setup WPA in Linux (real pain in the butt for me, for some reason, and the connection is ALWAYS dropping).  I looked for help in the forum a while back (and got some) but the problem has persisted and I just haven't gotten around to looking at it again.

As a final thought, it seems that the issue from before was likely related to the low rate.  Is there a way to set it permanently?  (It seems that when I restart net.wlan0 it keeps getting reset to 1M)

----------

