0% found this document useful (0 votes)
41 views26 pages

Lecture 05-MAC Protocols for Wireless Networks

Uploaded by

Shahzad Ashraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views26 pages

Lecture 05-MAC Protocols for Wireless Networks

Uploaded by

Shahzad Ashraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

Wireless Networks

(CS-6311)

Medium Access Control (MAC) Protocols

Lecture# 05

Dr. Shahzad Ashraf


Associate Professor
Medium Access Control (MAC) Protocols for
Wireless Networks

• Data link layer ensures that raw data from the physical layer is organized
into frames and reliably transmitted to the next node.
• The Logical Link Control layer ensures smooth communication between
network devices
• The Media/ Multiple Access Control regulates access to the shared
communication medium
Medium Access Control (MAC) Protocols for
Wireless Networks
• MAC protocol manages how devices share bandwidth and access the
communication medium
• It minimize collisions, ensure fair access, optimize energy consumption,
and maximize network performance
• The 48 bit MAC address is a unique identifier assigned to every network
interface controller (NIC) in a device.
• It is used to identify devices on a network and ensure that data packets
are sent to the correct device.
Medium Access Control (MAC) Protocols for
Wireless Networks

• All nodes share same link to send and receive the data
• When multiple nodes share data at same time there is great chance of data collision
and consequently data would be lost.
• In order to avoid this data collision on shared path, MAC plays its crucial role
through three difference protocols such as Random Access protocol, Control
Access protocol, and Channelization Protocol
Medium Access Control (MAC) Protocols for
Wireless Networks

Contention-based protocols Contention-free protocols


Multiple devices share a Protocols to eliminate
common communication collisions by allocating
medium without pre- time slots or frequencies
coordination to each device
Medium Access Control (MAC) Protocols for
Wireless Networks
Evolution of Contention-Based Protocol
 Developed in 1970 for packet radio networks.
 It allowed devices to transmit whenever they wanted.
 If collisions occurred, devices would retransmit after a
random delay.

 Divide time into fixed-length slots’


 Devices could only transmit at the beginning of a slot,
reducing the likelihood of collisions.

 Carrier Sense Multiple Access

 CSMA/CD It combines carrier sensing with collision


detection.
 Devices listen to the medium before transmitting.
 If the medium is idle, they transmit and If a collision is
detected, they stop transmitting and wait for a random backoff
period before retransmitting.
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

ALOHA operation
o Transmission occurs when a node transmits data whenever it has something to
send, without checking if the channel is free.
o If two or more nodes transmit at overlapping times, a collision occurs, and both
packets are lost.
o If no ACK is received (due to collision or error), the sender assumes failure.
o ALOHA has a maximum throughput efficiency of 18.4%, as collisions are
common.
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

ALOHA operation
• Each station sends a frame
whenever it has a frame to
send.

• Frames are transmitted at


random times, and users
can transmit whenever
they have data to send
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

ALOHA operation (Frame Transmission)


Throughput
Throughput is calculated as where S is the throughput and G is the
Average number of frames created per frame transmission period. The maximum
throughput is 0.184, which occurs when G = 1/2

Vulnerable period of frame


Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

ALOHA operation (Frame Transmission)

Efficiency
ALOHA has an efficiency of 18.4%, meaning that 18.4% of frames reach their
destination successfully.
Vulnerable period
It is the time during which a frame is vulnerable to collision, and it lasts for two frame
times.

Example: An aloha network transmits 200 bit frames on a shared channel of 200 kbps.
What is the requirement to make this frame collision free?
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

ALOHA operation
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

Slotted ALOHA operation


o Slotted ALOHA introduces time synchronization to improve efficiency.
o The channel is divided into fixed-duration time slots, and nodes can only begin
transmission at the start of a slot.
o It divide the time into slots of Tfr s and force the station to send only at the beginning
of the time slot.
o By aligning transmissions to slots, the probability of collisions decreases, improving
throughput.
o Slotted ALOHA achieves a higher maximum throughput of 36.8% due to reduced
collisions.
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

Slotted ALOHA operation

10:00 10:05 10:30 10:40 10:50 10:55


Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

S-MAC (Sensor-Medium Access Control)


 Specifically designed for wireless sensor networks, prioritizing energy efficiency
