Assignment title: Information


ECE374: Homework 1 1 Homework 1 assignment for ECE374 Posted: 02/03/14 Due: 02/10/14 Note: In all written assignments, please show as much of your work as you can. Even if you get a wrong answer, you can get partial credit if you show your work. If you make a mistake, it will also help the grader show you where you made a mistake. Problem 1 (10 Points): Consider an application that transmits data at a steady rate (for example, the sender generates and N-bit unit of data every k time units, where k is small and fixed). Also, when such an applications starts, it will continue running for a relatively long period of time. Answer the following questions, briefly justifying your answer: a. Would a packet–switched network or a circuit-switched network be more appropriate for this application? Why? b. Suppose that a packet-switched network is used and the only traffic in this network comes from such applications as described above. Furthermore, assume that the sum of the application data rates is less than the capacities of each and every link. Is some form of congestion control needed? Why? Solution: a. A circuit-switched network would be well suited to the application described, because the application involves long sessions with predictable smooth bandwidth requirements. Since the transmission rate is known and not bursty, bandwidth can be reserved for each application session circuit with no significant waste. In addition, we need not worry greatly about the overhead costs of setting up and tearing down a circuit connection, which are amortized over the lengthy duration of a typical application session. b. Given such generous link capacities, the network needs no congestion control mechanism. In the worst (most potentially congested) case, all the applications simultaneously transmit over one or more particular network links. However, since each link offers sufficient bandwidth to handle the sum of all of the applications' data rates, no congestion (very little queuing) will occur. Problem 2 (20 Points): This elementary problem begins to explore propagation delay and transmission delay, two central concepts in data networking. Consider two hosts, A and B, connected by a single link of rate R bps. Suppose that the two hosts are separated by m meters, and suppose the propagation speed along the link is s meters/sec. Host A is to send a packet of size L bits to Host B. a. Express the propagation delay, dprop, in terms of m and s. b. Determine the transmission time of the packet, dtrans, in terms of L and R.c. Ignoring processing and queuing delays, obtain an expression for the end-toend delay. d. Suppose Host A begins to transmit the packet at time t=0. At time t=dtrans, where is the last bit of the packet? e. Suppose dprop is greater than dtrans. At time t=dtrans, where is the first bit of the packet? f. Suppose dprop is less than dtrans. At time t=dtrans, where is the first bit of the packet? g. Suppose s=2.5*108, L=500 bits, and R=128 kbps. Find the distance m so that dprop equals dtrans. Solution: a. d m s prop = / seconds. b. dtrans = L / R seconds. c. d end −to−end = (m / s + L/ R) seconds. d. The bit is just leaving Host A. e. The first bit is in the link and has not reached Host B. f. The first bit has reached Host B. g. Want m = L R s = 500 128×103 (2.5×108) = 977km. Problem 3 (15 Points): A packet switch receives a packet and determines the outbound link to which the packet should be forwarded. When the packet arrives, one other packet is halfway done being transmitted on this outbound link and four other packets are waiting to be transmitted. Packets are transmitted in order of arrival. Suppose all packets are 1,200 bytes and the link rate is 2 Mbps. What is the queuing delay for the packet? More generally, what is the queuing delay when all packets have length L, the transmission rate is R, x bits of the currently-being-transmitted packet have been transmitted, and n packets are already in the queue? Solution: The arriving packet must first wait for the link to transmit 5,400 bytes or 43,200 bits. Since these bits are transmitted at 2 Mbps, the queuing delay is 21.6 msec. Generally, the queuing delay is (nL + (L - x))/R.ECE374: Homework 1 3 Problem 4 (25 Points): Perform a Traceroute between your computer and www.ucsd.edu at three different hours of the day. (Add screenshots of the three Traceroutes to your answer!) a. Find the average and standard deviation of the round-trip delays at each of the three hours. b. Find the number of routers in the path at each of the three hours. Did the paths change during any of the hours? c. Try to identify the number of ISP networks the Traceroute packets pass through from source to destination. Routers with similar names and/or similar IP addresses should be considered as part of the same ISP. In your experiments, do the largest delays occur at peering interfaces between adjacent ISPs? d. Repeat the above for a destination on a continent different then the source. Compare the intra- and inter-continent results. Solution: There is no general solution for this problem, since this depends on the results you obtained from traceroute. Problem 5 (15 Points): Suppose you would like to urgently deliver 30 terabytes of data from Boston to Los Angeles. You have a 500 Mbps dedicated link for data transfer available. Would you prefer to transmit the data via this link or instead use FedEx overnight delivery? Explain. Solution: 30 terabytes = 30 * 1012 * 8 bits. So, if using the dedicated link, it will take 30 * 1012 * 8 / (500 *106 ) =480000 seconds = 5.6 days. But with FedEx overnight delivery, you can guarantee the data arrives in one day, and it only costs you no more than $100. Problem 6 (15 Points): Consider sending a large file of F bits from Host A to Host B. There are four links (and three switches) between A and B, and the links are uncongested (that is, no queuing delays). Host A segments the file into segments of S bits each and adds 80 bits of header to each segment, forming packets of L=80 + S bits. Each link has a transmission rate of R bps. Find the value of S that minimizes the delay of moving the file from Host A to Host B. Disregard propagation delay. Start solving this problem by calculating the overall delay first!Solution: Time at which the 1st packet is received at the destination =!!!" ! ×4 sec. After this, one packet is received at destination every R S + 80 sec. Thus delay in sending the whole file ����� = !!!" ! ×4 + ! ! − 1 × !!!" ! = !!!" ! × ! ! + 3 To calculate the value of S which leads to the minimum delay, � �� ����� = � ⟹ � = �� � �.