SI 540: Fall 1999

HW 9

due December 6
(note that HW10 will also be due on December 6)

Last modified 11/29/99 --PR
Class home page

You can do this assignment in pairs, but not in groups larger than two.


For November 29:

Chapter 13; supplement to chapter 19 on network security

I also strongly encourage you, before class on Nov. 29, to do the get-acquainted with PGP exercise below to give you a more concrete sense of how encryption works. Next week there will be a graded exercise using PGP.

PGP Intro Exercise (ungraded)

(I strongly recommend that you do this exercise with a partner, even if you don't do the rest of the assignment with a partner. There's lots of opportunity to get frustrated over small syntactic problems, as well as conceptual problems, and a partner can help you get through the roadblocks.)

The official version of PGP (Pretty Good Privacy) for this exercise is v2.6.2. You may use any version you like as long as the keys and cryptographic operations are compatible with v2.6.2. There are significant compatibility problems between v2.6.2 and version 5, including the use of different cryptographic algorithms (and hence different keys).

PGP v2.6.2 is available on both and in the path /usr/um/bin/pgp. If you use these, you will not need to worry about installing PGP.

User documentation on PGP:


Create your own key pair

You'll first need to create a subdirectory .pgp in your home directory.

Now create your pgp keys:


Experiment with encrypting and decrypting messages

Try sending and receiving encrypted messages with your partner

Hint: at the end of the first volume of documentation, there's a PGP Quick Reference.

Text exericses

(1 point) Create an "is a" hierarchy and a "part of" hierarchy for a teaching hospital (a hospital where doctors are trained: for example, interns and residents are young doctors who have completed medical school but who are still being supervised by other more experienced doctors). You may want to use a single diagram with two different colors of arrows, one to indicate inheritance between classes (is a) and one to indicate that an instance of one class is a part of an instance of another class. You may find it easier to do this on paper, by hand, than with a computer program. You don't need to be complete about all the parts and occupations of a hospital. Just demonstrate that you understand the distinction between is-a and part-of and that the same item can be in both is-a and part-of relations with other items.

(1 point) How long would phone numbers have to be (how many digits) in order to accomodate as many different devices as can be identified with 32-bit IPv4 addresses? How about 128-bit IPv6 addresses? (Hint: 210 is approximately 1000 = 103).

(3 points) Why are network functions layered the way they are?

Think of TCP as a "higher" layer than IP, meaning that an application that requests network services might request a TCP service, which might call on IP-layer services in order to fulfill the TCP request, but the implementation of the IP layer service would never result in a TCP request. Forget for a moment about actual network protocols you may know about (such as TCP and IP), though you may use them as an inspiration for answering the following question.

Suppose that we were designing a set of network layers, such that at each layer one and only "function" was provided. You may assume that the lowest layer is a best-effort delivery of a message (with maximum size 64K) from one host to another over a direct connection (e.g., a wire).

Consider the following functions that might be provided at higher layers and order them from highest to lowest in terms of what layer you would like to see them. For each adjacent pair of layers, argue for why you put one higher than the next.
A. Compression and decompression
B. Packet fragmentation and reassembly
C. Multi-hop routing
D. Reliable delivery through resends

[If, for example, you had compression and reliable delivery as adjacent layers, here's an argument you might use to justify the order. "Compression should be at a higher layer than reliable delivery. If reliable delivery were at a higher layer, then, as part of the resend process, the sender would have to run the compression algorithm on it again, which would be unnecessary duplication of effort." Note, however, that you only need to justify orderings for layers that you claim should be adjacent (i.e., no other layers in between them).]

Lab Exercises

(1 point) Fetching Web Pages by hand

 Log on to a UNIX machine (e.g.,
It turns out with the newer HTTP/1.1 protocol, a web browser needs to send a Host: header. This allows the protocol to work better with "proxy" servers that do caching of pages from other servers. Here are the commands you need to enter to fetch the SI home page by hand.

Type: telnet 80 (hit return)
        (Note: this makes a telnet connection on port 80 to the host
Type: GET / HTTP/1.1 (hit enter)
       (Note: you won't see a login: prompt because you're not using the usual telnet port, 23, and hence your data is not being passed to the login shell application on the server. Just start  typing.)
Type: Host: (hit enter again)
(hit enter a third time) 

Question: give similar instructions for fetching the URL

(2 points) Internet Names, Address, and Routing

HINTS: you may find the following UNIX commands useful in answering these questions:

Some of these commands are also available on the DOS command-line, though there may be slight variations. For example, traceroute in UNIX is tracert in DOS.

A. What are the IP addresses for the hostname
B. What are the IP addresses for the hostname
C. What are the IP addresses for and
D. If a hostname (e.g., is in a subdomain of another hostname (e.g.,, is it always the case that the first three parts of the IP address will be the same (Hint: check out
E. What's the complete path that data follows to (hint: use traceroute)? The path need not be stable, so don't be alarmed if your result is different from your classmates. Which link in that path seems to cause the biggest delay? Can you make any educated guesses about which hosts might be part of "NAPs" (the places where backbone providers pass traffic to each other)?

Explanation exercise (2)

Explain (to someone) the difference between domain names and IP addresses. If the person you're talking with is interested, try to explore why both are needed: what if there were no IP addresses and domain names were used in routing? what if there were no domain names and IP addresses were used in URLs?