MAC Protocols:
Medium Access Control (MAC) protocols solve a seemingly simple task: they coordinate the
times where a number of nodes access a shared communication medium.
Medium Access Control (MAC) protocols is the first protocol layer above the Physical Layer
(PHY) and consequently MAC protocols are heavily influenced by its properties.
The fundamental task of any MAC protocol is to regulate the access of a number of nodes
to a shared medium in such a way that certain application-dependent performance
requirements are satisfied.
Some of the traditional MAC protocols performance criteria are delay, throughput, and
fairness, whereas in WSNs, the issue of energy conservation becomes important.
Within the OSI reference model, the MAC is considered as a part of the Data Link Layer
(DLL), but there is a clear division of work between the MAC and the remaining parts of the
DLL.
The MAC protocol determines for a node the points in time when it accesses the medium to
try to transmit a data, control, or management packet to another node (unicast) or to a set
of nodes (multicast, broadcast).
Two important responsibilities of the remaining parts of the DLL are error control and flow
control. Error control is used to ensure correctness of transmission and to take appropriate
actions in case of transmission errors and flow control regulates the rate of transmission to
protect a slow receiver from being overwhelmed with data
In a Wireless Sensor Network (WSN), many sensor nodes talk to each other using radio signals -
kind of like people talking in a room.
But if everyone talks at the same time, no one can understand anything. It becomes chaos! So,
we need rules to decide who gets to talk and when. These rules are called the MAC protocol.
WSNs are different from normal networks because:
The sensor nodes run on battery
They must save energy
They work in unreliable wireless conditions
So, the MAC protocol in WSN must:
Avoid collisions (two nodes sending at the same time)
Save energy (by sleeping when not needed)
Ensure data is sent correctly
Main Goals of MAC Protocol in WSN:
Low energy usage
Reliable communication
Avoid signal interference
Reduce delay in sending messages
Issues in designing MAC protocol for WSNs:
Basic Goals of MAC Protocols:
High throughput – More successful data transfer.
Fairness – Every node gets a chance to transmit.
Low access delay – Fast response from the time a packet is ready.
Low transmission delay – Quick delivery of the packet.
Low overhead – Less extra work like headers, control messages, etc.
Issues are:
1.Causes of Overhead in MAC:
Packet overhead: Extra data (headers/trailers).
Collisions: Two nodes send at once → data loss.
Control packet exchange: Extra communication just to manage the medium.
2.Handling Collisions:
When multiple nodes send data at the same time, the signals collide.
Receiver can’t understand the data, so it asks to resend.
This wastes time and energy.
3.Time-Critical Needs:
For urgent applications:
There should be a guarantee of delivery speed.
Important data should be prioritized over less important ones.
4.Wireless Challenges:
WSNs face many problems due to the wireless environment:
Path loss: Signal weakens over distance.
Noise: Disturbances from machines or nature.
Fading: Sudden drops in signal strength.
This leads to errors in data (called bit errors).
5.Range Limitation:
Each sensor has a limited range.
If two nodes are too far, they can’t hear each other.
This causes hidden and exposed terminal problems.
6.Hidden Terminal Problem:
Example:
Nodes A, B, C →
A and B can hear each other
B and C can hear each other
A and C cannot hear each other
Issue:
A sends data to B
C checks the channel, finds it free (can’t hear A), and starts sending
Both signals collide at B
Result: Data is lost ❌
7.Exposed Terminal Problem:
Example:
B sends to A
C wants to send to D
C senses B’s signal and waits, even though it could have safely sent data
Result: Wasted bandwidth due to unnecessary waiting.
8.Why Collision Detection (CD) Fails in Wireless:
In wired networks, the sender can detect a collision quickly.
In wireless, this is not possible because:
Signals fade
Transceivers are half-duplex (can’t send and receive at the same time)
So, CD (like in Ethernet) doesn’t work well in wireless.
9.Frequency Band Sharing Issues:
WSNs often use free ISM bands like 2.4 GHz.
Many devices share this band:
WiFi (802.11),
Bluetooth,
IEEE 802.15.4
Problem: Signals can interfere with each other → coexistence issue
10.Impact of Traffic Patterns
Case 1: Continuous monitoring (e.g., temperature)
Steady, low traffic
Periodic data flow
Case 2: Event-based (e.g., forest fire)
Idle most of the time
Sudden burst of data when event happens
Need: MAC must handle both low and high traffic efficiently.
Solutions to These Problems:
Busy-tone signals: Let others know a node is sending.
RTS/CTS handshake: Used in IEEE 802.11 to avoid collisions.
Classification of MAC Protocols:
MAC (Medium Access Control) protocols help multiple devices share a communication channel
efficiently. These protocols can be divided into three main categories:
1. Fixed Assignment Protocols:
In these protocols, each device (or node) gets a specific portion of the communication resource
permanently or for a long time (minutes or hours). This avoids collisions since no one else uses
the same resource.
Features:
Long-term resource allocation
No collisions since resources are not shared
Changes in the network (like new devices or device failure) require reallocation signaling
Not very scalable due to fixed assignments
Examples:
A. TDMA (Time Division Multiple Access):
Time is split into frames and each frame into time slots
Each node gets its own slot
Requires precise time synchronization
B. FDMA (Frequency Division Multiple Access):
Frequency is divided into smaller channels
Each node gets its own channel
Needs frequency synchronization and narrowband filters
More complex than TDMA
C. CDMA (Code Division Multiple Access):
All nodes share the same frequency and time, but use different codes
Receiver must know the code
Other transmissions appear as noise
Code management is crucial
D. SDMA (Space Division Multiple Access):
Uses physical distance and antenna arrays to separate transmissions
Needs complex signal processing
Not suitable for Wireless Sensor Networks (WSNs)
2. Demand Assignment Protocols:
These protocols assign resources only when needed, typically for the time it takes to send one
data burst.
Two Types:
A. Centralized Demand Assignment Protocols
A central controller (or node) decides who gets resources
Nodes send a request, and the central node accepts/rejects
Used in protocols like: HIPERLAN/2, DQRUMA, MASCARA and Polling protocols
The central node:
Allocates and deallocates resources
Must always stay active (needs power)
Requesting can be contention-based (random access) or by polling
Example: IEEE 802.15.4
Energy-saving tip: If no node has enough power to always act as a central controller, roles can
rotate (as in the LEACH protocol).
B. Distributed Demand Assignment Protocols
No central controller
Use a shared rule or object, like a token
Example: Token Passing Protocol (e.g., IEEE 802.4 Token Bus)
A special frame (token) is passed between nodes
Only the holder of the token can transmit
Nodes form a logical ring
Problems: Token may be lost, Ring can break due to errors, Not ideal for dynamic or error-
prone wireless networks, Nodes must be on most of the time to receive the token
3. Random Access Protocols:
Nodes act independently and randomly. No central control. These are fully distributed.
Features:
Easy to implement
Risk of collisions due to uncoordinated access
Use randomness to reduce conflicts
Examples:
A. ALOHA & Slotted ALOHA
ALOHA:
Node sends a packet immediately
If no acknowledgment received → assumed collision → retransmit after a random delay
Simple, but inefficient under heavy load
Slotted ALOHA:
Time is divided into slots
Packets can only start at the beginning of a slot
Lower collision chance, better than pure ALOHA
B. CSMA (Carrier Sense Multiple Access):
Node first listens (carrier sense)
If channel is free → it transmits
If busy → it waits
Types:
Non-persistent CSMA: Waits a random time before retrying
Persistent CSMA (e.g., p-persistent):
A. Starts transmission with a probability p
B. Waits otherwise
C. Small p = fewer collisions but higher delay
Example: IEEE 802.11 DCF (Wi-Fi)
Uses backoff timer:
Pick random number from contention window
Wait till timer reaches 0 to transmit
On error/collision → increase window (exponential backoff)
Problems with CSMA: Hidden Terminal Problem: A node may not detect another node’s signal,
causing a collision at the receiver
Solutions:
1. Busy Tone Method:
One channel for data, another (control) channel sends a busy tone when a node receives a
packet
Nearby nodes sense the tone and don’t transmit
2. RTS/CTS (Request to Send / Clear to Send): A handshake between sender and receiver to
warn nearby nodes
S-MAC Protocol:
S-MAC is a protocol designed for wireless sensor networks to:
Reduce idle listening
Avoid collisions
Prevent overhearing
Unlike STEM, S-MAC:
Does not require two separate channels.
Uses a periodic wake-up mechanism.
Working Principle:
Each node alternates between:
Listen Period – Node is awake to receive/transmit data.
Sleep Period – Node sleeps to save energy.
Synchronization:
All neighboring nodes try to synchronize their listen periods.
This is done to ensure efficient communication.
Listen Period: Subdivided into 3 Phases
1. SYNCH Phase:
Used for schedule exchange.
Nodes send SYNCH packets to share their schedules.
These are stored in a schedule table.
Time is divided into slots, and CSMA with backoff is used to reduce collision
Node can send SYNCH packets periodically (called the synchronization period) for time sync
and to inform new nodes
2. RTS Phase (Request to Send):
Used to reduce collisions (especially hidden terminal issues).
Neighbors send RTS packets using CSMA with backoff.
3. CTS Phase (Clear to Send):
Node sends CTS only if an RTS was received.
Data transfer can continue into the sleep period if required.
Mechanisms Used:
1. RTS/CTS Handshake
Prevents collisions using virtual carrier sensing (NAV).
NAV (Network Allocation Vector) tells a node when the medium is in use.
2. Broadcast Mode:
For broadcasting (like SYNCH packets), no RTS/CTS.
Uses CSMA with backoff.
Virtual Clusters (Schedule Sharing):
Nodes form virtual clusters based on shared schedules.
This clustering does NOT affect data transmission—only scheduling.
Cluster Formation Process:
A newly powered-on node listens for the full synchronization period.
If it hears a SYNCH packet → it adopts that schedule.
If no schedule is heard → it picks and broadcasts its own.
If it hears another schedule after choosing one, it:
Keeps its own if neighbors share it.
Otherwise, drops its schedule and adopts the new one.
To handle packet loss, nodes periodically re-listen to re-learn their neighborhood.
Network Behavior:
Network forms "islands" of synchronized schedules.
Border nodes follow multiple schedules, hence consume more energy.
This makes the clustering robust but energy-consuming for some.
Latency:
Average per-hop latency ≈ sleep period (when schedules match).
To reduce this, adaptive listening is used.
Adaptive Listening:
If a node hears an RTS/CTS during its listen period, it:
Estimates when the exchange will end.
Schedules an extra listen around that time.
This helps quick next-hop forwarding.
Message Passing & Fragmentation:
Message Passing:
A message = large meaningful data item for the application.
Data is fragmented into smaller packets.
Fragmentation in S-MAC:
One RTS/CTS exchange starts the entire data session.
Each fragment is followed by an acknowledgment.
All packets have a duration field with total session time.
Neighboring nodes set their NAVs based on this.
Retransmission:
If a fragment fails:
Duration is increased by fragment + ack time.
Medium stays reserved.
Limitations of S-MAC:
Fixed listen/sleep periods make it:
Hard to adapt to traffic load changes.
Inefficient under low traffic.
Comparison with IEEE 802.11 Fragmentation:
T-MAC: An Improvement
Proposed by van Dam and Langendoen
Adaptively shortens the listen period:
If no activity is sensed for a while, node sleeps early.
This saves energy when traffic is low.
In contrast, S-MAC always keeps the full listen duration.
IEEE 802.15.4 standard and Zig Bee,
B-MAC protocol,
Dissemination protocol for large sensor network.
Routing protocols:
Issues in designing routing protocols,
Classification of routing protocols,
Energy efficient routing,
Unicast, Broadcast and multicast,
Geographic routing.