Tutorial for Chapter 1 CEN 444 Computer Networks Dr. Mostafa Dahshan Department of Computer Engineering College of Computer and Information Sciences King Saud University mdahshan@ksu.edu.sa
Tutorial for Chapter 1 Problem 1 Problem 1 If a camel can carry a box of three 8-mm tapes. These tapes each contain 7 gigabytes. The camel can travel at 18 km/hour. 1. For what range of distances does the camel have a higher data rate than a transmission line whose data rate (excluding overhead) is 150 Mbps? 2. How does your answer change if: a. camel s speed is doubled. b. each tape capacity is doubled. c. the data rate of the transmission line is doubled. M. Dahshan CEN444 Computer Networks Page 2 of 15
Tutorial for Chapter 1 Problem 1 Solution The camel can carry 7 3 = 21 gigabytes, or 21 8 = 168 gigabits. A speed of 18 km/hour = 18 60 60 The time to travel distance x km is = 0.005 km/sec. x 0.005 = 200x sec, Data rate = data size / travel time = 168/200x Gbps = 0.84/x Gbps = 840/x Mbps. Data rate higher than 150 Mbps means 840/x > 150, i.e. x < 840 150 = 5.6 km. Thus, at x < 5.6 km, the camel has a higher rate than the communication line. (a) New speed 18 2 km/hour = 36/(60 60) = 0.01 km/sec. The time to travel distance x a km is x a 0.01 = 100x a sec, Data rate = data size / travel time = 168 100x a Gbps = 1.68 x a Gbps = 1680 x a Data rate higher than 150 Mbps means 1680 > 150, i.e. x x a < 1680 a 150 Mbps. = 11.2 km. M. Dahshan CEN444 Computer Networks Page 3 of 15
Tutorial for Chapter 1 Problem 1 That is, x a = 2x. Therefore, if camel s speed is doubled, maximum value of x is also doubled. (b) The camel can carry 2 7 3 = 42 gigabytes, or 42 8 = 336 gigabits. Data rate = data size / travel time = 336 200x b Gbps 1.68/xb Gbps = 1680/xi Mbps. The rest is the same as (a). Therefore, if tape capacity is doubled, value of x is also doubled. (c) x < 840/150 x c < 840 150 2, x c = x 2. Therefore, if data rate of the transmission line is doubled, value of x is halved. M. Dahshan CEN444 Computer Networks Page 4 of 15
Tutorial for Chapter 1 Problem 2 Problem 2 A factor in the delay of a store-and-forward packet-switching system is how long it takes to store and forward a packet through a switch. If switching time is 10 μ sec, is this likely to be a major factor in the response of a client-server system where the client is in New York and the server is in California? Assume the propagation speed in copper and fiber to be 2/3 the speed of light in vacuum. Note: the distance between New York and California is 5,000 km. Assume there can be a maximum of 50 switches along the path. M. Dahshan CEN444 Computer Networks Page 5 of 15
Tutorial for Chapter 1 Problem 2 Solution The speed of propagation is 200,000 km/sec = 200 meters/μsec. In 10 μsec the signal travels 200m 10 = 2000m = 2 km. Thus, each switch adds the equivalent of 2 km of extra cable. Traversing 50 switches adds 2 50 = 100 km to the total path. If the client and server are separated by 5000 km, the percentage of the equivalent added distance is which is 100 5000 = 2% Thus, switching delay is not a major factor under these circumstances. M. Dahshan CEN444 Computer Networks Page 6 of 15
Tutorial for Chapter 1 Problem 3 Problem 3 1. Calculate the total time required to transfer a 1,000-KB file in the following cases, assuming an RTT of 100 ms, a packet size of 1-KB data, and an initial 2xRTT of handshaking before data is sent. a. The bandwidth is 1.5 Mbps, and data packets can be sent continuously. b. The bandwidth is 1.5 Mbps, but after we finish sending each data packet we must wait one RTT before sending the next. M. Dahshan CEN444 Computer Networks Page 7 of 15
Tutorial for Chapter 1 Problem 3 Solution a. We have a 2xRTT initial handshake, followed by the time to transmit 1000 KB, and finally the propagation delay (half RTT) for the last bit to reach the other side. Therefore, we have: Initial handshake is 2 0.1 = 0.2 sec Time to transmit 1000 KB = data size in bits = 1000 103 8 = 5.333 sec data rate in bits per second 1.5 10 6 Propagation delay for the last bit to reach the other side = 1 2 0.1 = 0.5 sec Total delay = 0.2 + 5.333 + 0.05 = 5.583 sec M. Dahshan CEN444 Computer Networks Page 8 of 15
Tutorial for Chapter 1 Problem 3 b. Initial handshake is 2 0.1 = 0.2 sec Time to transmit each packet = packet transmission time + RTT = 1 103 8 1.5 106 + 0.1 = 0.105333 sec This apply to the first 999 packets. For the last packet, the delay is = 1 103 8 1.5 106 = 0.005333 sec Propagation delay for the last bit to reach the other side = 1 2 0.1 = 0.5 sec Total delay is 0.2 + 999 0.105333 + 0.005333 + 0.05 = 105.483 sec M. Dahshan CEN444 Computer Networks Page 9 of 15
Tutorial for Chapter 1 Problem 4 Problem 4 Consider a point-to-point link 2km in length. At what bandwidth would propagation delay (at a speed of 2 10 8 m/sec) equal transmit delay for 100-byte packets? What about 512-byte packets? M. Dahshan CEN444 Computer Networks Page 10 of 15
Tutorial for Chapter 1 Problem 4 Solution First, we calculate the propagation delay. Then we equate the result to the transmission delay with bandwidth being the unknown parameter. Propagation delay = distance / signal speed = 2 103 m 2 10 8 m/sec = 10 5 sec Transmission delay = = data size in bits data rate in bits per second For 100-byte packet, transmission delay = 100 8 data rate (bandwidth) Thus, data rate = 100 8 = 800 = 8 transmission delay 10 5 107 bits/sec For 512-byte packet, transmission delay = 512 8 data rate (bandwidth) Thus, data rate = 512 8 10 5 = 409600000 = bits/sec M. Dahshan CEN444 Computer Networks Page 11 of 15
Tutorial for Chapter 1 Problem 5 Problem 5 A disadvantage of a broadcast subnet is the capacity wasted when multiple hosts attempt to access the channel at the same time. As a simplistic example, suppose that time is divided into discrete slots, with each of the n hosts attempting to use the channel with probability p during each slot. What fraction of the slots will be wasted due to collisions? M. Dahshan CEN444 Computer Networks Page 12 of 15
Tutorial for Chapter 1 Problem 5 Solution We have the following possible events: Events 1 through n consist of the corresponding host successfully attempting to use the channel, i.e., without a collision. The probability of each of these events is p(1 p) n 1. Event n + 1 is an idle channel, with probability (1 p) n. Event n + 2 is a collision. We want to calculate the probability of this event. The total is n + 2 events. Since these n + 2 events are exhaustive, their probabilities must sum to unity. The probability of a collision, which is equal to the fraction of slots wasted, is then just 1 np(1 p) n 1 (1 p) n. M. Dahshan CEN444 Computer Networks Page 13 of 15
Tutorial for Chapter 1 Problem 6 Problem 6 Five routers are to be connected in a point-to-point subnet. Between each pair of routers, the designers may put a high-speed line, a medium-speed line, a low-speed line, or no line. If it takes 100 ms of computer time to generate and inspect each topology, how long will it take to inspect all of them? M. Dahshan CEN444 Computer Networks Page 14 of 15
Tutorial for Chapter 1 Problem 6 Solution We need to count how many topologies are possible. The number of possible bidirectional links in a fully connected point-to-point topology is n (n 1), where n is the number of nodes. 2 In this case, we have 5 nodes, so we may have 5 4 2 = 10 links. Each of the 10 links have 4 possible types (three speeds or no line). The number of possible topologies = 4 10 = 1048576. Time required to generate and inspect all topologies = 1048576 100 = 104857600 ms, which equals 104857600 10 3 60 60 = 29.127 hours. M. Dahshan CEN444 Computer Networks Page 15 of 15