MAC Protocols
MAC Protocols
Pure Aloha
Whenever data is available for sending over a channel at stations, we use Pure Aloha. In
pure Aloha, when each station transmits data to a channel without checking whether the
channel is idle or not, the chances of collision may occur, and the data frame can be lost.
When any station transmits the data frame to a channel, the pure Aloha waits for the
receiver's acknowledgment. If it does not acknowledge the receiver end within the
specified time, the station waits for a random amount of time, called the backoff time
(Tb). And the station may assume the frame has been lost or destroyed. Therefore, it
retransmits the frame until all the data are successfully transmitted to the receiver.
1. The total vulnerable time of pure Aloha is 2 * Tfr.
2. Maximum throughput occurs when G = 1/ 2 that is 18.4%.
3. Successful transmission of data frame is S = G * e ^ - 2 G.
As we can see in the figure above, there are four stations for accessing a shared channel
and transmitting data frames. Some frames collide because most stations send their
frames at the same time. Only two frames, frame 1.1 and frame 2.2, are successfully
transmitted to the receiver end. At the same time, other frames are lost or destroyed.
Whenever two frames fall on a shared channel simultaneously, collisions can occur, and
both will suffer damage. If the new frame's first bit enters the channel before finishing
the last bit of the second frame. Both frames are completely finished, and both stations
must retransmit the data frame.
Slotted Aloha
The slotted Aloha is designed to overcome the pure Aloha's efficiency because pure
Aloha has a very high possibility of frame hitting. In slotted Aloha, the shared channel is
divided into a fixed time interval called slots. So that, if a station wants to send a frame
to a shared channel, the frame can only be sent at the beginning of the slot, and only
one frame is allowed to be sent to each slot. And if the stations are unable to send data
to the beginning of the slot, the station will have to wait until the beginning of the slot
for the next time. However, the possibility of a collision remains when trying to send a
frame at the beginning of two or more station time slot.
1. Maximum throughput occurs in the slotted Aloha when G = 1 that is 37%.
2. The probability of successfully transmitting the data frame in the slotted Aloha is
S = G * e ^ - 2 G.
3. The total vulnerable time required in slotted Aloha is Tfr.
CSMA/ CD
It is a carrier sense multiple access/ collision detection network protocol to transmit
data frames. The CSMA/CD protocol works with a medium access control layer.
Therefore, it first senses the shared channel before broadcasting the frames, and if the
channel is idle, it transmits a frame to check whether the transmission was successful. If
the frame is successfully received, the station sends another frame. If any collision is
detected in the CSMA/CD, the station sends a jam/ stop signal to the shared channel to
terminate data transmission. After that, it waits for a random time before sending a
frame to a channel.
CSMA/ CA
It is a carrier sense multiple access/collision avoidance network protocol for carrier
transmission of data frames. It is a protocol that works with a medium access control
layer. When a data frame is sent to a channel, it receives an acknowledgment to check
whether the channel is clear. If the station receives only a single (own)
acknowledgments, that means the data frame has been successfully transmitted to the
receiver. But if it gets two signals (its own and one more in which the collision of
frames), a collision of the frame occurs in the shared channel. Detects the collision of the
frame when a sender receives an acknowledgment signal.
Following are the methods used in the CSMA/ CA to avoid the collision:
Interframe space: In this method, the station waits for the channel to become idle, and
if it gets the channel is idle, it does not immediately send the data. Instead of this, it
waits for some time, and this time period is called the Interframe space or IFS. However,
the IFS time is often used to define the priority of the station.
Contention window: In the Contention window, the total time is divided into different
slots. When the station/ sender is ready to transmit the data frame, it chooses a random
slot number of slots as wait time. If the channel is still busy, it does not restart the
entire process, except that it restarts the timer only to send data packets when the
channel is inactive.
Acknowledgment: In the acknowledgment method, the sender station sends the data
frame to the shared channel if the acknowledgment is not received ahead of time.