Handbook-IP/Network                                                                                 Home : www.sharetechnote.com

 

 

 

WLAN: CSMA/CA

 

CSMA/CA is made up of following three components (process). So if you have clear understanding of each of the component processes, you would understand what CSMA/CA is.

  • CS : Carrier-Sensing
  • MA : Multiple Access
  • CA : Collision Avoidance

 

Now let's think of each of these component process. The centrol component among this is 'MA', so I will start with MA.

 

 

What is MA ?  

 

MA stands for Multiple Access. What does it mean ?

Simply put, Multiple Access is 'sharing (accessing) a single physical resource among 'Multiple' entities (e.g, multiple device, multiple persons etc).

 

For example in our daily life, I can say 'any road (or street) with a lot of cars running on it is a kind of Multiple Access. The road in front of your house is a physical resource and that physical resouce is shared (accessed) by many cars.

 

In similar logic, Ethernet (e.g, LAN system) can be Multiple Access system. In LAN (Wired LAN) system, many network cards are connected to a single LAN cable backbone. Even Wireless LAN can also be a Multiple Access system since multiple Wireless device is sharing same physical resource which is same RF frequency.

 

 

What is CS ?

 

To make this kind of Multiple Access system work properly, all the device sharing the resource should have a certain techniques to avoid conflict among the multiple devices competing for the same resource. This 'conflict avoidance technology' (called 'collision avoidance system') used in ethernet is called 'CS' (Carrier Sensing).

 

CS (Carrier Sensing) may sound intimidating but the concept is simple. it is what you do every time you drive your car from your house into a big road in front of your house. When you drive into a road, you don't just drive into the road. If you do that, you may easily get hit by other cars driving along the road.  Usually you take a look at the traffic on the road first. and if there is no cars passing by the road, then you drive into the road. and if there is a car passing in front, you just wait until it passes by. In other words, you are 'Sensing' the traffic and then drive into (or wait).

 

It is same logic in Ethernet System. Before a device send any data, first it checks if there is any other traffice sent by other device. In other word, it 'Sense' if there is any traffic sent by other device. If there is no traffic, it sends its own data. If there is traffic, it wait until the traffic passes by.

 

 

What is CA ?

 

In case of Wired Ethernet, they use CD (Collision Detection), but in case of Wireless case the device cannot detect the collision directly as in Wired case since Wireless LAN Device cannot detect any incoming signal while it is transmitting since it is half Duplex (TDD). It means that the device cannot detect (using reciever chain) anything while it is transmitting (using transmitter chain), thus the device cannot perform CD (collision dection) while it is transmitting.

 

In case of CD, the device is directly check the voltage level on wire, but in wireless case the device cannot check collision in this way.

 

Then how Wireless device can detect collision ?

 

In CA (Collision Avoidance) method, the device is waiting for ACK frame from the reciever. If it does not detect the ACK frame from the reciever within a certain time frame, the transmitter assumes that there is some collision happened and stop transmitting for a certain backoff time.

 

The problem of this mechanism is that it is creating a lot of overhead due to the collision detection and ACK waiting time, the overhead may take around 50 %.

 

 

Channel Sensing(Carrier Sensing) in Action

 

Overall procedure of Carrier Sensing and Data Transmission goes as follows.

(A) : Before a device try to transmit any data, it start Carrier Sensing.

(B) : If the device detect any carrier signal (i.e, some other device is using the channel), it just go back to 'Waiting' mode and would not try further carrier sensing for a BackOff Period.

(C) : Even if the carrier is not busy (i.e, even if nobody is using the channel), the device keep sensing the carrier for a certain duration (DIFS). If it detect any carrier signal during this period, it go back to 'Waiting' mode and would not try further carrier sensing for a BackOff Period.

(D) : If no carrier signal is detected for a certain period (DIFS), the device assume that the channel is clear (nobody is using the channel) and it transmit its own data.

 

 

NOTE : The term 'Sleep' in the illustration does not mean the sleeping mode for power saving. It just mean 'Waiting (no data transmssion and carrier sensing activity'.

 

 

Reference :

 

[1] How WLAN CSMA/CA Works  

[2] 802.11n Tutorial