CN – MID – MAC Protocol 1
Multiple Access Control Protocols
Introduction to Multiple Access Control (MAC) Protocols
In a shared communication medium, where multiple devices attempt
to transmit data simultaneously, efficient coordination is
required to avoid data collisions and ensure smooth
communication. This coordination is managed by Multiple Access
Control (MAC) protocols. These protocols dictate how multiple
users share the same communication channel while minimizing
interference and maximizing efficiency.
There are different types of MAC protocols, and one major
category is Random Access Protocols. These protocols allow
devices to transmit whenever they have data to send, but they
include mechanisms to resolve collisions when two or more
devices transmit at the same time.
Random Access Techniques
Random Access Techniques allow devices to send data without a
fixed schedule, relying on mechanisms to handle potential
collisions. The most well-known random-access protocols include:
1. ALOHA
2. Carrier Sense Multiple Access (CSMA)
3. CSMA with Collision Detection (CSMA/CD)
4. CSMA with Collision Avoidance (CSMA/CA)
These protocols are widely used in networks such as Ethernet and
Wi-Fi.
1. ALOHA Protocol
ALOHA was one of the earliest MAC protocols designed for wireless
communication. It was developed in the 1970s at the University
of Hawaii for satellite communication. It operates on a simple
principle:
Pure ALOHA
• A device sends data whenever it has data to send.
• The sender waits for an acknowledgment (ACK) from the
receiver.
• If an acknowledgment is not received within a certain time
(due to collision), the sender waits for a random amount
of time before retransmitting.
CN – MID – MAC Protocol 2
Problem: Since devices do not sense the channel before sending
data, there is a high chance of collisions, leading to low
channel efficiency (maximum efficiency is around 18%).
Slotted ALOHA
To improve efficiency, Slotted ALOHA divides time into fixed
time slots.
• Devices can send data only at the beginning of a time slot.
• If a collision occurs, the sender waits for a random time
before retrying.
This method reduces collisions compared to Pure ALOHA,
increasing efficiency to about 37%.
2. Carrier Sense Multiple Access (CSMA)
CSMA improves ALOHA by allowing devices to listen to the
channel before transmitting. The idea is simple:
• If the channel is busy, wait.
• If the channel is free, send data.
There are three main variations of CSMA:
Non-Persistent CSMA
• A device listens to the channel before sending data.
• If the channel is busy, it waits for a random amount of
time before trying again.
• This reduces collisions but increases delay.
1-Persistent CSMA
• A device continuously senses the channel.
• If the channel is busy, it keeps waiting.
• As soon as the channel is free, it transmits immediately.
• This reduces delay but increases the chance of collisions
when multiple devices start transmission at the same time.
P-Persistent CSMA (Used in Slotted Time Systems)
• When the channel is free, a device transmits with a
probability p.
• With probability 1-p, it waits for the next time slot before
trying again.
CN – MID – MAC Protocol 3
• This balances delay and collision probability.
3. CSMA with Collision Detection (CSMA/CD)
CSMA/CD is used in wired networks like Ethernet. It extends CSMA
by adding a mechanism to detect collisions. The working process
is as follows:
Working of CSMA/CD
1. Carrier Sense: A device listens to the channel before
sending data.
2. Transmit if Idle: If the channel is free, the device sends
data.
3. Collision Detection: If a collision occurs (two devices
send data at the same time), both devices detect the
collision.
4. Backoff and Retransmit: The devices stop transmission
immediately and wait for a random time before trying again.
Collision Detection Mechanism
• Devices detect a collision by measuring signal strength or
checking for abnormal voltage levels on the wire.
• Binary Exponential Backoff: After a collision, devices wait
for a randomly selected time before retransmitting. If
another collision occurs, the waiting time is doubled.
Example
Consider an Ethernet network where two computers (A and B) send
data at the same time.
• Both devices listen to the channel and start sending.
• Since both are transmitting simultaneously, a collision
occurs.
• Both computers detect the collision and stop transmission.
• They wait for a random time and then attempt
retransmission.
CSMA/CD works well in wired networks but is not suitable for
wireless communication because:
• It is difficult to detect collisions in wireless networks
due to signal fading.
CN – MID – MAC Protocol 4
• Wireless devices cannot listen and transmit at the same
time.
4. CSMA with Collision Avoidance (CSMA/CA)
CSMA/CA is used in wireless networks like Wi-Fi (IEEE 802.11).
Since wireless devices cannot detect collisions easily, CSMA/CA
avoids them using a different approach.
Working of CSMA/CA
1. Carrier Sense: A device listens to the channel before
sending data.
2. If the channel is free: The device does not send immediately
but waits for a small random backoff time.
3. If no other device starts transmission: The device sends
data.
4. If the channel is busy: The device waits until it becomes
free and then follows the backoff mechanism.
Collision Avoidance Mechanism
To further reduce collisions, Request to Send (RTS) and Clear
to Send (CTS) frames are used:
• The sender first sends an RTS (Request to Send) packet to
the receiver.
• If the receiver is available, it replies with a CTS (Clear
to Send) packet.
• Only after receiving CTS, the sender transmits data.
This ensures that other nearby devices know that the channel is
in use and avoid sending data, thereby reducing collisions.
Example
Consider a Wi-Fi network:
• Laptop A wants to send data to a router.
• It sends an RTS signal.
• The router responds with a CTS signal.
• Laptop A transmits data only after receiving CTS, reducing
the risk of collision.
CSMA/CA is effective in wireless networks but introduces
additional overhead due to RTS/CTS exchanges.
CN – MID – MAC Protocol 5
Comparison of Random-Access Techniques
Protocol Collision Handling Efficiency Used In
Pure Retransmit after ~18% Satellite,
ALOHA collision early wireless
Slotted Time slots reduce ~37% Wireless, RFID
ALOHA collisions
CSMA Listen before Higher than Ethernet, LANs
transmitting ALOHA
CSMA/CD Detects collisions High Wired Ethernet
& retransmits
CSMA/CA Avoids collisions High Wireless (Wi-
using RTS/CTS Fi)
Random Access MAC protocols are essential for managing data
transmission in shared networks. Each technique has its
advantages and is suited for different types of communication:
• ALOHA is simple but inefficient.
• CSMA improves efficiency by listening before transmitting.
• CSMA/CD is used in wired Ethernet to detect and recover
from collisions.
• CSMA/CA is used in wireless networks to avoid collisions
altogether.