TutorChase logo
Login
AQA A-Level Computer Science

18.2.8 CSMA/CA Protocol

Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) is a crucial wireless networking protocol that helps prevent data collisions by managing how devices share a communication channel.

Introduction to CSMA/CA

Wireless networks present unique challenges compared to wired networks, particularly in terms of how devices access a shared communication channel. In wired systems, collisions can be detected using protocols like CSMA/CD (Collision Detection), which rely on the physical medium to recognise when two transmissions interfere. However, in wireless environments, collision detection is far more difficult due to radio signal interference and the fact that not all devices can hear each other. This is where Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) becomes essential.

CSMA/CA is a media access control (MAC) protocol used in wireless networking, especially within the IEEE 802.11 family of WiFi standards. It is designed to help devices communicate efficiently on a shared medium by avoiding, rather than detecting, collisions. It operates at the data link layer and is vital to ensuring reliable communication in wireless local area networks (WLANs).

How CSMA/CA works

Carrier sensing and access method

Take your grades to the next level!

UPGRADING TO PREMIUM UNLOCKS
AI Tutor
AI-powered study assistant
instant feedback and guidance
Predicted Papers
Examiner-style predicted papers
based on recent exam trends
Practice Questions
All exam practice questions
by topic for each subject
Study Notes
All detailed revision notes
written by expert teachers
Cheat Sheets
Quick revision summaries
perfect for last-minute review
Past Papers
Complete collection
of practice and past exam papers
Email
Password
Confirm Password
Already have an account?

Practice Questions

FAQ

Wireless networks cannot use collision detection because the nature of radio communication makes it technically infeasible for a device to detect a collision while transmitting. In wired Ethernet using CSMA/CD, devices can detect voltage changes on the wire to identify collisions during transmission. In wireless communication, however, a device's own transmission signal is significantly stronger than any incoming signals, meaning it cannot "hear" other transmissions while sending data. This prevents the device from recognising when a collision occurs. Additionally, the presence of obstacles, varying transmission ranges, and interference from other sources make it even harder to reliably detect simultaneous transmissions in wireless environments. As a result, wireless networks use CSMA/CA, which avoids collisions by requiring devices to listen to the channel before transmitting and by optionally using RTS/CTS handshaking to reserve the medium. This proactive approach is far better suited to the unpredictable and shared nature of wireless communication channels.

The backoff period in CSMA/CA is determined by selecting a random number of time slots from a range known as the contention window (CW). The initial CW is relatively small, and if a device experiences a collision (e.g. it does not receive an acknowledgement), the CW is doubled in size to reduce the chance of further collisions. This process is called binary exponential backoff. For each retransmission attempt, the maximum value of the backoff increases, allowing devices to space out their retry attempts more widely, especially in congested networks. This reduces the chance of repeated collisions when many devices are trying to send data. If a device continues to fail, the CW continues expanding up to a predefined maximum. Once a successful transmission occurs, the CW is reset to its minimum size. This dynamic adjustment allows the network to respond to changing levels of congestion, balancing efficiency with fairness in medium access.

CSMA/CA handles fairness through its use of randomised backoff times and a shared contention mechanism. Each device senses the channel and, upon detecting it is free, waits for a Distributed Inter-Frame Space (DIFS) before choosing a random backoff time within a defined contention window. The randomness ensures that devices are unlikely to transmit at the exact same moment. Devices that have waited longer without success will continue increasing their contention window, giving newer devices a chance to transmit sooner. This approach spreads access opportunities evenly among devices over time, preventing one device from monopolising the channel. Additionally, because the backoff timer pauses during a busy channel and resumes when it becomes free again, devices that have already waited are prioritised, which discourages starvation. Although not perfectly fair in every instance, CSMA/CA provides a practical and adaptive system that maintains long-term fairness across a variable number of users competing for access.

Inter-frame spaces are timed intervals used in CSMA/CA to regulate the timing between transmissions and ensure proper coordination between devices. The most commonly used inter-frame spaces include:

  • SIFS (Short Inter-Frame Space): This is the shortest interval and is used for high-priority transmissions like acknowledgements (ACK), Clear to Send (CTS), and data frame fragments. Devices use SIFS to respond quickly without contention.

  • DIFS (Distributed Inter-Frame Space): This is used by devices before initiating a new transmission. It is longer than SIFS and gives priority to in-progress exchanges.

  • EIFS (Extended Inter-Frame Space): Used when a device receives a frame with errors and must wait longer before trying again.

These intervals ensure that responses like ACKs and CTS frames get sent without interruption, giving ongoing communications priority over new ones. They also help in reducing collisions and managing orderly access to the medium. The correct use of inter-frame spaces is essential for reliable and efficient wireless communication using CSMA/CA.

When a device is in the process of counting down its backoff timer and detects that the channel has become busy (i.e. another device has started transmitting), it pauses the countdown immediately. The current value of the backoff timer is stored, and the device waits until the channel becomes idle again for a duration of the Distributed Inter-Frame Space (DIFS). Once the DIFS period has passed without any new transmissions detected, the device resumes the countdown from where it left off. This ensures that devices which have already waited longer have a higher chance of accessing the medium before those just beginning their countdown. This mechanism is crucial for maintaining fairness and reducing the likelihood of collision when the medium becomes free. It also prevents devices from restarting the countdown unnecessarily, which would disadvantage them unfairly and lead to inefficient use of the channel.

Hire a tutor

Please fill out the form and we'll find a tutor for you.

1/2
Your details
Alternatively contact us via
WhatsApp, Phone Call, or Email