Final Exam
Computer Networks
NCNU CSIE

Date: January 14th, 2009
Time: 15:10-18:00

A. True or False

  1. Suppose the PING command reports that the round-trip delay between Taipei and New York is 250ms, and the communication path is symmetric. If radio transmissions propagate at the speed of light, will it be possible that the ICMP request and reply were transmitted through a GEO satellite? 
  2. Consider the above question while assuming that your computer connects to the Internet via a broadcast satellite system, whose uplink is a landline optical fiber. Suppose in an optical fiber, data can be transmitted at 70% of the speed of light,. If the length of the optical fiber between Taipei and New York is 21,000km, and the altitude of the LEO satellite is 6000km, can we expect the round-trip time to be shorter than 110ms?
  3. Consider the following source code (/usr/src/usr.bin/cksum/sum2.c) which shows the algorithm to compute the cksum of a file on UNIX.

            uint32_t cksum;
            int nr;      
            u_char *p;
            u_char buf[8192];

            /*
             * Draft 8 POSIX 1003.2:
             *
             *   s = sum of all bytes
             *   r = s % 2^16 + (s % 2^32) / 2^16
             *   cksum = (r % 2^16) + r / 2^16
             */

            cksum = 0;

            while ((nr = read(fd, buf, sizeof(buf))) > 0)
                    for (p = buf; nr--; ++p)
                            cksum += *p;
            if (nr < 0)
                    return (1);

            cksum = (cksum & 0xffff) + (cksum >> 16);
            cksum = (cksum & 0xffff) + (cksum >> 16);



    Note that this algorithm compute the summation of every character as an 8-bit integer (instead of every pair of characters as a 16-bit integer shown in Figure 7.6 in the textbook).  Apply this algorithm to a file containing the following string

    P
    A
    S
    S
    \n
    50
    41
    53
    53
    0A

    Will the final checksum be 197?
  4. Broadcasting is extremely inefficient, because the packets will interrupt the CPU and ask the operating system to determine whether the frame should be ignored.
  5. Multicast does not solve the above problem, because CPU also needs to investigate all the frames received by the network interface card.
  6. IP is a reliable protocol which can be utilized by applications to transmit data to remote computers.
  7. Consider a network topology illustrated by the following weighted graph. If we run the distance-vector algorithm step by step, and build the routing table on each node, we shall see that the shortest distance from node 3 to node 4 would be 5.
    Figure 13.6 with weights
  8. Consider a TCP segment from the sender Alice. 
    If in its IP header,
  9. in its TCP header, We can predict that the sequence number of the next TCP segment should be 20323521.

B. Choose the right answer

  1. Which command can be used to show the intermediate routers along the path to a remote destination?
    1. ping
    2. showroute
    3. tracert
    4. ls
  2. For the "CNAIapi" provided in our textbook, how does the "recv()" function signify that end-of-file has been reached?
    1. By returning a NULL pointer.
    2. By calling the  recv_eof() function.
    3. By returning an integer value -1.
    4. By returning an integer value 0.
  3. Which organization defined the standard RS-232?
    1. ITU
    2. IEEE
    3. IETF
    4. EIA
  4. In RS-232, a start bit is represented by
    1. +15V
    2. +5V
    3. +3.3V
    4. 0V
  5. Consider the following figure which shows the wave that results from phase shift modulation (PSM).  Suppose a sine wave completes a cycle in 2Łk radians, what is the value of the shift indicated by the arrow?
    1. Łk/3
    2. Łk/2
    3. Łk
    4. 3Łk/4
      Phase Shift Modulation
  6. Which of the following media does not suffer from electromagnetic interference?
    1. Copper wire
    2. Glass fiber
    3. Radio
    4. Microwave
  7. What is the maximum length of an RS-232 cable?
    1. 10m
    2. 15m
    3. 50m
    4. 100m
  8. Which broadband technology uses multiple frequencies to achieve higher throughput?
    1. TDM
    2. FDM
    3. DWDM
    4. 1 and 2
    5. 2 and 3
  9. Suppose we have 10 nodes.  If we want to have point-to-point connections between every pair of nodes, what is the totaly number of connections?
    1. 10
    2. 9
    3. 45
    4. 55
  10. Which of the following is a LAN topology?
    1. Star
    2. Ring
    3. Bus
    4. All the above
  11. 1The Etherenet wiring scheme shown in the following figure is _________.
    1. 10Base2
    2. 10Base5
    3. 10BaseT
      10base2
  12. What is the length of an Ethernet address?
    1. 4 bytes
    2. 6 bytes
    3. 14 bytes
    4. 20 bytes
  13. NCNU has 34 class C networks.  Therefore, excluding the IP addresses which represent the network ID and the broadcast address, how many IP addresses can we assign to hosts?
    1. 8192
    2. 8704
    3. 8128
    4. 8636
  14. Before an ARP frame can be transmitted over the network, it must be encapsulated in a
    1. TCP header
    2. UDP header
    3. IP header
    4. Ethernet header
  15. Generally fragmentation will occur when datagrams pass networks
    1. From a WAN to a LAN
    2. From a LAN to a WAN
    3. From both directions
    4. None of the above
  16. The ICMP protocol is tranported over
    1. TCP
    2. IP
    3. UDP
    4. ARP
  17. What is the theoretically maximum size of an IP header?
    1. 20 bytes
    2. 40 bytes
    3. 60 bytes
    4. 80 bytes