CS 5565 This is a closed-book, closed-internet, closed-cellphone and closed-computer exam. However, you may refer to your sheet of prepared notes. Your exam should have 11 pages with 5 questions totaling 100 points. You have 80 minutes. Please write your answers in the space provided on the exam paper. If you unstaple your exam, please put your initials on all pages. You may use the back of pages if necessary, but please indicate if you do so we know where to look for your solution. You may ask us for additional pages of scratch paper. You must submit all sheets you use with your exam. However, we will not grade what you scribble on your scratch paper unless you indicate you want us to do so. Answers will be graded on correctness and clarity. You may lose points if your solution is more complicated than necessary. Name (printed) I accept the letter and the spirit of the Virginia Tech graduate honor code I have not given or received aid on this exam. (signed) # Problem Points Score 1 DNS 10 2 Alternating Bit Protocols 16 3 Sliding Window Protocols 24 4 TCP 32 5 Application Level Framing 18 Total 100 1/11
1 DNS (10 pts) Suppose your local DNS resolver needs to resolve www.kernel.org on behalf of a client. Suppose it has already sent a query to a root server at 198.41.0.4 and received the following reply: ; <<>> DiG 9.2.3 <<>> @a.root-servers.net +norecurse www.kernel.org ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31394 ;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 6, ADDITIONAL: 6 ;; QUESTION SECTION: ;www.kernel.org. IN A ;; AUTHORITY SECTION: org. NS TLD1.ULTRADNS.NET. org. NS TLD2.ULTRADNS.NET. org. org. NS NS TLD3.ULTRADNS.org. TLD4.ULTRADNS.org. org. NS TLD5.ULTRADNS.INFO. org. NS TLD6.ULTRADNS.CO.UK. ;; ADDITIONAL SECTION: TLD1.ULTRADNS.NET. TLD2.ULTRADNS.NET. A A 204.74.112.1 204.74.113.1 TLD3.ULTRADNS.org. A 199.7.66.1 TLD4.ULTRADNS.org. TLD5.ULTRADNS.INFO. A A 199.7.67.1 192.100.59.11 TLD6.ULTRADNS.CO.UK. A 198.133.199.11 ;; Query time: 11 msec ;; SERVER: 198.41.0.4#53(a.root-servers.net) ;; WHEN: Sun Mar 20 19:59:13 2005 ;; MSG SIZE rcvd: 290 What type of query will the resolver send next and to whom? What will the value of the query s name field be? 2/11
2 Alternating Bit Protocols (16 pts) a) Rdt3.0 Receiver FSM (6 pts) In lecture we discussed how the mechanisms used by reliable data transfer protocols changed as the different assumptions regarding the underlying channel evolved. We considered the spectrum from a reliable, perfect channel to a lossy one that can have bit errors. You may recall this slide that summarizes this evolution: perfect channel rdt1.0 bit errors rdt2.0 Evolution of Assumptions error detection: checksums, receiver feedback: acknowledgements Automatic Repeat request (ARQ protocol) corrupted acks retransmissions duplicates sequence numbers 0/1: alternating bit protocol rdt2.1 ---- eliminate NAK: use ACK+seq num rdt2.2 lossy channel timeouts rdt3.0 lossy channel with bit errors We discussed the sender and receiver FSMs for the different versions of the resulting protocols, with the exception of the receiver FSM used in rdt3.0. Does the receiver FSM used in rdt3.0 differ from the receiver FSM used in rdt2.2? If so, how? If not, why not? Be specific! 3/11
b) Reordered Packets (10 pts) Give a sender and receiver timeline that shows that an alternating-bit protocol such as rdt3.0 can fail if the underlying channel can reorder packets. (Show the timeline for the sender on the left, for the receiver on the right, and include the type and sequence numbers of messages exchanged.) Sender Receiver 4/11
3 Sliding Window Protocols (24 pts) In project 1B, you implemented a sliding window protocol for reliable data transfer over an unreliable UDP link. For the following questions, assume the setup you used in this project. a) Bandwidth vs Throughput (12 pts) In Experiment 2, you should have obtained a chart similar to this one: 700 600 Bandwidth vs Throughput for D=150ms 500 Throughput in Kbps 400 300 200 100 0 0 200 400 600 800 1000 1200 Bandwidth in Kbps i. (8 pts) Considering that window sizes greater than 32 packets will cause queuing losses at the router, what is the theoretical maximum throughput you can expect for B=1Mbps, D=150ms, L=0, and an MTU of 500 bytes? Ignore header overhead and any delay besides D! 5/11
ii. (4 pts) One group used a retransmission timeout of 50ms in experiment 2. Even if the router s queue had infinite capacity, what theoretical maximum throughput should they expect in this case, assuming that they implemented retransmission correctly? b) Delay vs Throughput (12 pts) In Experiment 3, you should have obtained a chart similar to this one: 1000 900 Delay vs Throughput B=1Mbps 800 700 Throughput in Kbps 600 500 400 300 200 100 0 0 100 200 300 400 500 600 700 Delay in ms i. (2 pts) Why does throughput not degrade for delays less than about 100ms? 6/11
ii. (2 pts) Why does throughput degrade for delays greater than about 100ms? iii. (2+2 pts) How can pipelined protocols counteract the decrease in throughput incurred with larger delays? Does it matter whether the delay is propagation delay, transmission delay, queuing delay or processing delay? iv. (4 pts) Even with those countermeasures deployed, increases in endto-end delay often go hand in hand with throughput degradation. Explain why that is so! 7/11
4 TCP (32 pts) a) Header Prediction (6 pts) Header prediction is an optimization by which a TCP implementation reduces the time it takes to prepare the TCP header for the next segment it sends. The idea is that the headers of consecutive segments in a connection differ only slightly. Therefore, once established, a template can be created for each connection. When the next piece of data is passed down from the application, the header template is copied using a bulk copy function such as memcpy(); afterwards, the non-constant fields are filled in. In the drawing of a TCP header below, cross out the fields that are likely to remain constant between consecutive segments of a connection (consider segments sent by the client, and assume one-way flow of data from client to server!) b) Congestion Control (14 pts) 45 40 35 Congestion Window Size (in Segments) 30 25 20 15 10 5 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Transmission Round 8/11
(This is problem 27 in the book.) Assume that TCP Reno with fast recovery is being used in the chart above, which plots TCP s congestion window size as a function of time. A transmission round consist of the sender sending as many segments as are allowed by the current congestion window size. Answer the following questions: i. (1 pt) Identify the intervals of time when TCP slow start is operating. ii. (1 pt) Identify the intervals of time when TCP congestion avoidance is operating. iii. (2 pt) What happened after the 16 th transmission round? iv. (2 pt) What happened after the 22 nd transmission round? v. (2 pt) What is the initial value of the TCP Threshold variable? vi. (2 pt) What is the value of Threshold at the 18 th transmission round? vii. (2 pt) What is the value of Threshold at the 24 th transmission round? viii. (2 pt) Assuming that a maximum segment size (MSS) of 1000 bytes is being used, and assuming that the sender only sends MSS-sized segments, how much data will the sender have sent by the end of the 7 th transmission round? 9/11
c) Slow Start (12 pts) i. (6 pts) In 1997, engineers at Sun noticed a particular phenomenon in a series of web benchmarks. If a client requested a file from a web server using HTTP/1.0, and if that file was about 2 MSS in length, then there appeared an undesirable delay of up to 500ms between when the client received the first data segment from the server and when it received the second data segment. This delay occurred even in local networks with very small round-trip times. Explain what interplay of TCP mechanisms that you know about can cause this phenomenon! Be specific. ii. (3+3 pts) RFC 3390 proposes to use initial congestion window sizes larger than one MSS. Name one advantage and one disadvantage of this proposal. 10/11
5 Application Level Framing (18 pts) Refer to Clark & Tennenhouse s paper on Architectural Considerations for a New Generation of Protocols. Describe how you would implement project 1B using application level framing. Describe the protocol you would deploy. Describe the layout of the protocol data units exchanged between client and server. Describe how your receiver would work differently from your current implementation. (State your assumptions if necessary.) 11/11