Let's Ginger-Fi it!

A blog about my adventures in Wi-Fi

802.11 is a very Canadian technology :)

Not that it was made in Canada but that it is super polite in how it works.

I was speaking to a friend of mine who is a network admin. Their wireless person left the company, and they received a ticket from a rural site complaining of their wireless. He told me he had explained to them that their wireless connection was no different than their wired, that instead of everyone having cables connected to the wall they all had invisible cables connecting them to their AP. I couldn’t help but respond with “Well, sort of. Only if it’s one cable that everyone is taking turns passing back and forth. Wi-Fi is half-duplex, so they have to take turns and all the connections don’t work simultaneously”. This led to more questions and explanations.

The 802.11 protocol follows a very polite, listen before talking, process. The best analogy for this is how walkie-talkies communicate. One side speaks and acknowledges they’re done, you wait to make sure no one else is saying anything (the channel is clear) and if you do happen to try to talk while someone else is, usually no one hears anything or just little bits make it through and you must try again (collisions, packet loss and retries).

This is because Wi-Fi falls in the unlicensed, uncoordinated, shared spectrum. Since we all must share it, we have to follow a protocol to ensure that everybody gets a turn and this shared space is often crowded and noisy (especially in the 2.4GHz spectrum as we only have 3 non-overlapping channels). Another great analogy I like for this is the quiet café vs a noisy bar. If you’re sitting in a quiet café having a nice conversation with someone (nice clear wireless environment), you both can hear each other well with no need to raise your voice or wait for other groups around you to quiet down. If you were to try to have the same quiet conversation with lots of loud people trying to yell over each other in a bar with loud music playing (high noise floor) it’s not going to be easy to hear all the words.

The 802.11 protocol ensures that everyone can talk, hear, and communicate. The foundation of all of this is based on something called the Clear Channel assessment (CCA).

CCA starts with signal detect. This means a device needs to listen before talking. Signal detect checks to see if there is any other 802.11 traffic out there because your device can’t talk if somebody else is talking. It checks to see if there is any preamble (announcements). The preamble must be 4 dB above the noise floor. 

The second part of this process is energy detect. Energy detect looks to see if there is any energy at all (802.11 or not). This energy must be 20 dB above the signal detect and if a device hears any energy at this level, it will back off because the channel is not clear. Not only is it going to back off, but it also starts what is called the back off timer. The device will back off and wait its turn. The device is given a random number to wait before it tries again. Eventually the protocol is going to allow the device to transmit but this causes reports of spotty and inconsistent experiences.

An interesting aspect to this is that every device measures values differently; different devices have different capabilities and sensitivities. This can cause the measured noise floor to be a different value from one device to another. All this needs to be taken to into account with regards to the clear channel assessment

Another thing to consider is that when we bond channels (go from 20 to 40MHz, 40MHz to 80MHz, etc.) we raise the noise floor by 3dB for each doubling! This could be the difference between whether the channel is considered clear or not. When we implement channel bonding the device has to perform the clear channel assessment for the primary channel and then also for the second channel, third channel and the fourth channel, etc.

Clearly there are trade-offs to channel bonding. When we bond two channels together, we literally double the ability to go fast but if it’s a noisy environment, we are now doubling the chances of failing the clear channel assessment.  Only when the device has all clear on both bonded channels will the device be able to transmit or receive on the full 40 mhz and the same is true with the four channels of an 80 mhz channel, etc. This can be a waste of spectrum if you are in a noisy environment that you’re not even going to be able to take advantage of it. This should always be considered before you make the decision to use a wider channel plan.

The higher data rates provided by channel bonding are very sensitive to noise if there is a lot of noise in the environment, devices are going to step down to a lower data rate which is more robust. This is usually when we start to receive complaints about the Wi-Fi.

This really seemed to help my friend understand the process better and I’ve used this information a few more times to help clarify things for other people. Knowing the whys of an issue is usually a big step in fixing an issue 😊

Published by

Leave a comment