The Red Planet Test

  1. The transmitter and receiver between Mars and Earth has been designed.  It gives a 1 Mb/second data transfer rate.  It generates 1 error per 100,000,000 packet, and accepts a maximum packets size of 1024 bytes.  Latency between Earth and Mars varies between about 10 and 28 minutes.  You need to conserve on the amount of code used for the networking protocol and the amount of memory used for networking buffers.  (Space is limited on board the ship you know.)  What data transfer protocol should you use?
    1. Ping Pong (automatic request repeat)
    2. Go Back N
    3. Selective repeat
  2. A different receiver and transmitted are to be used between the Mars orbiter and the Mars lander.  The raw bandwidth is 1megaBYTE per second each way, and the latency is 0.1 seconds each way.  The maximum packet size is 1 KB, and acks take just 1 byte.  The error rate is effectively zero.  The designer wants to use the ping pong protocol.  What effective throughput should he expect?




  3. Name one feature of IPv6, that if you use it causes the amount of data sent as IPv6 header to become larger.  __________________________________
  4. DNS uses UDP.  If there is a packet loss, DNS has a time out mechanism to compensate.  This requires extra code in DNS.  Why did the DNS designers not use TCP instead?  (Hint:  "They're dumb" is wrong.  There is a performance advantage, but what is it?)



  5. My goal is to have the words "Indent or die' appear on any error.  What type of error would *NOT* generate the words 'Cannot Breathe.  Need O2'?
    1. char bug[100]; 
      int sock = socket( ..... );
      int fd = accept(sock, .... ); 
      int ret = read(fd, buf, 100);
      if (ret == -1) {
           perror("Cannot breathe.  Need O2");
           exit(1);
      }
  6. Netscape has a setting under the menus Edit->Preferences->Advanced->Cache entitled "Document is cache is compared to document on network".  The choices are "Every time", "Once per session", and "Never".   For instance, if "every time" is checked then the cached document is compared to the servers version every time the document is displayed to the user.  If the documents differ, the new document is loaded.  What would be the most efficient way to implement this feature?
    1. Use a 'Head' command where possible
    2. Use a "Head" command with a 'Send-if-modified' if possible
    3. Use a "Get" command with a "If-Modified-Since" if possible
    4. Use a "Get" command with a "Send-date" or Send-Etag" modifier if possible
    5. None of these.   It's actually ________________________________
  7. Using Public Key Crypt I want to encrypt my Diary such that only I can read it.  How do I do that (who's key and which one do I use)?
    1. My public key
    2. My private key
    3. A trusted authority's public key
    4. A trusted authorities private key
    5. A trusted authorities public key, then my private key
    6. My private key, then a trusted authorities public key
    7. Mars dust would work better than these choices (none of the above)
  8. I want to send data across the space station.  The hardware can do 100 Mbits/second each way.  The error rate varies between 0 and 2% (depending on solar flares).  The latency is 0.7153 milliseconds one way.  I use selective repeat with a packet size of 4096 bytes and an 42 byte ack.  The window size is 714 packets.  I have plenty of CPU available to compute Checksums and such.  There are no other users of the network at this time.  About what (within 10%) should I expect my bandwidth to be? 




  9. TCP uses an estimate of the round trip time to set the time out value.  On what does it base this estimate?
    1. Test Pings
    2. A fixed constant per device type (2.3 ms for ethernet, for example)
    3. The routers tell the host as part of the route determination stage
    4. Ethernet does the time out and retransmit for TCP.  UDP doesn't care
    5. None of these stupid answers
  10. Spock has 3 piles of Mars sand.  Kirk has 4 piles of Mars sand.  If they put them together, how many piles do they have?  ______________
  11. You want to get the file "/index.html" from the server "www.mars.com".  You implement http version 1.1.  You also want all the metadata.  What command or commands would you send?
        Command#1: _________________________________________________________________
        Command#2: _________________________________________________________________
  12. You want everything to go right.  What return code do you hope for from the server?
    1. Something in the 100's
    2. Something in the 200's
    3. Something in the 300's
    4. Something in the 400's
    5. Something in the 500's
  13. When was the file "/" on the server www.mars.com last modified? _________________________________________
  14. _______ Consider Netscape (a web client) and Apache (a web server).  Both are written in C for UNIX.  Which of them very likely have a listen() system call? Pick ONE!

  15. Consider the program below.  What will it do when I run it?
    main() {
        while (12) {

           int ret = fork();
           if (ret == -1) { cout << "Venus stinks\n"; }
           else if (ret < 0) { exit(1); }
           else if (ret > 1) { 
                fork();
                exit(1);
                cout << "Venus is HOT!\n";

           }
           else { exit(1); }

         }
    }
  16. In real life many web servers do not use the accept()/fork() paradigm like your server.  Never the less these servers can handle multiple connections at once, and never hang waiting for data.  How do they avoid having read() on one socket wait forever even though there's data on some other socket ready to go?
  17. Suppose my computer is behind a router that stops all packets with the SYN bit set from coming to me.  In other words, no packet can arrive to me with the SYN bit set, but any packet I send can have the SYN bit set, and it will be transmitted successfully.  Can I run a web server?  ______ A web client. _________
  18. As a receiver I execute the code ret = read(sock, buf, 1000);  However, the sender only sends 28 bytes and then closes the socket and then exist.  What value will I get for 'ret'? ___________________________
  19. Using HTTP/1.1,  how can you tell what type the incoming file is?
    ______________________________________________________________________________
  20. You're using UDP to send data between two hosts on the same ethernet.  What could cause data to be lost between the sender and receiver?  (Choose as many as you like.)
    1. There is already data on the wire when the sender wants to send
    2. Someone else begins to transmit exactly as the sender begins to transmit
    3. Two hosts are both listening on the same UDP port at the same time
    4. The receiver is faster than the sender
    5. The router sends it on the wrong route.
    6. Mars has only one moon
  21. Rank these routing algorithms in order, from 'uses most memory per router' to 'uses least memory per router'.
          Djisktra's                                     Least
          Ford                                            Middle
          Hierarchical                                 Most
  22. Why is Mars red
    1. Warrior blood
    2. Iron Oxide
    3. Sulfur in the air
    4. It's not.  Venus is the red one.