Faculty of Engineering
[ENME506] Introduction to Computer Networks - WS24
Dr. Yasmine Abdallah
Eng. Mariham Wasfy
Eng. Mostafa Elbanna
Eng. Mariam Mamdouh
Tutorial (12)
Solution
Question 1
Consider an AlOHA based system where the packet size is 2000 Bytes and the transmission rate is
1Mbps.
a. Calculate the vulnerable time assuming ALOHA and slotted ALOHA systems.
𝑃𝑎𝑐𝑘𝑒𝑡 𝑠𝑖𝑧𝑒 2000 × 8
Tt = = = 16ms
𝑅𝑎𝑡𝑒 1×106
Vulnerable period (ALOHA) = 2Tt = 32ms
Vulnerable period (Slotted ALOHA) = Tt = 16ms
b. Assume that the average packet generation rate is 50 packets per second. Calculate the
throughput (S) for ALOHA and slotted ALOHA.
G is the number of packets generated per Tt.
# of generated packets Seconds
50 1
G 16m
50 ×16× 10−3
G= 1
= 0.8
SALOHA= 𝐺𝑒 −2𝐺 = 0.8e-1.6 = 0.1615
SSlottedALOHA= 𝐺𝑒 −𝐺 = 0.8e-0.8 = 0.3594
Question 2
Consider a small wireless network where two terminals (A, B) need to communicate using ALOHA
protocol with a central station. The transmission rate out of terminal A is 20 Mbps. The
transmission rate out of terminal B is 10 Mbps. Frames sent by terminal A have a frame size of
2000 Bytes. Frames sent by terminal B have a frame size of 1000 Bytes. DA = 30 Km represents the
distance between terminal A and the central station. DB = 150 Km represents the distance between
terminal B and the central station.
N.B.:
• Collisions occur when some bits packets sent
by A and B simultaneously arrive at the
central station.
• Speed of light is 3 × 108 m/sec.
a. If A Starts transmission at t = 0 and B starts transmission at t = 0.5 msec, will collision
occur?
𝑃𝑎𝑐𝑘𝑒𝑡 𝑠𝑖𝑧𝑒 2000 ×8
Ttrans_a = = = 0.8 𝑚𝑠
𝑅𝑎𝑡𝑒 20 × 106
𝑃𝑎𝑐𝑘𝑒𝑡 𝑠𝑖𝑧𝑒 1000 ×8
Ttrans_b = = = 0.8 𝑚𝑠
𝑅𝑎𝑡𝑒 10 × 106
𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒 30 × 103
Tprop_a = 𝑆𝑝𝑒𝑒𝑑
= 3 × 108
= 0.1 𝑚𝑠
𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒 150 × 103
Tprop_b = 𝑆𝑝𝑒𝑒𝑑
= 3 × 108
= 0.5 𝑚𝑠
@ A: 0 0.8
@ B: 0.5 1.3
@ C: 0.1 0.9 1 1.8
∴ No Collision.
b. Calculate the vulnerable period for transmission by terminal A?
Vulnerable Period = Ttrans_a + Ttrans_b = 0.8m + 0.8 m = 1.6ms
Question 3
Consider a small wireless network where two terminals (A, B) need to communicate using slotted
ALOHA protocol with a central station. The transmission rate out of both terminals is 1 Mbps and
the frames sent by both terminals have a frame size of 2000 Bytes. The two stations are equidistance
from the central station. Collisions occur when some bits packets sent by A and B simultaneously
arrive at the central station. Calculate the vulnerable period if:
𝑃𝑎𝑐𝑘𝑒𝑡 𝑠𝑖𝑧𝑒 2000 × 8
Ttrans = = = 16ms
𝑅𝑎𝑡𝑒 1 × 106
0 8 16 24 32
a. The slot time is 8 msec.
slot time = 8 msec
A
Case where slot time < Ttrans
Vulnerable Period =
# of corrupted slots × slot time B
= 3 × 8 = 24ms
b. The slot time is 24 msec. 0 24 48
slot time = 24 msec
A
Case where slot time > Ttrans
Vulnerable Period =
Slot time = 24ms B
Question 4
Consider an Ethernet of diameter 300 m, packet size 1500 bytes, speed of 2.1 × 108 m/sec and
transmission rate of 1 Mbps.
Given:
• D = 300 m
• Lframe = 1500 B
• C = 2.1 × 108 m/sec
• R = 1 Mbps
𝐷 300
Tprop = 𝐶 = 2.1 ×108 = 1.428 µsec
𝑆𝑖𝑧𝑒 1500 × 8
Ttrans = 𝑅𝑎𝑡𝑒 = 1 × 106
= 12 msec
a. Calculate the vulnerable period in CSMA.
300
Vulnerable Period in CSMA = Tprop = = 1.428 µs
2.1 ×108
b. If CSMA/CD is used. Stations A & B are located at the edges of the network. Given that
station A starts transmission at t and station B starts transmission at t + 0.5 µsec.
i. At what time will B abort transmission?
B aborts transmission @: t + Tp = t + 1.428 µs
ii. At what time will A abort transmission?
A aborts transmission @: t + 0.5µs + Tp = t + 1.928 µs
Question 5
A channel using random access protocols has three stations on a bus with end-to-end propagation
delay t. Station A is located at one end of the bus and stations B & C are located together at the
other end of the bus. Frames arrive at the three stations and are to be transmitted at stations A, B &
C at the respective time tA = 0, tB = 0.5t and tC = 1.5t.
Frames require transmission time of 4t. In appropriate
figures with time at the horizontal axis. Show the
transmission activity of each of the three stations for
using:
Given:
Tprop = t, Ttrans = 4t
a. ALOHA
0 t 2t 3t 4t 5t 6t
C
b. Non-persistent CSMA
0 t 2t 3t 4t 5t 6t
Idle, tx
C
backoff
Busy
c. Non-persistent CSMA/CD
0 t 2t 3t 4t 5t 6t
backoff
A
Detected collision; abort tx.
B
backoff
Idle, tx Detected collision; abort
tx. backoff
C
Question 6
Consider the network shown below where terminals A, B, C and D are communicating over a bus
with a central station. The transmission time for packets from terminal B and C is t units. The
transmission time for packers from terminals A and D is 0.5 units.
What is the vulnerable period in the following scenarios? (Calculate based on worst case scenario)
a. ALOHA: max Ttx + max Ttx = 2t
b. Slotted ALOHA with slot time = t units: Ttx = t
c. 1-Persistent CSMA: Tprop = 3t
d. Non-Persistent CSMA/CD: Tprop = 3t