CS337
Midterm exam
Due on paper, 8:30 AM Wednesday, 2/13/02

This is an exam. You may use the Internet, your textbook, your notes, your assignments, and your brain, but you may not consult people other than Jeff Ondich.

  1. Suppose you computed CRCs using the polynomial C(x) = x^2 + x. Give an example of an error that C(x) won't catch. The shorter the example, the better.

  2. Suppose a particular Ethernet is configured so that stations whose transmissions collide will try to retransmit four more times, using exponential backoff, before giving up and discarding the frame. Suppose that stations A and B are the only ones trying to transmit, and their transmissions collide. What is the probability that they will both end up discarding their frames? (Note that real Ethernet stations typically try to retransmit sixteen times before giving up.)

  3. Just as you used the UNIX telnet program as a client to communicate with gopher servers, you can use telnet to communicate with HTTP servers.

    You may find it profitable to look at sections 5.1.2, 9.3, and 9.4 of RFC 2616.

  4. Has anyone ever implemented the protocol described in RFC 1149. (Hint: yes.) Who did it, where, and when? Did the people who implemented RFC 1149 also implement the extension described in RFC 2549?

  5. When a server is preparing to accept connections, it typically calls the library functions bind, listen, and accept. Why are these three functions separate? Describe conditions under which you might call one or two of them but not the third.

  6. When you are using a sliding windows protocol, you can choose to have the receiver's window size be 1 or greater than 1. Under what conditions would you prefer a receiving window size of 1? Under what conditions would you prefer a larger receiving window size?

  7. Write a Daytime server (see RFC 867). Instead of port 13, have your server listen on whatever port is specified on the command line when the server is launched. Include a hard copy of your server with your exam, and also submit your code via HSP. You do not need to submit tcpUtilities.cpp or .h.