Signup/Sign In

Random Access Protocols - ALOHA, CSMA, CSMA/CA and CSMA/CD

Posted in Internet Security   LAST UPDATED: AUGUST 9, 2021

    Random Access Protocols is a Multiple access protocol that is divided into four categories which are ALOHA, CSMA, CSMA/CD, and CSMA/CA. In this article, we will cover all of these Random Access Protocols in detail.

    Have you ever been to a railway station? And noticed the ticket counter over there?

    random access protocols

    Above are the scenarios for approaching a ticket counter. Which one do you think is more productive? The ordered one, right? And we all know the reason why. Just to get things working and avoid problems we have some rules or protocols, like "please stand in the queue", "do not push each other", "wait for your turn", etc. in the same way computer network channels also have protocols like multiple access protocols, random access protocols, etc.

    Let's say you are talking to your friend using a mobile phone. This means there is a link established between you and him. But the point to be remembered is that the communication channel between you and him (the sender & the receiver or vice-versa) is not always a dedicated link, which means the channels are not only providing service to you at that time but to others as well. This means multiple users might be communicating through the same channel.

    random access protocols

    How is that possible? The reason behind this is the multiple access protocols. If you refer to the OSI model you will come across the data link layer. Now divide the layers into 2 parts, the upper part of the layer will take care of the data link control, and the lower half will be taking care in resolving the access to the shared media, as shown in the above diagram.

    The following diagram classifies the multiple-access protocol. In this article, we are going to cover Random Access Protocol.

    types of multiple access protocols

    Random Access Protocols

    Once again, let's use the example of mobile phone communication. Whenever you call someone, a connection between you and the desired person is established, also anyone can call anyone. So here we have all the users (stations) at an equal priority, where any station can send data depending on medium's state whether it is idle or busy, meaning that if you friend is talking to someone else through the mobile phone, then its status is busy and you cannot establish a connection and since all the users are assigned equal priority you can not disconnect your friend's ongoing call and connect yours.

    The random access protocols consist of the following characteristics:

    1. There is no time restriction for sending the data (you can talk to your friend without a time restriction).

    2. There is a fixed sequence of stations which are transmitting the data.

    As in the above diagram you might have observed that the random-access protocol is further divided into four categories, which are:

    1. ALOHA

    2. CSMA

    3. CSMA/CD

    4. CSMA/CA

    Let's cover each one of them, one by one.

    ALOHA Random Access Protocol

    The ALOHA protocol or also known as the ALOHA method is a simple communication scheme in which every transmitting station or source in a network will send the data whenever a frame is available for transmission. If we succeed and the frame reaches its destination, then the next frame is lined-up for transmission. But remember, if the data frame is not received by the receiver (maybe due to collision) then the frame is sent again until it successfully reaches the receiver's end.

    Whenever we talk about a wireless broadcast system or a half-duplex two-way link, the ALOHA method works efficiently. But as the network becomes more and more complex e.g. the ethernet. Now here in the ethernet, the system involves multiple sources and destinations which share a common data path or channel, then the conflict occurs because data-frames collide, and the information is lost. Following is the flow chart of Pure ALOHA.

    Aloha random access protocol

    So, to minimize these collisions and to optimize network efficiency as well as to increase the number of subscribers that can use a given network, the slotted ALOHA was developed. This system consists of the signals termed as beacons which are sent at precise time intervals and inform each source when the channel is clear to send the frame.

    Now, as we came to know about ALOHA's 2 types i.e. Pure & Slotted ALOHA, the following is the difference between both.



    Data transmission

    Stations can transmit the data randomly i.e. any number of stations can transmit data at any time.

    here, any random station can transmit the data at the beginning of any random time slot

    Time status

    Here, the time is continuous and is not globally synchronized with any other station.

    Here, the time is discrete unlike pure ALOHA and is also globally synchronized

    Vulnerable time

    2*Frame transmission time

    Frame transmission time

    Probability of successful transmission of a data packet


    where, G = no. of stations willing to transmit data


    Maximum efficiency



    Collision status

    It does not reduce the total number of collisions to half

    Here, it reduces the total number of collisions to half and doubles the efficiency of pure ALOHA

    CSMA Random Access Protocol

    CSMA stands for Carrier Sense Multiple Access. Till now we have understood that when 2 or more stations start sending data, then a collision occurs, so this CSMA method was developed to decrease the chances of collisions when 2 or more stations start sending their signals over the data link layer. But how do they do it? The CSMA makes each station to first check the medium (whether it is busy or not) before sending any data packet.

    Here, Vulnerable time = Propagation Time

    CSMA Random Access Protocol

    But, what to do if the channels are busy? Now, here the persistence methods can be applied to help the station act when the channel is busy or idle.

    The CSMA has 4 access modes:

    • 1-persistent mode: In this, first the node checks the channel, if the channel is idle then the node or station transmits data, otherwise it keeps on waiting and whenever the channel is idle, the stations transmit the data-frame.

    • Non-persistent mode: In this, the station checks the channel similarly as 1-persistent mode, but the only difference is that when the channel is busy it checks it again after a random amount of time, unlike the 1-persistent where the stations keep on checking continuously.

    • P-persistent mode: In this, the station checks the channel and if found idle then it transmits the data frame with the probability of P and if the data is not transmitted (1-P) then the station waits for a random amount of time and again transmits the data with the probability P and this cycle goes on continuously until the data-frame is successfully sent.

    • O-persistent: In this, the transmission occurs based on the superiority of stations which is decided beforehand and transmission occurs in that order. If the channel is idle, then the station waits for its turn to send the data-frame.

    Throughput & Efficiency of CSMA:

    It is comparatively much greater than the throughput of pure and slotted ALOHA. Here, for the 1-persistent mode, the throughput is 50% when G=1 and for Non-persistent mode, the throughput can reach up to 90%.

    CSMA/CD Random Access Protocol

    CSMA/CD means CSMA with Collision Detection.

    In this, whenever station transmits data-frame it then monitors the channel or the medium to acknowledge the state of the transmission i.e. successfully transmitted or failed. If the transmission succeeds, then it prepares for the next frame otherwise it resends the previously failed data-frame. The point to remember here is, that the frame transmission time should be at least twice the maximum propagation time, which can be deduced when the distance between the two stations involved in a collision is maximum.

    CSMA/CA Random Access Protocol

    CSMA/CA means CSMA with collision avoidance.

    To detect the possible collisions, the sender receives the acknowledgement and if there is only one acknowledgment present (it's own) then this means that the data-frame has been sent successfully. But, if there are 2 or more acknowledgment signals then this indicates that the collision has occurred.

    This method avoids collisions by:

    • Interframe space: in this case, assume that your station waits for the channel to become idle and found that the channel is idle, then it will not send the data-frame immediately (in order to avoid collision due to propagation delay) it rather waits for some time called interframe space or IFS, and after this time the station again checks the medium for being idle. But it should be kept in mind that the IFS duration depends on the priority of the station.

    • Contention Window: here, the time is divided into slots. Say, if the sender is ready for transmission of the data, it then chooses a random number of slots as waiting time which doubles every time whenever the channel is busy. But, if the channel is not idle at that moment, then it does not restart the entire process but restarts the timer when the channel is found idle again.

    • Acknowledgment: as we discussed above that the sender station will re-transmits the data if acknowledgment is not received before the timer expires.

    You may also like:

    About the author:
    Shashwat Pandey is an accomplished technical author with a wealth of experience in writing about computer networks. His passion for the subject extends beyond his writing, and he enjoys exploring new networking technologies to stay on the trend.
    Tags:Computer NetworkALOHACSMA

    Want to learn coding and don't know where to start?

    Try out our Interactive Courses for Free 🥳 😯 🤩
    learn to code footer Ad