COMP3720 – Computer Networks Fall 2010 Assignment 2 1. [Chapter 1, P9] Consider a packet of length L, which begins at end system A and travels over three links to a destination end system. These three links are connected by two packet switches. Let di, si, and Ri denote the length, propagation speed, and the transmission rate of link i, for i = 1, 2, 3. The packet switch delays each packet by dproc. Assuming no queuing delays, in terms of di, si, Ri (i = 1,2,3), and L, what is the total end-‐to-‐end delay for the packet? Suppose now the packet is 1,500 bytes, the propagation speed on all three links is 2.5 · 108 m/s, the transmission rates of all three links are 2 Mbps, the packet switch processing delay is 3 msec, the length of the first link is 5,000 km, the length of the second link is 4,000 km, and the length of the last link is 1,000 km. For these values, what is the end-‐to-‐end delay? 2. [Chapter 1, P30] In modern packet-‐switched networks, the source host segments long, application-‐layer messages (for example, an image or a music file) into smaller packets and sends the packets into the network. The receiver then reassembles the packets back into the original message. We refer to this process as message segmentation. The following figure illustrates the end-‐to-‐end transport of a message with and without message segmentation. Consider a message that is 8 · 106 bits long that is to be sent from source to destination in the following figure. Suppose each link in the figure is 2 Mbps. Ignore propagation, queuing, and processing delays. Figure a. End-‐to-‐end message transport without message segmentation. Figure b. End-‐to-‐end message transport with message segmentation. a) Consider sending the message from source to destination without message segmentation. How long does it take to move the message from the source host to the first packet switch? Keeping in mind that each switch uses store-‐and-‐forward packet switching, what is the total time to move the message from source host to destination host? b) Now suppose that the message is segmented into 4,000 packets, with each packet being 2,000 bits long. How long does it take to move the first packet from source host to the first switch? When the first packet is being sent from the first switch to the second switch, the second packet is being sent from the source host to the first switch. At what time will the second packet will be fully received at the first switch? c) How long does it take to move the file from source host to destination host when message segmentation is use? Compare this result with your answer in part (a) and comment. d) Discuss the drawbacks of message segmentation. 3) [Chapter 2, P4] Consider the following string of ASCII characters that were captured by Wireshark when the browser sent an HTTP GET message (i.e., this is the actual content of an HTTP GET message). The characters <cr><lf> are carriage return and line-‐feed characters (that is, the italized character string <cr> in the text below represents the single carriage-‐return character that was contained at that point in the HTTP header). Answer the following questions, indicating where in the HTTP GET message below you find the answer. GET /cs453/index.html HTTP/1.1<cr><lf>Host: gai a.cs.umass.edu<cr><lf>User-Agent: Mozilla/5.0 ( Windows;U; Windows NT 5.1; en-US; rv:1.7.2) Gec ko/20040804 Netscape/7.2 (ax) <cr><lf>Accept:ex t/xml, application/xml, application/xhtml+xml, text /html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 <cr><lf>Accept-Language: en-us,en;q=0.5<cr><lf>AcceptEncoding: zip,deflate<cr><lf>Accept-Charset: ISO -8859-1,utf-8;q=0.7,*;q=0.7<cr><lf>Keep-Alive: 300<cr> <If>Connection:keep-alive<cr><lf><cr><lf> a) What is the URL of the document requested by the browser? b) What version of HTTP is the browser running? c) Does the browser request a non-persistent or a persistent connection? d) What is the IP address of the host on which the browser is running? e) What type of browser initiates this message? Why is the browser type needed in an HTTP request message? 4) [Chapter 2, P9] Consider the following figure, for which there is an institutional network connected to the Internet. Suppose that the average object size is 850,000 bits and that the average request rate from the institution's browsers to the origin servers is 16 requests per second. Also suppose that the amount of time it takes from when the router on the Internet side of the access link forwards an HTTP request until it receives the response is three seconds on average (see Section 2.2.5). Model the total average response time as the sum of the average access delay (that is, the delay from Internet router to institution router) and the average Internet delay. For the average access delay, use ∆/(1 -‐ ∆ß), where ∆ is the average time required to send an object over the access link and ß is the arrival rate of objects to the access link. a) Find the total average response time. b) Now suppose a cache is installed in the institutional LAN. Suppose the miss rate is 0.4. Find the total response time. 5) [Chapter 3, P16] In the generic SR protocol that we studied in Section 3.4.4, the sender transmits a message as soon as it is available (if it is in the window) without waiting for an acknowledgment. Suppose now that we want an SR protocol that sends messages two at a time. That is, the sender will send a pair of messages and will send the next pair of messages only when it knows that both messages in the first pair have been received correctly. Suppose that the channel may lose messages but will not corrupt or reorder messages. Design an error-‐control protocol for the unidirectional reliable transfer of messages. Give an FSM description of the sender and receiver. Describe the format of packets send between sender and receiver, and vice versa. If you use any procedure calls other than those in Section 3.4 (for example, udt_send(), start_timer(), rdt_rcv(), and so on), clearly state their actions. Give an example (a timeline trace of sender and receiver) showing how your protocol recovers from a lost packet. 6) [Chapter 3, P34] Compare GBN, SR, and TCP (no delayed ACK). Assume that the timeout values for all three protocols are sufficiently long such that 5 consecutive data segments and their corresponding ACKs can be received (if not lost in the channel) by the receiving host (Host B) and the sending host (Host A) respectively. Suppose Host A sends 5 data segments to Host B, and the 2nd segment (sent from Host A) is lost. In the end, all 5 data segments have been correctly received by Host B. a) How many segments has Host A sent in total and how many ACKs has Host B sent in total? What are their sequence numbers? Answer this question for all three protocols. b) If the timeout values for all three protocols are much longer than 5 RTT, then which protocol successfully delivers all five data segments in shortest time interval? 7) [Chapter 4, P4] Consider the network below. a) Suppose that this network is a datagram network. Show the forwarding table in router A, such that all traffic destined to host H3 is forwarded through interface 3. b) Suppose that this network is a datagram network. Can you write down a forwarding table in router A, such that all traffic from H1 destined to host H3 is forwarded through interface 3, while all traffic from H2 destined to host H3 is forwarded through interface 4? (Hint: this is a trick question.) c) Now suppose that this network is a virtual circuit network and that there is one ongoing call between H1 and H3, and another ongoing call between H2 and H3. Write down a forwarding table in router A, such that all traffic from H1 destined to host H3 is forwarded through interface 3, while all traffic from H2 destined to host H3 is forwarded through interface 4. d) Assuming the same scenario as (c), write down the forwarding tables in nodes B, C, and D. 8) [Chapter 4, P25] Consider the network below. Using Dijkstra’s algorithm, and showing your work using a table similar to Table 4.3, do the following: Compute the shortest path from t to all network nodes. a) Compute the shortest path from u to all network nodes. b) Compute the shortest path from v to all network nodes. c) Compute the shortest path from w to all network nodes. d) Compute the shortest path from y to all network nodes. e) Compute the shortest path from z to all network nodes. f) 9) [Chapter 5, P14] Consider three LANs interconnected by two routers, as shown below. a) Assign IP addresses to all of the interfaces. For Subnet 1 use addresses of the form 192.168.1.xxx; for Subnet 2 use addresses of the form 192.168.2.xxx; and for Subnet 3 use addresses of the form 192.168.3.xxx. b) Assign MAC addresses to all of the adapters. c) Consider sending an IP datagram from Host E to Host B. suppose all of the ARP tables are up to date. Enumerate all the steps, as done for the single-‐router example in Section 5.4.2. d) Repeat (c), now assuming that the ARP table in the sending host is empty (and the other tables are up to date). 10) [Chapter 5, P25] Suppose two nodes, A and B, are attached to opposite ends of an 800 m cable, and that they each have one frame of 1,500 bits (including all headers and preambles) to send to each other. Both nodes attempt to transmit at time t = 0. Suppose there are four repeaters between A and B, each inserting 20-‐bit delay. Assume the transmission rate is 100 Mbps, and CSMA/CD with backoff intervals of multiple 512 bits is used. After the first collision, A draws K = 0 and B draws K = 1 in the exponential backoff protocol. Ignore the jam signal and 96-‐bit time delay. a) What is the one-‐way propagation delay (including repeater delays) between A and B in seconds? Assume that the signal propagation speed is 2 · 108 m/sec. b) At what time (in seconds) is A’s packet completely delivered at B? c) Now suppose that only A has a packet to send and that the repeaters are replaced with switches. Suppose each switch has a 20-‐bit processing delay in addition to store-‐and-‐forward delay. At what time, in seconds, is A’s packet delivered at B?
Pages to are hidden for
"assignment - COMP3720 – Computer Networks"Please download to view full document