CSMA/CD vs CSMA/CA

Network communication requires a set of rules to provide controlled and efficient access to the network medium. Medium access control (MAC) is the generic term used when discussing the concept of medium access. There are many ways to provide the access to the medium. There are methods like polling, token-passing, and contention. In this post, we will discuss contention-based methods. CSMA/CD and CSMA/CA are the two most commonly used contention methods.


Carrier sense multiple access with collision detection (CSMA/CD) method used in ethernet (802.3) networks to provide the access to the medium.
  

Carrier sense multiple access with collision Avoidance (CSMA/CA) method used in Wireless local area networks (802.11)  to provide the access to the medium.

In both these methods stations have to listen to the medium to see if any other device is transmitting, otherwise, they have to wait before transmitting.


Carrier sense multiple access with collision detection (CSMA/CD):  If a wired node wants to transmit first it will check whether any other wired node is transmitting on an ethernet medium. If the medium is free, first it will send a bit of information to detect a  collision. When there is no collision then it will send other bits of information and simultaneously check for collisions. If a collision is detected it will wait for a random amount of time before transmitting again.

802.11 radios are not capable of transmitting and receiving at the same time, so they are not capable of detecting a collision during transmission. Due to this reason, 802.11 devices use CSMA/CA instead of CSMA/CD to avoid collisions.

Carrier sense multiple access with collision Avoidance (CSMA/CA): In CSMA/CA method if a station detects the medium is free then the 802.11 radio will choose a random backoff time before transmitting. During this time station continuously monitor to make sure no other stations are transmitting. Because of the half-duplex nature of the RF medium, it's necessary to ensure that at any time only one 802.11 radio is transmitting. CSMA/CA is a process used to ensure that only one 802.11 radio is transmitting at a time.

Is this process perfect? Absolutely not!

Collisions still occur when two or more radios transmit at the same time.

The IEEE 802.11-2016 defines a function called Distributed coordination function (DCF), which allows for automatic medium sharing between compatible PHYs through the use of CSMA/CA. DCF uses Acknowledge (ACK) frames as delivery verification method.

Distributed Coordination Function (DCF): DCF is one of the fundamental access methods in 802.11 communications, and CSMA/CA is the foundation of DCF. With the 802.11e amendment, an enhanced coordination function known as Hybrid Coordination Function(HCF) builds further on DCF access methods. Here are the four main components of the CSMA/CA protocol, as defined by DCF:


  • Physical carrier sense
  • Virtual carrier sense
  • Pseudo-random backoff timer
  • Interframe spaces

802.11 radios use carrier sense mechanisms to identify whether the wireless medium is busy. There are two ways carrier sense is performed Physical carrier sense and Virtual carrier sense.

802.11 radios also contend for the medium using a pseudo-random algorithm and a backoff timer prior to transmission.

Interframe spaces are also used to further provide priority levels for access to the wireless medium.


Reference: CWNA Certified Wireless Network Administrator Study Guide



Comments