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 xrtt 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 0 packets can be sent per RTT. Solution: a) 1.5 MB = 1,58,91 bits. initial RTT s (160 ms) + 1,58,91/10,000,000 bps (transmit) + RTT/ (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+1.8 = 14.58 seconds. c) Dividing the 1,536 packets by 0 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 RTTs, for 6.8 seconds.. 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 10 3 m/ ( 10 8 m/sec) = 75 µs 800 bits/75 µs is.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 10 6 bits/sec =.5 x 10 6 bits Page 1 of 11
4. Calculate the minimum RTT and delay x bandwidth product for a 18-Kbps point-topoint 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- 3x10 8 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) * x k Step: 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) 10001 Generator 1010 101010000 1010 -Message 1000 1010 00100 -Remainder Page of 11
Message transmitted is: 101010100 is transmitted 101010100 is exactly divisible by 1010. (Error Free). Module 6: Bridges and Switches Delay diagram for Datagram circuits. P1 P1 P Packet P Source P 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, switches =3t+3P+P between source and destination =3t+5P Page 3 of 11
T Source Switch1 Switch Destination t P t P t P P P = 3t+5P Module 7: Switches and Connectionless Find the shortest path in the network Using Spanning tree algorithm A B B B3 E B4 B5 D F C G B1 H Fig: Extended LAN with Loops Page 4 of 11
Focusing on the node B3: B3 receives (B,0,B) Since >3, B3 accepts B as root B3 adds 1 to the distance advertised by B (0) and sends (B,1,B3) towards B5 B accepts B1 as root and sends (B1,1,B) towards B3 B5 accepts B1 as root and sends (B1,1,B5) towards B3 B3 accepts B1 as root and notes that B and B5 are closer to root. Thus B3 stops forwarding Hence the above figure is modified as follows: C A B B3 B H B4 B1 Fig: Spanning tree with some ports not selected Module31: Congestion Control Leaky Bucket Algorithm D B5 F Calculate the maximum output burst using token bucket algorithm for the following data C = 50 Kb, M = 5 Mbps,r = Mbps. Using token bucket algorithm we know that, Maximum output burst = C + rs = MS G E Page 5 of 11
And S=C/M-r S Burst length M Maximum output rate S Maximum byte in lengths r Token arrival rate C Capacity of token bucket in byte So, S=C/M-r =50/ (5-) S=11ml Maximum output burst = C + rs = MS =5*11 Maximum output burst =75 Module 3: Routing Algorithms Dijktra s Algorithm Consider the network, 3 4 For source =1 5 1 1 3 4 5 Iteration N 3 4 5 6 Initial {1} 3 5 1. {1,3} 3 4 3. {1,,3} 3 4 7 3 3. {1,,3,6} 3 4 5 3 4. {1,,3,4,6} 3 4 5 3 5 {1,,3,4,5,6} 3 4 5 3 6 Page 6 of 11
The spanning tree for this network is 3 4 1 6 5 Distance Vector Algorithm Consider the network, 5 1 3 4 1 3 5 4 For destination=6 Iteration 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, ). (3, 3) (5, 6) (6, 1) (3, 3) (6, ) 3. (3, 3) (4,4 ) (6, 1) (3, 3) (6, ) 6 Page 7 of 11
4. (3, 3) (4,4 ) (6, 1) (3, 3) (6, ) The spanning tree for this network is 1 Module 35: BGP IP-Address 4 1 5 A block of address es is granted to a small organization. We know that one of the addresses is 05.16.37.39/8. 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 8, so 3-8=4 We should make 4 right most bits to 0, we get 11001101 00010000 00100101 00100000 So the starting block address is 05.16.37.3 6 ii. Mask is 8, so 3-8=4 We should make 4 right most bits to 1, we get 11001101 00010000 00100101 00101111 Page 8 of 11
So the last block address is 05.16.37.47 iii. We know that, 3-n 3-8 = 4 = 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*3=1mod40 (7*3=161 if we divide it by 40 we will get remainder as 1) d=3 We know that, Encryption can be done using C=M e mod n Page 9 of 11
=18 7 mod 55 = (18 4 (18 (18 mod 55))) =36*49*18 mod 55 C=17 We know that, Decryption can be done using ii) M=C d mod n =17 3 mod 55 = (17 16 (17 4 (17 (17 mod 55))) M=18 a=3,q=11,x=3,m=18 n=p*q =3*11 n =33 φ = (p-1)*(q-1) =*10 φ =0 Given encryption key e3 Compute d such that e*d=1mod φ 3*d=1 mod 0 3*7=1mod0 (3*7=1 if we divide it by 0 we will get remainder as 1) d=7 We know that, Encryption can be done using Page 10 of 11
C=M e mod n =9 3 mod 33 = (9 (9 mod 33)) C=9 We know that, Decryption can be done using M=C d mod n =9 7 mod 33 = (9 4 (9 (9 mod 33))) M=9 Page 11 of 11