Lecture 10
Lecture 10
& Networks
FARAZ ALI
[email protected]
+92-321-404-1740
Outline
• Introduction
• Contention Protocols
• ALOHA
• Slotted ALOHA
• CSMA (Carrier Sense Multiple Access)
• CSMA/CD (CSMA with Collision Detection)
• CSMA/CA (CSMA with Collision Avoidance)
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Introduction
Node 3
Node 4
Node 2 Shared Multiple
Access Control
Channel to BS
Node 1 …
Node N
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Introduction (Cont’d)
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Channel Sharing Techniques
Static
Channelization
Channel Sharing
Techniques
Scheduling
Dynamic Medium
Access Control
Random Access
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Classification of Multiple Access Protocols
Contention-based Conflict-free
• ALOHA
• Developed in the 1970s for a packet radio network by Hawaii
University.
• Whenever a station has a data, it transmits. Sender finds out
whether transmission was successful or experienced a collision by
listening to the broadcast from the destination station. Sender
retransmits after some random time if there is a collision.
• Slotted ALOHA
• Improvement: Time is slotted and a packet can only be transmitted
at the beginning of one slot. Thus, it can reduce the collision
duration.
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Contention Protocols (Cont’d)
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
ALOHA
Node 2 Packet
Retransmission Retransmission
1 2 3 3 2
Time
Collision
Node 3 Packet
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Throughput of ALOHA
• The probability that n packets arrive in two packets time is given by
n
(2G) e 2G
Pn
n!
where G is traffic load.
• The probability P(0) that a packet is successfully received without
collision is calculated by letting n=0 in the above equation. We get
P0 e 2G
• We can calculate throughput S with a traffic load G as follows:
S G P0 G e 2G
Node 1 Packet
1 2&3 2 3
Time
Slot Collision
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Throughput of Slotted ALOHA
P0 e G
• The throughput S is
S G P0 G e G
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Throughput
0.5
0.4 0.368
0.3
Slotted Aloha
S
0.2 0.184
0.1 Aloha
00 2 4 6 8
G
G
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
CSMA (Carrier Sense Multiple Access)
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Collision Mechanism in CSMA
Node 1 Packet
Node 5 sense
Node 2 Packet
Node 3 Packet Delay
1 2 3 4 5
Time
Delay Collision
Node 4 sense
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Kinds of CSMA
1-persistent CSMA
p-persistent CSMA
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Nonpersistent/x-persistent CSMA Protocols
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
How to Select Probability p ?
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Throughput
1-persistent CSMA
0.4
0.3
Slotted Aloha
0.2
Aloha
0.1
0
0 1 2 3 4 5 6 7 8 9
G
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
CSMA/CD (CSMA with Collision Detection)
T 0 + - B begins transmission
A B
T0 + B detects collision
A B
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
CSMA/CA (Cont’d)
Delay: B
Delay: C Time
Nodes B & C sense
the medium
Nodes C starts
Nodes B resenses the medium transmitting.
and transmits its frame.
Node C freezes its counter.
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
CSMA/CA Explained
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
CSMA/CA with ACK
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
CSMA/CA/ACK
DIFS Time
Data
Source
SIFS
ACK
Destination
DIFS Contention window
Next Frame
Other
Defer access Backoff after defer
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
CSMA/CA with RTS/CTS
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
CSMA/CA with RTS/CTS (Cont’d)
DIFS SIFS
RTS Data Time
Source
SIFS SIFS
CTS ACK
Destination
DIFS
Contention window
Next Frame
Other
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
RTS/CTS
Node A Node B
Propagation delay
RTS
CTS
Data
ACK
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Nonpersistent/x-persistent CSMA Protocols
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)
Thank You
Question and Answers
Faraz Ali
(Lecturer FOIT)
(University of Central Punjab)