DOC PREVIEW
Princeton COS 461 - Midterm Exam

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

QUESTION 1: Transmission Overhead (15 POINTS)QUESTION 2: Sockets (15 POINTS)NAME:Login name: Computer Science 461Midterm ExamMarch 15, 20061:30-2:50pmThis test has seven (7) questions. Put your name on every page, and write out and sign the HonorCode pledge before turning in the test. Please look through all of the questions at the beginning to help in pacing yourself for the exam. The exam has 100 points and lasts for 80 minutes, so the number of minutes spent per question should be less than its point value. You should spend no more than 10-12 minutes per question.``I pledge my honor that I have not violated the Honor Code during this examination.'' 12QUESTION 1: Transmission Overhead (15 POINTS)Suppose A has a TCP connection with B, where A sends data packets and B sends ACKs; similarly, suppose D has a TCP connection with C, where D sends data packets and C sends ACKs. Suppose the Maximum Segment Size (MSS) is 472 bytes, and all packets sent by A and D have this size; suppose also that B and C send an ACK in response to each data packet. Suppose that all packets have TCP and IP headers, as well as a 20-byte link-layer header/trailer. Assume the combined data and ACK packets fully utilize the middle link in both directions and no congestion control is applied.(1a) What fraction of the bandwidth is consumed by data traffic (i.e., the TCP segments, rather than the transport, network, and link-layer information)? Feel free to express your answer as a reduced fraction (e.g., ½ or ¾) rather than a decimal number. Show your work.(1b) What if the MSS were increased to 1460 bytes? What is the new fraction? (1c) What if the MSS were increased to 1460 bytes, and the receivers apply the delayed-ACK mechanism to send an ACK for every other data packet? What is the new fraction?ABCD3QUESTION 2: Sockets (15 POINTS)Consider a Web server that generates and sends HTTP response messages to clients over sockets.The header of an HTTP response message consists of a collection of lines, each ending with a carriage return and line feed. For example, HTTP/1.1 200 OK Server: Apache/1.2.7-dev Date: Tue, 07 Jul 1998 18:21:41 GMT Content-Type: text/html …Some early Web-server software generated the lines one at a time, and used a separate system call to write (or send) each line to the socket.(2a) Why is this approach inefficient for the end host?(2b) Why is this approach inefficient for the network? (2c) Describe how a programmer implementing the Web server software could fix this problem.4QUESTION 3: IP Prefixes and Packet Forwarding (10 POINTS)Consider the following three routers, where router R has outgoing interfaces A, B, and C:(3a) How many IP addresses does the prefix 12.2.3.0/24 represent?(3b) List the forwarding-table entries for router R. How does R perform look-ups in this table?(3c) Which outgoing interface does R use for a packet with destination 12.2.3.1?(3d) Which outgoing interface does R use for a packet with destination 12.1.2.3?(3e) Which outgoing interface does R use for a packet with destination 12.2.4.5?12.0.0.0/812.1.0.0/1612.2.3.0/24RABC5QUESTION 4: Transmission Control Protocol (15 points)Suppose two hosts have a long-lived TCP session over a path with a 100 msec round-trip time (RTT). Then, a link fails, causing the traffic to flow over a longer path with a 500 msec RTT.(4a) Suppose the router on the left recognizes the failure immediately and starts forwarding data packets over the new path, without losing any packets. (Assume also that the router on the right recognizes the failure immediately and starts directing ACKs over the new path, without losing any ACK packets.) Why might the TCP sender retransmit some of the data packets anyway?(4b) Suppose instead that the routers do not switch to the new paths all that quickly, and the data packets (and ACK packets) in flight are all lost. What new congestion window size does the TCP sender use?6QUESTION 5: Soft State and Timer Values (15 points)(5a) An offer message from a DHCP server includes a lease time, along with other fields like an IP address, subnet mask, DNS server address, and so on. Why is a lease time necessary?(5b) A DNS response message from a DNS server includes a time-to-live field. Why is this necessary?(5c) The IP packet header includes a time-to-live field that is decremented by each router along the path. Why is the time-to-live field necessary?(5d) A Network Address Translator (NAT) has a binding timer associated with each map entry. Why is this necessary?(5e) Why does a TCP sender use a very large retransmission timeout (e.g., several seconds) to detect and retransmit a lost SYN packet?7QUESTION 6: Layering (15 points)(6a) Why do DNS queries and responses use UDP instead of TCP? Why do live audio and videotraffic typically use UDP?(6b) List three key differences between MAC and IP addresses.(6c) List three key reasons for a host to have both a domain name and an IP address.(6d) Why has Network Address Translation been so widely deployed, despite the intent that it was meant to provide temporary relief from IP address space exhaustion until IPv6 could be designed and deployed?(6e) Why does the Ethernet frame include a type field that indicates the network-layer protocol?8QUESTION 7: Randomization (15 points)(7a) When starting a new TCP connection, why do the sender and receiver each pick a random initial sequence number (ISN)? Why not start every TCP transfer with a sequence number of 0?(7b) Why does Random Early Detection (RED) selectively mark or drop some packets, even before the queue is full? Why is this done randomly, rather than deterministically? What are theimplications if the mark/drop probability is set too high? Too low? (7c) Why do Ethernet adaptors select a random back-off time before trying to transmit a frame following a collision? Why do they pick the random back-off time from a larger range after each


View Full Document

Princeton COS 461 - Midterm Exam

Documents in this Course
Links

Links

39 pages

Lecture

Lecture

76 pages

Switches

Switches

35 pages

Lecture

Lecture

42 pages

Links

Links

39 pages

Lecture

Lecture

34 pages

Topology

Topology

42 pages

Lecture

Lecture

42 pages

Overview

Overview

42 pages

Sockets

Sockets

45 pages

Load more
Download Midterm Exam
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Midterm Exam and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Midterm Exam 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?