and scalability
 Periodic Sleep-Listen Cycles, nodes alternate between sleep and listen states to
conserve energy
 Reduces energy consumption by turning off the radio during idle periods
 Nodes synchronize their sleep schedules with neighbors to minimize
communication delays
 Long messages are fragmented and sent as smaller packets, reducing
retransmission overhead in case of collision
 Uses mechanisms such as RTS (Request to Send) and CTS (Clear to Send) to
avoid collisions before data transmission
 Reduce duty cycle to ~ 10%
 Listen for 200ms and sleep for 1.8s
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

S-MAC (Sensor-Medium Access Control)


Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

S-MAC (Sensor-Medium Access Control)


Periodic Sleep and Listen
--All nodes are free to choose their own listen/sleep schedules
--To reduce control overhead, neighboring nodes are synchronized
together
--They listen at the same time and go to sleep at the same time

Synchronization
--SYNC packets are exchanged periodically to maintain schedule
synchronization
--Receivers will adjust their timer counters immediately after they receive
the SYNC packet
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

S-MAC (Sensor-Medium Access Control)


Synchronization
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

S-MAC (Sensor-Medium Access Control)


Synchronization
--Each node maintains a schedule table that stores schedules of all its
known neighbors
--For initial schedule: A node first listens to the medium for a certain
amount of time (at least the synchronization period)
--If it does not hear a schedule (SYNC packet) from another node, it
randomly chooses a schedule and broadcasts its schedule with a SYNC
packet immediately
--This node is called a Synchronizer
--If a node receives a schedule from a neighbor before choosing its own
schedule
--It follows this neighbor’s schedule
--Becomes a Follower
--Waits for a random delay and broadcasts its schedule
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

S-MAC (Sensor-Medium Access Control)


Coordinated sleeping
--In a large network, its hade to guarantee that all nodes follow the same
schedule
--The node on the border will follow both schedules
--When it broadcasts a packet, it needs to do it twice, first for nodes on
schedule 1 and then for those on schedule 2
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

S-MAC (Sensor-Medium Access Control)


Coordinated sleeping
--Border nodes have less time
to sleep and consume more
energy than others

--Solution: Let border nodes


adopt only one schedule
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

S-MAC (Sensor-Medium Access Control)

Example:
--Two-hop network with two sources and two sinks
--Sources periodically generate a sensing message which is divided into fragments
--Traffic load is changed by varying the inter-arrival period of the messages
--For inter-arrival period of 5s, message is generated
every 5s by each source
--Here inter-arrival period varies between 1-10s
--a source node generates 10 messages
--Each message has 10 fragments where 200 data packets
to be passed from source to sink nodes
--Each fragment has 40 bytes, total l8000 bytes at all
Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-Based Protocol

S-MAC (Sensor-Medium Access Control)

Example: (Average energy consumption in the source nodes A & B)


Medium Access Control (MAC) Protocols for
Wireless Networks
Contention-free Protocol
These protocols avoid collisions by pre-allocating resources for data transmission.

 TDMA (Time Division Multiple Access)


--Avoids collisions by ensuring nodes transmit only during their assigned slots.
--Well-suited for energy-constrained networks since nodes can sleep when not transmitting.

 FDMA (Frequency Division Multiple Access)


--Reduces interference as nodes operate on distinct frequencies.
--Supports continuous transmission without time delays.

 CDMA (Code Division Multiple Access)


--Robust against interference and noise
--High scalability in dense networks

 OFDMA (Orthogonal Frequency Division Multiple Access)


 --Reduces interference through orthogonality of subcarriers
 --Supports dynamic allocation of subcarriers based on demand
Medium Access Control (MAC) Protocols for
Wireless Networks
Challenges for MAC in WSNs
WSN Architecture
--High density of nodes
--Increased collision probability
--Minimize signaling overhead to prevent further collisions
--Sophisticated and simple collision avoidance protocols required

100 nodes on 1000mx1000m 1000 nodes on 1000mx1000m


Medium Access Control (MAC) Protocols for
Wireless Networks
Challenges for MAC in WSNs
Limited energy resource
--Connectivity and the performance of the network is affected as nodes die
--Transmitting and receiving consumes almost same energy
--Frequent power up/down eats up energy
--Need very low power MAC protocols

• Dead node
The End

You might also like