If we divide a generic communication system into its most simple parts, we can distinguish four elements: a sender, a receiver, a message to communicate and a medium on which to do so. One of the problems that arises from establishing the communication is access to the medium. When there are multiple users or stations sharing the same communication medium or channel, access control is required to avoid two or more stations transmitting at the same time, which can cause interference and even make the communication impossible.
Carrier Sense Multiple Access (CSMA) is a protocol whereby a station with information to transmit first listens to the medium to ensure it is clear. If it is, it transmits the information; otherwise, it waits. The behavior when the channel is busy determines the persistence of CSMA: A persistent or 1-persistent CSMA will try to transmit as soon as the channel is clear, a non-persistent or 0-persistent CSMA will retry after a randomly selected time determined by a distribution of probability, and a p-persistent CSMA behaves persistently with a p probability and non-persistently with a 1-p probability. In general, when there is a large load, non-persistent CSMA provides better performance. There are two main variations of CSMA: CSMA/CD – Carrier Sense Multiple Access with Collision Detection and CSMA/CA – Collision Avoidance.
CSMA protocol variants
CSMA/CD is a variant that can be used in situations where the medium can be listened to during transmission. It enables stations to detect when interference is taking place and to cease transmission immediately, first sending a congestion signal to notify the other stations sharing the medium of the collision so that, if they have anything to transmit, they wait before transmitting. After waiting, transmission resumes if the medium is clear, thus ensuring the medium is equitably shared among stations and preventing any one station from monopolizing the communication. This protocol is not widely used today due to the use of link-level devices such as switches in Ethernet networks and the use of other protocols in other types of networks.
The other main variant of CSMA is CSMA/CA. In this protocol, if the medium is identified as being clear after listening to it, an additional randomly selected time is waited before transmitting, thus reducing the number of collisions.
These protocols are not without their problems, though, because they don’t solve problems like the hidden node. This deals with a scenario where there are two stations, A and B, which are out of range of each other, and a third station, C, within both their ranges and to whom both wish to transmit. In the case of B sending to C and A wanting to do the same, if A uses the CSMA protocol, it will check the medium but will not detect B. It will therefore identify the medium as clear and commence transmission, causing interference in the confluence zone between both stations.
Other alternative variants
Other protocols like MACA (Multiple Access with Collision Avoidance) solve this problem by sending extra frames: a Request to Send (RTS) frame sent by the sender and a Clear to Send (CTS) frame from the receiver, after which transmission commences. Evolutions on MACA itself, such as MACAW, solve the protocol’s problems by adding improvements like the receiver sending acknowledgements (ACK) upon receiving data frames. Currently, the IEEE 802.11 standard, which defines what is commonly known as Wi-Fi, uses a combination of CSMA/CA and MACAW.
There are more media access protocols such as ALOHA and its variants, and methods based on token passing or the master/slave system used for example in Bluetooth (IEEE 802.15). However, CSMA is particularly important today given the massive use of Wi-Fi networks among users.