CS414, Fall 2005 Homework 8 Posted 11/2/05 There may be a pop-quiz on these homework questions during class on Nov. 8. (Note that the 2nd prelim is Nov 10). You may work together on these homework questions. However, I strongly advise you to try to solve them yourself first, then check your answers with your fellow students. 1. For each of the following applications, indicate whether you would use UDP or TCP, and explain why. Where you think multiple answers are possible, state your assumptions: 1a. Non-live video stream from a web-site. 1b. A very small web page (less than 500 bytes). 1c. A very large web page (several hundred kbytes or more). 1d. A voice over IP live conversation. 1e. "Ping" packets (to announce keep-alive information). 2. TCP sends positive acknowledgements of received packets. Given that most packets arrive successfully, wouldn't it make more sense for TCP to send "negative acks" (that is, indicate which packets weren't received)? Considering the size of the sender's buffer, what is the problem with a NAK-based scheme? 3. TCP can perform poorly if there is a long end-to-end latency, and there are many losses in the network (say, 5%). If most of the losses happen at a certain link, and that link has a small latency, then performance gains can be had by implementing a retransmission scheme at the link layer. Would doing this violate the end-to-end principle? Why or why not? 4. Is the following statement true or false? Why or why not? "TCP is reliable, therefore no application-level acknoledgements are needed." 5. In IP, packets may be fragmented at an intermediate router, but are re-assembled only at the receiving end host. Why aren't packets re-assembled at the router adjacent to the fragmenting router? 6. Given that IP has fragmentation, why not just send very large packets at the sending host and let the network fragment them? 7. When DNS was originally designed, it was assumed that TTL (the cache lifetime) values would be on the order of many hours or even a few days. Later, companies like Akamai started setting the TTL values to very low values---a couple minutes or even less. (This is true only for the lowest level answers. In other words, for a DNS query on host10.akamai.com, the NS record for akamai.com would still have a high TTL, but the A record for host10.akamai.com would have a low TTL). At the time when this happened, some people thought that this would overload the DNS system. Considering the structure of DNS (hierarchy of servers, local DNS resolvers), do these small TTLs overload DNS? Why or why not? 8. Assume a private network (i.e. like Cornell's) that is attached to the Internet via two NAT boxes. Assume that most of the time, 1/2 of the hosts in the private network use one of the NAT boxes (N1), and the other half of the hosts use the other NAT box (N2). Assume that a given host H1 usually uses NAT box N1, and has an active TCP connection to the Internet using NAT box N1. Now, assume that the failure of a router in the private network causes host H1's packets to be routed out through NAT box N2. What happens to the connection already established? 9. In TCP slow start, at first the sending host will double the number of packets it sends every time it receives all acknowledgements for the previous packets it sent. In other words, the sending host will send one packet, receive the ACK for that packet, send two packets, receive the ACKs for those packets, send four packets, and so on. This exponential growth continues until there is a packet loss. (Subsequent to this loss, the sending host will increase the number of packets linearly, not exponentially.) Assume that a host H1 has two connections, one to a host HL on the same LAN, and one to a host HW thousands of miles away. Assume that the one-way latency to host HL is 1 micro-second, and the one-way latency to host HW is 50ms. Assuming no packet losses, and assuming near- infinite bandwidth and processing speeds at all hosts, how long does it take to send the first 1023 packets to each host?