📜 ⬆️ ⬇️

Optimize your wireless connection or iwconfig can all

For a long time, I suffered from packet losses and a drop in WiFi speed on my laptop after some time. And so I came across a small article that helped me summarize my knowledge and consciously select the necessary parameters to optimize the performance of my network card.
Below I propose to get acquainted with the translation of this article.

This guide reveals the iwconfig for adjusting your wireless settings. Out of the box, the defaults are very liberal, they give good throughput under optimal conditions. In reality, you will never be as close to an access point as you would like, channels may overlap, and crowds of people will try to use the same channel as you. And the default settings in these conditions are not so good.

Please keep an open reference (man page) on iwconfig while reading this manual. I will describe only single examples of different teams. Help will give you much more detailed information on how to optimally adjust everything.
')
The first and most important is understanding what can lead to problems.

Attenuation


 [.]  -,    

Attenuation occurs when moving away from an access point or when there are reflective surfaces or absorbing materials on the signal path. An example of a reflective surface could be aluminum siding or reflective film on a window. Signals can not pass through such surfaces, they will be reflected.
Absorbing materials are more obvious. WiFi technology primarily uses frequencies near 2.4 GHz. Microwave ovens operate at the same frequency due to the absorption of water at these frequencies, which allows to heat the water. Thus, any large amount of water between you and the access point will reduce the signal. Examples: trees (and high humidity next to them due to evaporation), cement, concrete, and cinder blocks are all about half made up of water (by weight). Most other building materials contain less water and create less problems.

Symptoms:


Solution options:


Noise


 [.]  ,   

If attenuation reduces the signal level, then the noise increases the noise level. Roughly speaking, attenuation and noise lead to the same effect - the signal-to-noise ratio decreases. And if so, then the solutions will be the same. Well, unless the increase in receiver sensitivity does not help ...

This is usually environmental noise, or at least an unintended side effect. But on the other hand there is one special case.

But first a slight digression. The concept of 50% in technology is very important. It is often difficult to draw a clear boundary. Many measurable properties simply fade out (fade away) but never run out. So we have to artificially enter the threshold where something ends. This threshold is often 50%. As soon as something crosses the 50% threshold, it no longer exists. Where this 50% transition occurs is one of the most important technical characteristics for many inventions.

The developers of the 802.11 standard placed all the channels as close as possible to each other, on the border of 50% of power transitions. In theory, this means that two channels will not interfere with each other. But only in equal conditions. In practice, if your access point is on the first channel and the neighbor is on the second channel, then you will not be able to use your access point while visiting your neighbor. Your point is too far and the signal is too weak. (In some cases, you can get by with a directional antenna.)

For you, the nearest access points are just noise. You can apply the above techniques to reduce the noise level, with the only exception that a more powerful transmitter will interfere with the neighbor because of the interference of signals.

If you like to make antennas, then this can solve other problems. Other access points in your area may “blind” your receiver. For example, in a developed area you may experience communication difficulties at a distance of more than 100 meters. While with the disconnection of all nearby access points clogging the radio, the same antenna will be able to see access points a kilometer away.

Competition (Contention)


 [.] /   

When several people use the same access point, passions run high. First, everyone is running at the slowest speed. If at least one person connects from the old 802.11b WiFi adapter, no one will accelerate faster than 11MB. (For high end access points with multiple antennas this may not be true.)

The biggest challenge for competition is the ability to use only one radio channel at a time.
Each takes up the channel in turn and must complete the transmission in its own time. This is probably the biggest problem with WiFi on Linux. The default settings are configured for optimal transmission and these values ​​are terrible for situations with a lot of disagreement (collision).

Symptoms:


Solution options:

What about iwpriv?


iwpriv is a shockingly powerful utility. Basically, all non-standard functions are merged there. Some options are meaningless, others are wonderful, it all depends on the drivers, none of them are fully documented. Experiment with your wifi card. iwpriv most likely needs a separate article.

After connecting


You need an ip address. Usually dhcpcd is extremely slow and often time-out on weak glands. Dhcpcd will work 40 times faster if you run it dhdpcd -A wlan0 . Before Amtrak started placing wifi on trains, -A was crucial for hitting a new push with git or getting IMAP mail during a flight past the station. Usually, -A trusts the access point and skips checking that the resulting ip address is unique on the network.

Finally


From myself I will add that I did not translate the last part of the article, which contains warnings on the legality of increasing transmitter power. With this, I think, and so everything is clear.
This article has helped me a lot, I hope you did too.

My settings
sudo iwconfig wlan0 frag 1000
sudo iwconfig wlan0 rts 1024
sudo iwconfig wlan0 retry 30

Source: https://habr.com/ru/post/209572/


All Articles