CS522 F2003 Midterm Exam

Enter your CS Unix machine login and the first, middle, last initials followed by the last 4 digits of student ID as password (those without middle name, just use first and last initials followed by the last 4 digits of student ID as password) and submit the midterm before 11:59pm 11/15/2003.   You can work at home or at PC lab where you can access it through a web browser.  For multiple-choice questions, you must choose either yes or no for each answer.

After filled in the answers in the text areas and selected the answers, please print a copy of the web page with your answers before you hit the submit button. Note that "save file" menuitem does not save the data you enter. It only saves the HTML source file. Submit your answers by pressing the submit button at the end of this web page.  You will get a confirm web page with all your answers. Save or print  the answer confirmation web page for your record. If you have problem getting the confirm web page or submitting midterm answers using the web page, just email me the answers.

Your name:
Your login on CS UNIX machines:
Your password on CS UNIX machines:
Work/Home Phone number (option):


  1. Introduction, OSI Reference, Network Services/Applications
    1. OSI seven layer model
      1. Transport layer establishes communication between  individual process to individual process communication on different machines and exchanges segment data between processes.  Yes No
      2. SSL is a session layer protocol which runs on top of UDP and it decides what encryption method to use.
        Yes No
      3. Network layer deals with routing/relaying the packets from one machine to the other machine in the Internet .
        Yes No
      4. Data Link layer deals with establishing connection among machines directed connected on a channel and exchanges frame data between neighboring machines.. Yes No
    2. PDU encapsulation/decapsulation and Internet message formats
      How does the IP layer protocol entity know the payload of an IP packetshould be delivered to TCP or UDP transport  protocol entity in its upper layer?
      1. From the type field in the Ethernet  header Yes No
      2. From the MAC address in the IP header Yes No
      3. From the Protocol field in the TCP header Yes No
      4. From the Frame Type field in the IP header Yes No
      5. From the Protocol field in the application layer header Yes No
      6. What entity puts that information in? Where it gets the information to use TCP or UDP?

    3. Network  address and their format
      1. In IP protocol version 6, IP address contains six bytes. Yes No
      2. The DHCP server in a local subnet dynamically assigns one address from a pool of IP addresses to a host when the host connects to the subnet and also provide the domain name and gateway information . The advantage is that the host does not have to manually configure those parameter.  Yes No.
      3. Can a web server be setup without using a new IP address?  Yes No
      4. The IP packet content sent by a machine will not be changed by the intermediate router.  Yes No
      5. For the site using Internet Sharing (at home) or firewall using Network Address Translation, what fields in the IP header got changed?

    4. Domain Name System (DNS)
      1. The "whois ucccs.edu" result shows the two name servers answers DNS query on uccs.edu.
        Whois Server Version 1.3

        Domain names in the .com and .net domains can now be registered
        with many different competing registrars. Go to http://www.internic.net
        for detailed information.

        Domain Name: UCCS.EDU
        Registrar: EDUCAUSE
        Whois Server: whois.educause.net
        Referral URL: http://www.educause.edu/edudomain
        Name Server: CCNUCCS.UCCS.EDU
        Name Server: NS.UTAH.EDU
        Status: ACTIVE
        Updated Date: 25-jun-2003
        Creation Date: 24-jun-1991
        Expiration Date: 24-jun-2004


        It indicates we have CCNUCCS.UCCS.EDU and NS.UTAH.EDU are the two DNS server that will answer the DNS query for uccs.edu domain. What is the advantages of having a name server not on the same location?

      2. Caching DNS entries. After  changing a machine to a new IP address, other name servers in Internet may still have old entries in their cache and will answer name query with the old IP address. The reason for caching DNS entries is performance.  Yes No
      3. To query NS.UTAH.EDU name server on cs.uccs.edu's IP address, what command will you use?
    5. Basic End Host Routing
      On blanca, netstat -rn and /sbin/ifconfig eth0 yield the following result:
      blanca.uccs.edu> netstat -rn
      Kernel IP routing table
      Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
      128.198.160.0   0.0.0.0         255.255.224.0   U         0 0          0 eth0
      169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
      127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
      0.0.0.0         128.198.160.1   0.0.0.0         UG        0 0          0 eth0
      blanca.uccs.edu> ifconfig eth0
      ifconfig: Command not found.
      blanca.uccs.edu> /sbin/ifconfig eth0
      eth0      Link encap:Ethernet  HWaddr 00:B0:D0:D1:13:5C
                inet addr:128.198.162.60  Bcast:128.198.191.255  Mask:255.255.224.0
      
      1. Blanca's Ethernet card  accepts an Ethernet frame with the destination MAC (Medium Access Control) address equal to 00:B0:D0:D1:13:5C.  Yes No
      2. Blanca will accept a packet with destination IP address = 128.198.191.255. (Hint: look at the bit pattern of IP address) Yes No
      3. What protocol is used by a machine to find out the MAC address of another machine in the same subnet? 
      4. A web server can run on port 443. Yes No
      5. Only root user can runs servers with port numbers smaller than 1023. Yes No
    6. IP Address and Routing.
      Given the following routing table and network interface information on lvs.csnet.uccs.edu.
      
      [root@lvs root]# netstat -rn
      Kernel IP routing table
      Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
      128.198.61.0    0.0.0.0         255.255.255.192 U         0 0          0 eth0
      192.168.5.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
      169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
      127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
      0.0.0.0         128.198.61.1    0.0.0.0         UG        0 0          0 eth0
      [root@lvs root]# ifconfig eth0
      eth0      Link encap:Ethernet  HWaddr 00:0C:29:A4:5E:9D
                inet addr:128.198.61.60  Bcast:128.198.61.63  Mask:255.255.255.192
      [root@lvs root]# ifconfig eth1
      eth1      Link encap:Ethernet  HWaddr 00:0C:29:A4:5E:A7
                inet addr:192.168.5.1  Bcast:192.168.5.255  Mask:255.255.255.0
      
      1. From the second entry of the routing table, we have destination IP address 192.168.5.0 and genmask (or called netmask) 255.255.255.0 that identifies a subnet which lvs is in.
        a. What is the equivalent Classless IP address (CIDR) notation for this subnet?

        b. How many IP addresses can be assigned to machines in this subnet (Here lvs is served as a router for , 192.168.5.0 subnet)?
      2. A packet with 128.198.61.120 destination IP address arrives at lvs.csnet.uccs.edu. Where it will be routed to? Identify the network interface on lvs and the machine that will receive the frame sent by lvs for the packet.

  2. Protocol Engineering-specification, verification
    1. Alternating Bit Protocol
      1. Give a simple scenario where multiple A0 messages will be sent by the receiver?
    2. Reachability Analysis. For the following two machines,

      1. What is the buffer size of C1?
      2. Is there a deadlock? Yes No
      3. Is there an unspecified reception? Yes No
      4. Is there non-executable state? Yes No
      5. Is there non-exeutable transition? Yes No
      6. How many global states generated?
  3. Protocol Programming/Implementation
    1. Internet Domain Socket page 5.
      1. Internet Domain Socket can be used to send messages to processes on the same machine. Yes No
      2. The 5th parameter in recvfrom() provides information about the sender's port number. Yes No
    2. Stream vs. Datagram
      1. The Stream socket does not deliver message boundary.  It is possible to read the content of three packets sent by the sender  in single read() or recv() function call if we specifies a buffer size bigger than that of two or three messages sent. If the message size is fixed, then we can set the buffer size to the message size and read one message one at a time.. Yes No
      2. By default, stream connection uses TCP and guarantees packets to be delivered in sequence without loss.. 
        Yes No
      3. The two subsequent packets reads from a datagram socket can be from different senders. Yes No
    3. Forking or not?

    4. Given that creating a child process using fork() takes 1 milliseconds,
      1. From system throughput point of view, is it a good choice for services, that require retrieving data from another Database server, to use fork() and child process to serve the requests?  Yes No
      2. Servers do simple table lookup for return data (to be done in 10 microseconds) should not create child processes using fork() to serve the requests. Yes No
    5. Select() page 20.
      1. Select() allows a programmer to implement different timeout periods and to specify different input channels to listen at different situations. Yes No
      2. After return from the select() call, the value of the 2nd parameter (readfdset) may be changed.  Yes No
  4. Transmission Fundamental
    1. How much data will be generated with 8000 sampling rate and 8 bits per sample in one minute in a typical telephone channel?

    2. Given the following signal constellation diagram (16 signal set) and their bit pattern assignments.

      1. If the modem is sending signals at the rate of 9600 baud, what is the bit rate this modem can achieve?

      2. If the sending modem receives a byte with 10100101 bit pattern from the sending computer, what are analog signals that will be generated by the sending modem?

      3. If the receiving modem receives two analog signal: one with amplitude of A and phase angle of 3/4pi followed by a signal of amplitude of A and phase angle of 3/4pi, what bit patterns should it sends to the receiving computer?

If you feel some of the questions are ambiguous, state the problem # and your assumptions on the answers.