vtu-nptel-nmeict project
TRANSCRIPT
PROBLEMS
Module 05: Performance Metrics
RTT (Round Trip Time)
1. Calculate the total time required transfer a 1.5 MB file in the following cases, assuming
an RTT of 80 ms, a packet size of 1-KB data and an initial 2xRTT of handshaking before
data is sent.
a) The bandwidth is 10 Mbps, and data packets can be sent continuously.
b) The bandwidth is 10Mbps, but after we finish sending each data packet we must wait
one RTT before sending the next.
c) The link allows infinitely fast transmit, but limits bandwidth such that only 20 packets
can be sent per RTT.
Solution:
a) 1.5 MB = 12,582,912 bits. 2 initial RTT’s (160 ms) + 12,582,912/10,000,000 bps
(transmit) + RTT/2 (propagation) ≈ 1.458 seconds.
b) Number of packets required = 1.5 MB/1 KB = 1,536. To the above we add the time
for 1,535 RTTs (the number of RTTs between when packet 1 arrives and packet
1,536 arrives), for a total of 1.458+122.8 = 124.258 seconds.
c) Dividing the 1,536 packets by 20 gives 76.8. This will take 76.5 RTTs (half an RTT
for the first batch to arrive, plus 76 RTTs between the first batch and the 77th partial
batch), plus the initial 2 RTTs, for 6.28 seconds.
2. Consider a point to point link 55 km in length. At what bandwidth would propagation
delay equal transmit delay for 100 byte packets?
Solution: Propagation delay is 55 × 103 m/ (2 × 108 m/sec) = 275 µs
800 bits/275 µs is 2.91 Mbits/sec.
3. Calculate the delay x bandwidth product for a 45-Mbps link with a delay 50 ms.
Solution: delay x bandwidth = 50 x 10 -3 sec x 45 x 106 bits/sec
= 2.25 x 10 6 bits
------------------------------------------------------------------------------------------------------------------------------------------------- Page 1 of 11
VTU-NPTEL-N
MEICT Proj
ect
4. Calculate the minimum RTT and delay x bandwidth product for a 128-Kbps point-to-
point link that is set up between two nodes A and B. The distance from A to B is 55 Gm
and data travels over the link at the speed of light- 3x108 m/sec.
Solution:
Propagation delay on the link is (55 × 109)/(3 × 108) = 184 seconds.
Thus the RTT is 368 seconds.
Module 11: Error Detection
CRC
1. For the given message M=101010. Check whether the transmitted message is error free
or not using CRC algorithm.
Step1: Compute M(x) * xk
Step2: Divide T(x) by C(x)
Step3: Find remainder T(x) / C(x) = R(x)
Step4: subtract T(x) – R(x) = D(x) [D(x) is exactly divisible by C(x)]
Step5: Transmit D(x) M(x) = 101010
C(x) = x3 + x1 (1010)
Generator
10001
1010 101010000
1010
1000
1010
00100
-Message
-Remainder
------------------------------------------------------------------------------------------------------------------------------------------------- Page 2 of 11
VTU-NPTEL-N
MEICT Proj
ect
Message transmitted is:
101010100 is transmitted
101010100 is exactly divisible by 1010. (Error Free).
Module 26: Bridges and Switches
Delay diagram for Datagram circuits.
P1
P1
P2
Packet
P2
Source P2 Destination
For example we divide the message into 3 packets, so k=3 then the equation becomes
=Lt+LP+(k-1)P
=3t+3P+(3-1)P here number of hops =3, 2 switches
=3t+3P+2P between source and destination
=3t+5P
------------------------------------------------------------------------------------------------------------------------------------------------- Page 3 of 11
VTU-NPTEL-N
MEICT Proj
ect
T
Source
1 2 3
Switch1
1 2 3
Switch2
1 2 3
Destination
t P t P t P P P = 3t+5P
Module 27: Switches and Connectionless
Find the shortest path in the network Using Spanning tree algorithm
A
EB3
B B4 B5D F
B2
C G
B1
H
Fig: Extended LAN with Loops
------------------------------------------------------------------------------------------------------------------------------------------------- Page 4 of 11
VTU-NPTEL-N
MEICT Proj
ect
Focusing on the node B3:
B3 receives (B2,0,B2)
Since 2>3 , B3 accepts B2 as root
B3 adds 1 to the distance advertised by B2 (0) and sends (B2,1,B3) towards B5
B2 accepts B1 as root and sends (B1,1,B2) towards B3
B5 accepts B1 as root and sends (B1,1,B5) towards B3
stops forwardingB3 accepts B1 as root and notes that B2 and B5 are closer to root. Thus B3
Hence the above figure is modified as follows:
A
EB3
B
B22
B4
D B5 F
C G
B1
H
Fig: Spanning tree with some ports not selected
Module31: Congestion Control
Leaky Bucket Algorithm
Calculate the maximum output burst using token bucket algorithm for the following data C = 250 Kb, M= 25 Mbps,r = 2 Mbps .
Using token bucket algorithm we know that,Maximum output burst = C + rS =MS
------------------------------------------------------------------------------------------------------------------------------------------------- Page 5 of 11
VTU-NPTEL-N
MEICT Proj
ect
And S=C/M-rS – Burst lengthM – Maximum output rateS – Maximum byte in lengthsr– Token arrival rateC – Capacity of token bucket in byte
So, S=C/M-r=250/ (25-2)
S=11mlMaximum output burst = C + rS =MS
=25*11
Maximum output burst =275
Module 32: Routing Algorithms
Dijktra’s Algorithm
Consider the network,
1 2 3
5 2 1
63 4
1 3 2
52 4
For source =1
Iteration N 2 3 4 5 6
Initial {1} 3 2 5 ∞ ∞
1. {1,3} 3 2 4 ∞ 3
2. {1,2,3} 3 2 4 7 3
3. {1,2,3,6} 3 2 4 5 3
4. {1,2,3,4,6} 3 2 4 5 3
5 {1,2,3,4,5,6} 3 2 4 5 3
------------------------------------------------------------------------------------------------------------------------------------------------- Page 6 of 11
VTU-NPTEL-N
MEICT Proj
ect
The spanning tree for this network is
1 2 32 1
63 4
2
2 5
Distance Vector Algorithm
Consider the network,
1 2 3
5 2 1
63 4
1 3 2
2 54
For destination=6
Iteration 1 2 3 4 5
Initial (-1, ∞) (-1, ∞) (-1, ∞) (-1, ∞) (-1, ∞)
Indicates initially destination n node thinks that all other nodes are at ‘∞’ distance from me
1. (-1, ∞) (-1, ∞) (6, 1) (-1, ∞) (6, 2)
2. (3, 3) (5, 6) (6, 1) (3, 3) (6, 2)
3. (3, 3) (4,4 ) (6, 1) (3, 3) (6, 2)
------------------------------------------------------------------------------------------------------------------------------------------------- Page 7 of 11
VTU-NPTEL-N
MEICT Proj
ect
4. (3, 3) (4,4 ) (6, 1) (3, 3) (6, 2)
The spanning tree for this network is
1 2 3
2 1
64
2
12 5
Module 35: BGP
IP-Address
A block of address es is granted to a small organization. We know that one of the addresses is205.16.37.39/28. What is the first address, last address, and the number of addresses.
The binary representation of the given address is
11001101 00010000 00100101 00100111
i. Mask is 28, so 32-28=4
We should make 4 right most bits to 0, we get
11001101 00010000 00100101 00100000
So the starting block address is 205.16.37.32
ii. Mask is 28, so 32-28=4
We should make 4 right most bits to 1, we get
11001101 00010000 00100101 00101111
------------------------------------------------------------------------------------------------------------------------------------------------- Page 8 of 11
VTU-NPTEL-N
MEICT Proj
ect
So the last block address is 205.16.37.47
iii. We know that , 232-n
232-28 =24 = 16 addresses
Module 43: Network Security
RSA Algorithm
Encrypt the following using RSA algorithm
i) P=5,q=11,e=7,P=18
n=p*q
=5*11
n =55
φ = (p-1)*(q-1)
=4*10
φ =40
Given encryption key e=7
Compute‘d’ such that e*d=1mod φ
7*d=1 mod 40
7*23=1mod40 (7*23=161 if we divide it by 40 we will get remainder as 1)
d=23
We know that, Encryption can be done using
C=Memod n
------------------------------------------------------------------------------------------------------------------------------------------------- Page 9 of 11
VTU-NPTEL-N
MEICT Proj
ect
=187 mod 55
= (184 (182 (18 mod 55)))
=36*49*18 mod 55
C=17
We know that, Decryption can be done using
M=Cd mod n
=1723 mod 55
= (1716 (174 (172 (17 mod 55)))
M=18
ii) a=3,q=11,x=3,M=18
n=p*q
=3*11
n =33
φ = (p-1)*(q-1)
=2*10
φ =20
Given encryption key e3
Compute ‘d’ such that e*d=1mod φ
3*d=1 mod 20
3*7=1mod20 (3*7=21 if we divide it by 20 we will get remainder as 1)
d=7
We know that, Encryption can be done using
------------------------------------------------------------------------------------------------------------------------------------------------- Page 10 of 11
VTU-NPTEL-N
MEICT Proj
ect
C=Memod n
=93 mod 33
= (92 (9 mod 33))
C=9
We know that, Decryption can be done using
M=Cd mod n
=97 mod 33
= (94 (92 (9 mod 33)))
M=9
------------------------------------------------------------------------------------------------------------------------------------------------- Page 11 of 11
VTU-NPTEL-N
MEICT Proj
ect