0% found this document useful (0 votes)
17 views29 pages

CN Lecture 04 Datalink Layer II

The document outlines multiple access techniques in computer networks, focusing on protocols such as ALOHA, CSMA, CSMA/CD, and CSMA/CA. It explains the principles behind each protocol, including their mechanisms for handling collisions and improving efficiency in data transmission. Additionally, it discusses the differences between pure and slotted ALOHA, as well as various CSMA methods like 1-persistent, nonpersistent, and p-persistent approaches.

Uploaded by

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

CN Lecture 04 Datalink Layer II

The document outlines multiple access techniques in computer networks, focusing on protocols such as ALOHA, CSMA, CSMA/CD, and CSMA/CA. It explains the principles behind each protocol, including their mechanisms for handling collisions and improving efficiency in data transmission. Additionally, it discusses the differences between pure and slotted ALOHA, as well as various CSMA methods like 1-persistent, nonpersistent, and p-persistent approaches.

Uploaded by

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

Multiple Access Techniques II

Course Code: CSC 3116 Course Title: Computer Networks

Dept. of Computer Science


Faculty of Science and Technology

Lecturer No: 4 Week No: 2 Semester:


Lecturer: Dr. Mehedi Hasan; mmhasan@aiub.edu
Lecture Outline

1. ALOHA
2. CSMA
3. CSMA/CD
4. CSMA/CA
Introduction….

Fig. 1 Classification of multiple access protocols


ALOHA
Introduction

ALOHA originally stood for Additive Links On-line Hawaii Area


Pure ALOHA

 The original ALOHA protocol is


called pure ALOHA.

 This is a simple but elegant


protocol.

 The idea is that each station


sends a frame whenever it has a
frame to send (multiple access).

 Since there is only one channel to


share, there is the possibility of
collision between frames from Fig. 1 Flow chart of ALOHA
different stations.
Pure ALOHA

Figure: Frames in a pure ALOHA network


Pure ALOHA

 The pure ALOHA protocol relies on


acknowledgments from the receiver.

 When a station sends a frame, it expects the


receiver to send an acknowledgment.

 If the acknowledgment does not arrive after a time-


out period, the station assumes that the frame (or
the acknowledgment) has been destroyed and
resends the frame.
Pure ALOHA

 A collision involves two or more stations.

 If all these stations try to resend their frames after


the time-out, the frames will collide again.

 Pure ALOHA dictates that when the time-out period


passes, each station waits a random amount of time
(backoff time) before resending its frame.

 The randomness will help avoid more collisions


Pure ALOHA
 Pure ALOHA has a second method
to prevent congesting the channel
with retransmitted frames.

 After a maximum number of


retransmission attempts Kmax, a
station must give up and try later.

 The time-out period is equal to


the maximum possible round-trip
propagation delay, which is twice
the time required to send a frame
between the two most widely
Fig. 1 Flow chart of ALOHA
separated stations (2 × Tp).
Pure ALOHA

 Let us find the vulnerable time, the length of time


in which there is a possibility of collision.

 We assume that the stations send fixed-length


frames with each frame taking Tfr seconds to send
Slotted ALOHA
 Pure ALOHA has a vulnerable time of
2 × Tfr. This is so because,
 There is no rule that defines when
the station can send.
 A station may send soon after
another station has started or just
before another station has finished.

 Slotted ALOHA was invented to


improve the efficiency of pure
ALOHA.

 In slotted ALOHA we divide the time


into slots of Tfr seconds and force the Figure: Frames in a slotted ALOHA network
station to send only at the beginning
of the time slot.
Slotted ALOHA

 The vulnerable time is now reduced to one-half,


equal to Tfr

Figure: Vulnerable time for slotted ALOHA protocol


Carrier Sense Multiple Access
Introduction

 CSMA was developed to overcome the problems


of ALOHA i.e. to minimize the chances of
collision.
 CSMA is based on the principle of “carrier sense”.
 The station sense the carrier or channel before
transmitting a frame.
 It means the station checks whether the channel is
idle or busy.
 The chances of collision reduces to a great extent
if a station checks the channel before trying to use
Fig. 4 Flow chart of CSMA
it.
Carrier Sense Multiple Access
CSMA

 The chances of collision still exists


because of propagation delay.
 The frame transmitted by one station
takes some time to reach the other
station.
 In the meantime, other station may
sense the channel to be idle and
transmit its frames.
 This results in the collision.
Figure: Space/time model of a collision in CSMA
Carrier Sense Multiple Access
Classification

 What should a station do if the channel is busy? What should a station do


if the channel is idle?
 Three methods have been devised for CSMA:
 1-persistent method,
 the nonpersistent method
 the p-persistent method
Carrier Sense Multiple Access
1-persistent

1-Persistent: The 1 (one) -persistent method is simple and straightforward. In


this method, after the station finds the line idle, it sends its frame immediately
(with probability 1).
This method has the highest chance of collision because two or more stations may
find the line idle and send their frames immediately.

Fig. 5 Carrier sense in 1-persistent Fig. 6 Flow chart of 1-persistent


