当前位置:文档之家› 计算机网络作业三

计算机网络作业三

Computer Network 2015fallHomework 3作业提交地址:ftp:///~zhgf/ComputerNetwork2015/1. UDP and TCP use 1's complement for their checksums. Suppose you have thefollowing three 8-bit words: 01010101, 01110000, 11001100.a) What is the 1's complement of the sum of these words? Please describe suchmechanism.b) Why is it that UDP take the 1's complement of the sum, i.e., why not just use thesum?c) With the 1's complement scheme, how does the receiver detect errors. Is itpossible that a 1-bit error will go undetected? How about a 2-bit error?Ans:(a) 0101 0101+ 0111 00001100 01011100 0101+ 1100 11001001 00101’s complement: 0110 1101(b) To detect “errors” (e.g., flipped bits) in transmitted segment.(c) ①Compute checksum of received segment ②Check if computed checksum equals checksum field value:if NO, error detected; if YES, no error detected.All one-bit errors will be detected, but two-bit errors can be undetected (e.g., if the last digit of the first word is converted to a 0 and the last digit of the second word is converted to a 1).2. In our rdt protocols,a) why did we need to introduce timers?b) why did we need to introduce sequence numbers?c) Suppose that the roundtrip delay between sender and receiver is constant andknown to the sender. Would a timer still be necessary in protocol rdt 3.0,assuming that packets can be lost? Explain.Ans:(a) To handle losses in the channel. If the ACK for a transmitted packet is not received within the duration of the timer for the packet, the packet(or its ACK or NACK) is assumed to have been lost. Then the packet will be transmitted.(b) To help a receiver to find out whether an arriving packet having new data or is an edition of retransmission.(c) It ’s necessary. Because if the round trip time is known, the sender will know either a packet or ACK(or NACK) of the packet is lost where the ACK(or NACK) might still be on the way after the timer expires. But a timer with constant duration is still necessary to detect the loss.3. Consider transferring an enormous file of L bytes from host A to host B. Assume anMSS(Maximum Segment Size) of 1220 bytes.a) What is the maximum length of L such that TCP sequence numbers are notexhausted? Recall that the TCP number field has four bytes.b) For the L you obtain in (a), find how long it takes to transmit the file. Assumethat a total of 66 bytes of transport, network and data-link header are added to each segment before the resulting packet is sent out over a 10 Mbps link. Ignore flow control and congestion control, so A can pump out the segments back-to-back and continuously.Ans:(a) 4 bytes = 32 bits, 232=4,294,967,296 (b) The number of segment is 465,520,312202^32=⎥⎥⎤⎢⎢⎡. 66 bytes of header get added to each segment giving a total of 232,350,690 bytes of header.The total number of bytes transmitted is 2^32+232,250,690=3622x10^7bits.Thus it would take 3622 seconds=60 minutes to transmit the file.4. True or false, then explain.a) If a Web page consists of exactly one object, then non-persistent and persistent connections have exactly the same response time performance?b) Consider sending one object of size O from server to browser over TCP. If O > S, where S is the maximum segment size, then the server will stall at least once?c) Suppose a Web page consists of 10 objects, each of size O bits. For persistent HTTP, the RTT portion of the response time is 20 RTT ?d) Suppose a Web page consists of 10 objects, each of size O bits. For non-persistent HTTP with 5 parallel connections, the RTT portion of the response time is 12 RTT ? Ans:(a) True. Because there is only one object.(b) True. Because O is bigger than S.(c) False. It’s 2. Because the connection still remain o pen after first transmission.(d) False. It’s less than 12 because there are 5 parallel connections. After 2 RTT time, 5 objects would be transmitted at same time.5. Assuming TCP Reno is the protocol experiencing the behavior shown above,answer the following questions. In all cases, you should provide a shortdiscussion justifying your answer.a. Identify the intervals of time when TCP slow start is operating.b. Identify the intervals of time when TCP congestion avoidance isoperating.c. After the 16th transmission round, is segment loss detected bytriple duplicate ACK or by a timeout?d. After the 22nd transmission round, is segment loss detected by atriple duplicate ACK or by a timeout?e. What is the initial value of Threshold at the first transmission round?f. What is the value of Threshold at the 18th transmission round?g. During what transmission round is the 70th segment sent?h. Suppose TCP Tahoe is used (instead of TCP Reno), and assumethat triple duplicate ACKs are received at the 16th round. What arethe threshold and the congestion window size at the 19th round? Ans:(a) From the figure, we can see the intervals of time when TCP slow start is operating is [1, 6] and [23, 26].(b) From the figure, we can see the intervals of time when TCP congestion avoidance is operating is [6, 16] and [17, 22].(c) It’s a triple duplicate ACK. Because if there was a timeout, the congestion window size would have dropped to 1.(d) It’s timeout. Because the congestion window size have dropped to 1.(e) It’s 32, Because it is the time when slowtart stops and congestion avoidance begins.(f) It’s 21. Because the threshold is set to half the value of the congestion window when packet loss is detected. And when loss is detected during transmission round 16, the congestion windows size is 42.(g) At 7th transmission round. The 1st transmission round, packet 1 was sent; 2nd , packets 2- 3; 3rd, packets 4-7; 4th, packets 8-15; 5th, packets 16-31; 6th , packets 32-63; then packets 64-96 were sent in 7th transmission round. (h) The threshold is 42 and the congestion window size is 1.Remarks:o explanations for your answers will be appreciated.o no more than 90 for single answers.o an egg in reward for a copy of answer sheet or fellow's assignment.。

相关主题