What is Aloha protocol – Pure Aloha – Slotted Aloha? 

In computer networks, the devices access the common underlying shared medium (e.g., LAN cable ) before sending frames. Aloha protocol provides an access control mechanism for a shared channel/medium. For example, a local area network connects multiple computers over a shared physical network using wires, hubs, switches, routers, etc.

When a station sends a packet to another computer over the LAN, the sender broadcasts the packet. At the same time, if there are other broadcasts from other computers, there are chances of a collision, and the packets may be garbled.

Note that the collision problem may occur only in broadcast networks. Aloha protocol provides a mechanism for communication over a common shared medium to transmit a packet reliably.

In other networks like peer-to-peer, no need for Aloha protocol, as there is no sharing of a medium with others, so no collision. In the following section, we will describe each type of aloha protocol in detail.

What are pure Aloha and slotted Aloha?

The first version of the Aloha protocol is named Pure Aloha. After that, a more efficient version was developed, named slotted Aloha. Both pure Aloha and slotted Aloha work for a shared broadcast network, such as LAN or WiFi LAN.

What is Pure Aloha?

As the name suggests, pure Aloha is the original version of the protocol. Following is the procedure in pure Aloha for communication.

  • When a network station needs to send a frame, it sends it immediately and waits for an acknowledgment.
  • If the sender receives an acknowledgment, the sender may send the next frame.
  • If no acknowledgment sender assumes the frame has been garbled and retransmits the same frame after a random time to avoid collision again.

What is slotted Aloha?

The next version is more efficient. The following describes the protocol procedure for the slotted aloha protocol.

  • In slotted Aloha, time is divided into slots. A sender may send a frame at the start of the time slot.
  • If the sender does not send at the start, it will wait for the next slot.
  • If two sender sends the frames at the beginning of the time slot, there will be a collision, and the frame will be garbled.
  • If the acknowledgment is not received, the frame is retransmitted in a new slot.