Homework 2

CS640, Fall 2014

Due: Sunday, November 23, 2014 at 11:59pm

Put all answers in a single PDF, and submit the PDF to the Homework 2 dropbox on Learn @ UW. You should do the homework on your own, not in a group.


1) DNS

The Domain Name System (DNS) is a distributed architecture that uses hierarchical delegation. At the top of the system are the root name servers, who know which DNS server is responsible for each of the top-level domains (e.g., com, net, and edu). If you send a root server a query for a particular machine, you will receive a reply listing the servers that have been delegated authority for those top-level domains, and you can recursively ask those servers to resolve the name.

You can use the dig program (available on most Linux machines) to issue such queries to DNS servers. When running dig for this question, you should use the following format:

dig +norecurse @name.of.dns.server record-type domain-name

To discover an actual chain of delegation, run a series of NS queries for a domain name. You may start with any of the root servers (a.root-servers.net, b.root-servers.net, …, m.root-servers.net), and you should continue your sequence of queries until you stop getting new delegations (in some domains, this is indicated by a DNS server returning you a delegation pointing to itself, and in other domains this is indicated by a DNS server returning you a SOA record instead).

Here is an example delegation chain for

Server queried                NS delegations to

a.root-servers.net         a.gtld-servers.net, b.gtld-servers.net,

                                c.gtld-servers.net, ..., m.gtld-servers.net

b.gtld-servers.net         dns-01.ns.aol.com, dns-02.ns.aol.com,

dns-06.ns.aol.com, dns-07.ns.aol.com

dns-02.ns.aol.com         dns-01.ns.aol.com, dns-02.ns.aol.com,

dns-06.ns.aol.com, dns-07.ns.aol.com

This was produced by running the following commands:

dig +norecurse @a.root-servers.net NS aol.com

dig +norecurse @a.gtld-servers.net NS aol.com

dig +norecurse @dns-02.ns.aol.com NS aol.com

  1. Generate the delegation chain for www.cs.wisc.edu. Present your results in a table like the one above. Each NS query will typically return two or more answers; choose among them at random. If you query a server and get a timeout, choose an alternate server.
  2. Generate the delegation chain for www.cs.mit.edu. If you receive a CNAME record, perform queries for the domain name specified in the record, starting with the DNS server for the top-level domain (which you should already know from earlier queries).


For this part you will be using the following website http://www.webpagetest.org/

Enter the URL and click the “Start Test” button. This will generate a Waterfall view of the HTTP requests. By clicking on the request you can see the  HTTP request message, HTTP response message and some other details.You will be using these to answer the following question.

  1. URL : www.livedoor.com
  1. How many HTTP requests were made?
  2. What were the locations (origins) for all the requests?
  3. What is the Last-Modified date for the first second response?

      b)  URLs: m.facebook.com, www.facebook.com .

  1. How many HTTP requests were made for each?
  2. Is there any difference in the number of HTTP requests? If yes, Can you explain why?

      c) URL: https://github.com/mininet/mininet/wiki/Introduction-to-Mininet

  1. How many HTTP requests needed a DNS lookup?
  2. Which request had the longest Content Download time?
  3. How many bytes were downloaded & uploaded for the 2nd, 4th and 6th request?

3) CDNs

The New York Times uses the Akami content distribution networks (CDNs) to serve the cascading style sheets (CSS), JavaScript, and images for their webpages. When you visit http://www.nytimes.com, your browser must perform DNS lookups for www.nytimes.com and the domain names associated with the static content—a1.nyt.com and static01.nyt.com.

  1. Run dig from a machine in the CS department to determine the IP address, and CNAMEs if any, for www.nytimes.com, a1.nyt.com, and static01.nyt.com. You can simply run dig as follows to get this information:
      dig domain-name
    You do not need to include the norecurse, DNS server, or record type arguments.
  2. Which of the domain names resolve to a CDN node? How do you know this?
  3. Use the website http://www.digwebinterface.com to perform the same lookups using other DNS resolvers (other than the CS department DNS server). Specifically, perform the lookups using the AT&T, Google, and Level3 resolvers. Are any of the CNAMEs different? Are any of the IP addresses different? Why?

4) Mobile IP

When a mobile node moves to a foreign network, all traffic destined for the mobile node must still be routed through the home agent.

  1. What performance problem does this introduce?
  2. Suppose we could add some extra features to the correspondent node (i.e., remote server).  How could we change mobile IP, using extra capabilities at the correspondent node, to address this inefficiency?

5) TCP

  1. When closing a TCP connection, why is the two-segment-lifetime timeout not necessary on the transition from LAST_ACK to CLOSED?
  2. Explain why TIME_WAIT is a somewhat more serious problem if the server initiates the close than if the client does? Describe a situation in which this might reasonably happen?
  3. Show a packet exchange timeline (of the form illustrated below) for the case where a client initiates an HTTP connection with a server. The client sends a simple GET request that is 100B long including headers. The server responds with a 3000B long response, including headers. Assume maximum TCP segment size is 1500B. Assume that the initial sequence numbers picked by the client and server are 1001 and 3501, respectively.