0% found this document useful (0 votes)
21 views

CN_Lecture_04_Datalink Layer II-1

Computer Networks series

Uploaded by

Surid
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)
21 views

CN_Lecture_04_Datalink Layer II-1

Computer Networks series

Uploaded by

Surid
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/ 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: Summer 23-24


Lecturer: Nusrat Jahan Anannya, [email protected]
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
Fig. 1 Flow chart of ALOHA
the time required to send a frame
between the two most widely
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 station Figure: Frames in a slotted ALOHA network

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.
 Fig. 4 Flow chart of CSMA
The chances of collision reduces to
a great extent if a station checks
the channel before trying to use 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
Figure: Space/time model of a collision in CSMA
transmit its frames.
 This results in the
collision.
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
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-persisten


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
Fig. 11 Flow chart of CSMA/CD
detected, the transmitting
station release a jam signal.
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
Fig. 12 Flow chart of CSMA/CA
 Contention Window
 Acknowledgements
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 Fig. 13 Illustration of
difficulties
range problem
in collision detection in
• The distance between stations can 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