Carrier Sense Multiple Access
Nonpersistent

 Nonpersistent: In the nonpersistent method, a station that has a frame to


send senses the line. If the line is idle, it sends immediately. If the line is not
idle, it waits a random amount of time and then senses the line again.
 The nonpersistent approach reduces the chance of collision because it is
unlikely that two or more stations will wait the same amount of time and
retry to send simultaneously.
 However, this method reduces the efficiency of the network because the
medium remains idle when there may be stations with frames to send.
Carrier Sense Multiple Access
Nonpersistent

Fig. 7 Carrier sense in nonpersistent Fig. 8 Flow chart of nonpersistent


Carrier Sense Multiple Access
P-Persistent

 p-Persistent: The p-persistent method is used if the channel has time slots with a
slot duration equal to or greater than the maximum propagation time. The p-
persistent approach combines the advantages of the other two strategies. It reduces
the chance of collision and improves efficiency.
 In this method, after the station finds the line idle it follows these steps:
 1. With probability p, the station sends its frame.
 2. With probability q = 1 - p, the station waits for the beginning of the next time slot and
checks the line again.
 a. If the line is idle, it goes to step 1.
 b. If the line is busy, it acts as though a collision has occurred and uses the back
off procedure.
Carrier Sense Multiple Access
P-Persistent

How to calculate P?

where N is the number of stations that


are connected to the shared medium

Fig. 9 Carrier sense in p-persistent

Fig. 10 Flow chart of p-persistent


CSMA/CD
 In CSMA/CD, the station that sends its
data on the channel, continues to sense the
channel even after data transmission.
 If collision is detected, the station aborts
its transmission and waits for a random
amount of time & sends its data again.
 As soon as a collision is detected, the
transmitting station release a jam signal.
 Jam signal alerts other stations. Stations are
not supposed to transmit immediately after
the collision has occurred. Fig. 11 Flow chart of CSMA/CD
CSMA/CA
Introduction

• Carrier sense multiple access/collision


avoidance (CSMA/CA) protocol is used
in wireless networks because they
cannot detect the collision.
• So, the only solution is collision
avoidance.
▪ Worked based on three strategies
➢ Inter Frame Space
➢ Contention Window
➢ Acknowledgements
Fig. 12 Flow chart of CSMA/CA
CSMA/CA
Introduction

 Wireless Networks
CSMA/CA is used. CSMA/CD cannot be used because
• CSMA/CD requires continuous transmission and
reception for collision detection. Thus require full-
duplex operation, which can not be supported in
wireless due to short battery life
• Difficult to detect may not be detected because of
obstacle or range problem
• The distance between stations can be great. Signal
fading could prevent a station at Fig. 13 Illustration of difficulties
one end from hearing a collision at the other end. in collision detection in wireless
networks
Topic Heading..
Topic sub heading..

 This protocol is used in wireless networks because they cannot detect the
collision.
 So, the only solution is collision avoidance.
 It avoids the collision by using three basic techniques:
1. Interframe Space (IFS)
2. Contention Window
3. Acknowledgements
CSMA/CA
Interframe Space

 Whenever the channel is found idle, the station does not transmit
immediately.
 It waits for a period of time called Interframe Space (IFS).
 When channel is sensed idle, it may be possible that some distant station
may have already started transmitting.
 Therefore, the purpose of IFS time is to allow this transmitted signal to
reach its destination.
 If after this IFS time, channel is still idle, the station can send the frames
CSMA/CA
Contention window

 Contention window is the amount of time divided into slots.


 Station that is ready to send chooses a random number of slots as its waiting
time.
 The number of slots in the window changes with time.
 It means that it is set of one slot for the first time, and then doubles each
time the station cannot detect an idle channel after the IFS time.
 In contention window, the station needs to sense the channel after each time
slot [1].
CSMA/CA
Acknowledgement

 Despite all the precautions, collisions may occur and destroy the data.
 Positive acknowledgement and the time-out timer helps guarantee that the
receiver has received the frame.

Fig. 14 Carrier sense in contention window


References

[1] B. A. Forouzan, Data Communication and Networking, 5th ed., The McGraw-Hill
Companies, Inc., USA, 2013, pp. 326-339.
Recommended Books

1. Data Communications and Networking, B. A. Forouzan, McGraw-Hill, Inc., Fourth


Edition, 2007, USA.
2. Computer Networking: A Top-Down Approach, J. F., Kurose, K. W. Ross, Pearson
Education, Inc., Sixth Edition, USA.
3. Official Cert Guide CCNA 200-301 , vol. 1, W. Odom, Cisco Press, First Edition, 2019,
USA.
4. CCNA Routing and Switching, T. Lammle, John Wily & Sons, Second Edition, 2016,
USA.
5. TCP/IP Protocol Suite, B. A. Forouzan, McGraw-Hill, Inc., Fourth Edition, 2009, USA.
6. Data and Computer Communication, W. Stallings, Pearson Education, Inc., Tenth
Education, 2013, USA.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy