CS 105 Final Examination
Sunday, December 20, 1998
NAME:
Question Points Score 1 5
2 6
3 5
4 16
5 10
6 10
7 12
8 8
9 10
10 8
11 10
TOTAL 100
There are 11 questions on this examination. The point values associated with the questions are shown in the table above. You have 150 minutes to complete the examination. You should not consult any references while completing this examination. Show all answers in the spaces provided in the examination booklet. Paper for scrap work will be made available.
For each layout, indicate whether it would be a possible topology for a token ring based network, an Ethernet or both.
<FORM ACTION="http://www.cs.williams.edu/cgi-bin/select-year"> Please indicate your year: <UL> <INPUT TYPE=RADIO NAME=YEAR VALUE=senior > 99 </INPUT> <INPUT TYPE=RADIO NAME=YEAR VALUE=junior > 00 </INPUT> <INPUT TYPE=RADIO NAME=YEAR VALUE=sophomore > 01 </INPUT> <INPUT TYPE=RADIO NAME=YEAR VALUE=frosh > 02 </INPUT> </LI> <INPUT TYPE=SUBMIT> </FORM>
<TABLE> <TH>Season</TH><TH>Tourists</TH> <TR> <TD><FONT COLOR=00FF00><EM>Fall </FONT></EM> </TD> <TD> Peepers </TD> </TR> <TR> <TD><FONT COLOR=0000FF><EM>Spring </FONT></EM> </TD> <TD> Prospectives </TD> </TR> <TR> <TD><FONT COLOR=FF0000><EM>Summer </FONT></EM> </TD> <TD> Theater </TD> </TR> <TR> <TD><FONT COLOR=FFFFFF><EM>Winter </FONT></EM> </TD> <TD> Skiers </TD> </TR> </TABLE>
So that you don't get a bad impression of routers, I should have pointed out that routers can also play an important role in ensuring security and privacy for network users. The administrators of a router (e.g. the staff in Jesup) can configure a router to be rather picky about which messages it will forward. For example, a router might be told not to forward any message to or from a particular machine on a network that stores sensitive information (e.g. the campus router might be told not to forward messages to or from the machine holding student academic records) to protect that machines from unauthorized attempts to access the data it holds. When used in this way the router is called a packet filter or "Firewall."
While a router functioning as a firewall could look at any part of an IP packet passing through, to keep things simple most such routers limit the information they use to decide whether each packet gets routed in the normal manner or discarded as a "violation." In particular, it is typical to only look at standard fields from the headers of the packets processed including:
| - IP source and destination addresses | - packet length |
| - TCP source and destination port numbers | - TCP sequence numbers |
Assuming only these fields can be used to decide how to handle a packet, indicate whether it would be possible to enforce each of the following access restrictions using a firewall. In each case, the firewall should enforce no more than the given restriction. Otherwise, the problem would be trivial (you could enforce any restriction by discarding all packets).
If you think the restriction is enforceable, indicate which packet header fields the firewall would have to check. If not, BRIEFLY indicate why.
To clarify the issue of trust, I'd like you to indicate which of the following things we must "trust" the certifying authority to do if we want to be sure we can communicate privately with anyone who has registered with a certifying authority we "trust."
Recall that when an individual or organization registers with a certifying authority it provides the certifying authority with "personal information" establishing its identity and it public encryption key.
Answer "yes" or "no" to each question below. You may provide a brief explanation.
Must you trust the certifying authority to:
import java.awt.*;
import javaTools.*;
public class Pong extends AppletTemplate {
double x,y,xspeed,yspeed;
int paddleX;
public void begin() {
x = 100;
y = 5;
xspeed =2.5;
yspeed =4;
paddleX = 100;
}
public void mouseMove(int x, int y) {
paddleX = x;
}
public void mouseDown() {
y = 5;
yspeed = 4;
}
public void animate() {
pen.clearRect();
x = x + xspeed;
y = y + yspeed;
if (x > 200 ) { xspeed = - xspeed; }
if ( x < 0) { xspeed = - xspeed ; }
if (y < 0 ) { yspeed = -yspeed; }
if (y > 195) {
if (x > paddleX-10 && x < paddleX+10 ) {
yspeed = - yspeed;
} else {
y = 250;
yspeed = 0;
}
}
pen.fillOval(x,y,6,6);
pen.frameRect(paddleX-10,195,20,5);
}
}
if (y < 0 ) { yspeed = -yspeed; }
were deleted from the animate method.
Be brief but precise in your description.
pen.frameRect(x-10,195,20,5);
0 1 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 1 0 0 1 1 1 0 1
In yet another homework problem, you considered the possibility of using sequence numbers that are only one bit long. In that assignment, you showed that it was not safe to have two packets outstanding at the same time if such a small range of sequence numbers is used. It turns out that it is a safe to communicate using only one bit sequence numbers if you never send the next message until the previous message has been acknowledged. This technique is called the "stop and wait" protocol and has actually been employed in widely used network software (have you ever heard of a file transfer program called "Kermit"). The "wait" part of this protocol refers to the fact that a computer has to wait until one message is acknowledged before sending the next message. This waiting reduces efficiency.
So, assume that S is the size of the messages begin sent, R the transmission rate (in bits per second, so S/R is the time required to transmit a message), A is the size of an acknowledgement in bits, and finally that T is the time it takes a message or acknowledgement to travel from the sender to the destination (or back again). Using these symbols, write a formula for the maximum efficiency with which messages can be sent from the sender to the receiver. Recall that we defined the efficiency as the time required to actually send the bits of a message divided by the total time devoted to the transmission of the message. In this case the total time will be the time from the beginning of the transmission of one message to the beginning of the transmission of the next message.
In your work, assume that no messages or acknowledgements actually ever get lost.