CS244a An Introduction to Computer Networks The Stanford Honor

Document Sample
scope of work template
							                 Do not write in this box

               Grade: MC:_____ 3:_____ 4:_____ 5:_____ 6:_____ 7:_____                          /


Name:____________________________________                                                            CS244a
Student ID #:_______________________________                                                     Winter 2001
Campus/SITN-Local/SITN-Remote?____________                                                Professor McKeown


          CS244a: An Introduction to Computer Networks
                           Midterm: Thursday 15th February, 2001.

Duration: 1 hour.
                (i) This exam is closed book and closed notes.
                (ii) Show your reasoning clearly. If your reasoning is correct, but your final answer is
                      wrong, you will receive most of the credit. If you just show the answer without rea-
                      soning, and your answer is wrong, you may receive no points at all.
                (iii) Write your solution on this paper. If you need extra paper, use plain white paper and
                      make sure you staple it to your exam.

                                                                                      8
Assume that the speed of propagation of an electrical or optical signal is 2 × 10 m/s .

Important: There are a total of 13 pages. Make sure you securely attach any additional pages to your exam!




                              The Stanford Honor Code
In accordance with both the letter and spirit of the Honor Code, I didn't cheat on this exam.

Signature:________________________________________________________




                                                                                                    Page 1 of 13
                                                                                                   Handout #


Multiple Choice Questions.
           Instructions: in the following questions, check all listed assertions that appear to be
           correct. There is at least one correct assertion per question, but there may be more.
           Each correct assertion checked will earn you one point. For each incorrect assertion
           you check, you will lose one point. If you don’t know an answer, checking no assertion
           will neither earn you nor lose you any points.

1. TCP. Which of the following are true statements about TCP?:
        (a.) TCP is a routing protocol used throughout the Internet.
        (b.) TCP reliably delivers data between two end-points.
        (c.) TCP achieves high throughput by minimizing occupancy in router queues.
        (d.) TCP learns of congestion via packet loss.

2. Continuos time router model. A client is connected to a server via two routers, R1 and R2. The net-
work topology is limited to the path C-R1-R2-S. The server sends data to the client according to the contin-
uos time process D s(t) = t. Routers R1(t) and R2(t) are both able to serve their queues at rates S1(t) = S2(t)
= 2t. Which of the following statements are true:
        (a.) The queues in both routers fill at rate 2t - t = t, then overflow after 1 second.
        (b.) The queue in router R1 fills at rate 2t - t = t, then overflows after 1 second. The queue in router
              R2 does not overflow.
        (c.) The queues in both routers are empty and therefore never overflow.
        (d.) If the server sends data in packets of up to P bits long, and if the routers are, in fact, store-and-
              forward devices, then each router needs to buffer at least P bits to prevent overflows.




                                                                                                     Page 2 of 13
Longer Questions

3. (8 points) Client-Server. A client, C and a server, S are interconnected by a series of N store-and-for-
ward routers. Every link operates at B bits per second and has a propagation delay of T seconds. After
receiving each packet, it takes a router at least L seconds to process the packet before starting to transmit it
again. All packets are P bits long.

Write down an expression for the time taken from which the first bit of the first packet leaves the server
until the last bit of the 10th packet reaches the client. Assume there is no gap between packets sent by the
server.




                                                                                                   Page 3 of 13
4. (16 points) Routing Tables. In this question, we will use both the Bellman-Ford and Dijkstra's algo-
rithms to determine the routing tables for the routers. Please consider the network as shown in the figure
below:

                                      5

                      2                                    3

                                               7
                              19
                                                       4
           3                                                     5
                                           1
                          6   2

                                                   8
                                      5                                         7

               4                                                     5                       6




        (a.) The Bellman-Ford Algorithm. Assume that each router starts with a cost of infinity to reach
             any other router. Use a sequence of tables (one table for each time the routers exchange their
             routing tables), to show how each router learns the next-hop and cost to reach router 6.




                                                                                                 Page 4 of 13
(This page is intentionally left empty for you to write the answer for the previous question)




                                                                                         Page 5 of 13
(b.) Dijkstra's Algorithm. Assuming that the link state information has been correctly received by
     all routers, show how the router 6 determines the lowest cost path to reach all the other routers
     in the network. At each stage, be sure to show the candidate set, the shortest path set and the
     cost of each path in the tree.




                                                                                          Page 6 of 13
5. (16 points) Queueing in Buffers. A router has two inputs (L1 and L2) and one output link (L3). The
link L1 operates at rate R bits/second. Input link L2 operates at the rate of 2R bits/second. All of the pack-
ets on L1 are high priority packets, while all the packets on L2 are low priority packets. The router always
gives preference to high priority packets by moving them ahead in the queue of all low priority packets.
The output link (L3) operates at the rate of 1.5*R bits/second.

The router is a store-and-forward device and the arrival processes are "bursty" over both the input links.
More precisely, on both links P packets arrive in every burst and each packet is of length N bits. There is an
inter-burst gap of I 1 seconds on link L1 and an inter-burst gap of I 2 seconds on link L2 (gap between the
end of one burst and start of the next). Bursts always start at the same time on both links.

Write down equations for:

        (a.) The minimum value of I 1 , Imin , so that the router’s buffer does not grow without bound.




                                                                                                  Page 7 of 13
(b.) When I 1 = Imin , the minimum length of the router’s buffer (in bits) so that no packets are
     dropped.




                                                                                        Page 8 of 13
(c.) The expected delay (in seconds) for packets that arrived over link L1, (Hint: because of the pri-
      oritization of packets, think about how packets arriving over link L1 are affected by packets
      arriving over link L2).




(d.) The time average number of bits in the router’s queue that arrived over link L1.




                                                                                          Page 9 of 13
6. (8 points) Transmission over links.

Suppose host A wants to send a packet to host B on the same network.

        (a.) In addition to knowing host B’s IP address, what other information does host A need to know
              about host B?




        (b.) How does host A find the information it needs in part (a)?




7. (16 points) (Virtual cut-through routing). Routers in the Internet are store-and-forward devices. A
store-and-forward router makes a forwarding decision only after it receives the entire packet (header and
data). A virtual cut-through router, however, makes a forwarding decision as soon as the packet header is
received completely. If the outgoing link is empty, the packet begins outward transmission immediately.
Virtual cut-through routing thus cuts down on the minimum delay of a packet at a router. It is illustrated in
the following time-space diagram:

                    A                            Router                              B

                             HE A D E
                                        R

                              DATA
                                                                 HE AD E
                                                                           R

                                                                 DATA




                                                                                                Page 10 of 13
(a.) Consider end-hosts, A and B connected in series by 10 links and 9 virtual cut-through routers.
     Each link operates at 10 Mbps and has a propagation delay of 4 microseconds. A sends 9000
     bits of data to B. Each packet is of fixed size and carries 100 bits of header information and
     900 bits of data. Find the total transmission time for all the 9000 bits of data from A to B and
     the effective data rate (in Mbps) attained during the transfer.




                                                                                        Page 11 of 13
(b.) Calculate the buffer occupancy (in bits) needed in the intermediate routers to prevent overflow
     during the course of the transmission.




                                                                                       Page 12 of 13
(This page is the last page and is intentionally left empty)




                                                               Page 13 of 13