Module 3 Lec 48-49- Data Link Layer
Module 3 Lec 48-49- Data Link Layer
Disclaimer: The contents in this slide have been referred from many sources which I do not claim as my own. Some of the content has been modified for easier
understanding of the students without any malafide intention. This slide is only for educational purpose strictly, and not for the commercial purpose. Images
portrayed (if any) are not to hurt the sentiments of any person.
Objective
• Media Access/Multiple Access
• Random Access
• ALOHA
• CSMA
• CSMA/CD
• CSMA/CA
• Controlled Access
• Resevation
• Polling
• Token passing
• Cahnnelization
• FDMA
• TDMA
• CDMA
Amit Jha, SOEE, KIIT-DU
Two Sublayers of the Data-Link-Layer
• The data link layer is divided into two sublayers as shown below.
1. Data Link Control (DLC) sublayer
2. Media Access Control (MAC) Sublayer
• The upper sublayer that is responsible for flow and error control is
called the logical link control (LLC) layer.
• The lower sublayer that is mostly responsible for multiple access
resolution is called the media access control (MAC) layer.
• Why do we need multiple-access protocol?
Ans: In a broadcast or multipoint, nodes use a common link. To use this
common link efficiently, we need a multiple-access protocol to
coordinate access to the link.
Shared multiple
access medium
M 5
Amit Jha, SOEE, KIIT-DU
ALOHA: Pure ALOHA
• Based upon the simplest solution: just do it
- A station transmits whenever it has data to transmit.
- If more than one frames are transmitted, they interfere with each other (collide)
and are lost.
- If ACK not received within timeout, then a station picks random back-off time (to
avoid repeated collision).
- Station retransmits frame after back-off time denoted as 𝑇𝐵
• Note: 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.
• After a maximum number of retransmission attempts 𝐾𝑚𝑎𝑥 a station must
give up and try later.
Amit Jha, SOEE, KIIT-DU
Four stations transmitting 2 frames each.
Out of all the frames, only two frames survive: frame 1.1 and frame 3.2
Note: R is a random number chosen from the range 0 to 2𝑘 − 1 , and value of the
random number increases after each collision.
Amit Jha, SOEE, KIIT-DU
Example 1: The stations on a wireless ALOHA network are a maximum of 600 km apart. If we
assume that signals propagate at 3 × 108 𝑚Τ𝑠, we find 𝑇𝑃 = (600 x 103 ) / (3 x 108 ) = 2 ms.
Now we can find the value of 𝑇𝐵 for different values of K.
a) For K=1, the range of R is {0, 1}. The station needs to generate a random number with
value 0 or 1. So, 𝑇𝐵 is either 0 or 2ms, based on outcome of the random variable.
b) For K=2, the range of R is {0, 1, 2, 3}. So, 𝑇𝐵 can be 0, 2, 4 or 6ms, based on outcome
of the random variable.
c) For K=3, the range of R is {0, 1, 2, 3,…, 7}. So, 𝑇𝐵 is can be 0, 2, 4, 6, 8, 10, 12, or
14ms, based on outcome of the random variable.
d) So on……………
e) We need to mention that if k >10, it is normally set to 10.
Sol:
Average frame transmission time 𝑇𝑓𝑟 is 200 bits/200 kbps or 1 ms. The
vulnerable time is 2 x1 ms =2 ms.
This means no station should send later than 1 ms before this station starts
transmission and no station should start sending during the one 1-ms period
that this station is sending.
0.1
0.08
0.06
0.04
Small G, S≈G
0.02 Large G, S↓0
0
Slots
Amit Jha, SOEE, KIIT-DU
Throughput of Slotted ALOHA
Psuccess = P[0 arrivalsin 𝑇𝑓𝑟 seconds]
= P[0 arrivalsin n intervals] …Abramson’s assumption
𝑛
𝑛
𝐺
= 1−𝑃 = 1−
𝑛
e G ………………..as n
∴ 𝑆 = 𝐺𝑃𝑆𝑢𝑐𝑐𝑒𝑠𝑠 = 𝐺𝑒 −𝐺
0.4
0.368
0.35
0.3
S 0.25 Ge-G
0.2 0.184
0.15
0.1
0.05 Ge-2G
0
1
8
0.5
0.25
0.125
0.0625
0.01563
0.03125
Homework:1) Repeat Example 3 for slotted ALOHA, and observe the conclusion.
2) Derive the formulae for the maximum throughput for Pure and Slotted ALOHA.