Beruflich Dokumente
Kultur Dokumente
CS244a Midterm
February 20, 2007
Student ID #:_______________________________
Professor Nick McKeown
Campus/SITN-Local/SITN-Remote?____________
_______________________________________________________________________
Grade: S MC:___ 11:____ 12:___ 13:___ 14:____ 15: _____ 16: _____ 17:____ Total:
xkcd.com
Page 1 of 8
Name:____________________________________
CS244a Midterm
February 20, 2007
Student ID #:_______________________________
Professor Nick McKeown
Campus/SITN-Local/SITN-Remote?____________
_______________________________________________________________________
3. General. What is the bandwidth delay product (in bits) of a network that
contains 5,000km of optical fiber operating at 2.5Gb/s, and three routers (each
with a fixed processing delay of 100s)?
(a.)
(b.)
(c.)
(d.)
(e.)
750,000 bits
62,500,000 bits
63,250,000 bits
625,000 bits
We need to know how wide the network is to determine how many bits will fit in the
pipe.
4. Address lookup. Which of the following are true statements about how routers lookup
IPv4 addresses in their forwarding tables
(a.) They can use regular hashing algorithms to perform lookups of address prefixes.
(b.) Binary search trees and tries are different names for the same algorithms and data
structures.
(c.) TCAMs (ternary CAMs) are commonly used because they are well suited to
longest-prefix match lookups.
(d.) TCAMs are commonly used for address lookups because they require less space,
less power and cost less per bit of storage than SRAM.
Page 2 of 8
Name:____________________________________
CS244a Midterm
February 20, 2007
Student ID #:_______________________________
Professor Nick McKeown
Campus/SITN-Local/SITN-Remote?____________
_______________________________________________________________________
5. Packet switching (from textbook). Which of the following are true about the design of
packet switches (e.g. routers):
(a.) Packet switches always place arriving packets directly and immediately into a
queue at the output port.
(b.) Input queues are commonly used for high speed routers because they can
run slower than the equivalent output queue.
(c.) Routers always have a fast internal shared data bus that all the input and output
ports connect to, so as to transfer packets between them.
(d.) A router that does virtual cut-through (instead of store and forward), does not
need packet buffers.
6. TCP. Which of the following are true statements about TCP:
(a.) A sources retransmission timeout value (RTO) is always set equal to the mostrecently measured RTT.
(b.) Setting RTO too small may lead to unnecessary retransmissions.
(c.) A sources retransmission timeout value is usually set to a value that increases
with the variance in measured RTT values.
(d.) RTO is picked randomly when a TCP connection starts, and remains fixed for the
duration of the flow.
7. Packet switching. The original reasons for the Internet to use packet switching were:
(a.) Statistical multiplexing enables efficient sharing of expensive long-haul
links.
(b.) It is less work for a router to process a packet than to process the data in a circuit.
(c.) If the routers contain no per-flow state, then it is easy to re-route flows
around link and router failures.
(d.) Packet switching enables routers to be built faster than circuit switches.
8. Queues. You are at the post office where there is a single line of people waiting to be
served by four different tellers. You watch for a while and notice that, on average, a new
person joins the line every 30 seconds, and there are, on average, 10 people in the line.
Whats a good estimate of the average time someone spends waiting in line?
(a.) 1200 seconds
(b.) 300 seconds
(c.) 75 seconds
(d.) 3 seconds
(e.) There isnt enough information in the question to make a good estimate.
9. Queues. You are standing in line at a ski lift. A new chair arrives every 10 seconds and
can carry two people, except that every third chair is broken. If no more than 6 people
arrive in any one minute period, whats the longest time that someone needs to wait in
line?
(a.) 30 seconds
(b.) 40 seconds
(c.) 50 seconds
(d.) 60 seconds
Page 3 of 8
Name:____________________________________
CS244a Midterm
February 20, 2007
Student ID #:_______________________________
Professor Nick McKeown
Campus/SITN-Local/SITN-Remote?____________
_______________________________________________________________________
(e.) An average of 8 seconds.
10. Queues. For the same ski lift as in question (9), assume that smoeone arrives to the lift
when the line is empty. On average, how long do they have to wait for a chair? Assume
the arrival time is independent of the time chairs depart.
(a.) 30 seconds
(b.) 12.5 seconds
(c.) 5 seconds
(d.) 7.5 seconds
(e.) 2.5 seconds
Short Questions.
11. (9 points) Inter-AS routing (from textbook). Consider a router inside one AS that
receives a packet for a network inside another AS.
(a.) Briefly explain how the router decides which router to send it to in its own AS so
that it can reach the other AS.
(See page 368 of textbook).
The Inter-AS routing protocol (BGP4 today) is used to identify which ASs to pass
through in order to reach a destination. This information is propagated inside the AS
using the intra-AS protocol (e.g. OSPF); this way, a router can decide which router to
send packets to at the edge of the AS so that it can be forwarded along the correct AS
path. If there are multiple paths to the destination AS, the router must make a local
choice of where to send the packet next. (See part b).
(b.) Why do many network operators use hot-potato routing?
Hot-potato routing is used by routers inside an AS to decide which boundary router to
send to, when there are multiple paths to the destination. Hot-potato routing is commonly
used to forward the traffic outside the AS as quickly as possible the operators like to
offload the traffic to another AS whenever they can!
(c.) Explain how loops in paths can be detected in BGP.
BGP advertisements contain complete paths showing the ASs the path passes
through, and so a router can easily identify a loop because an AS will appear two
or more times.
Page 4 of 8
Name:____________________________________
CS244a Midterm
February 20, 2007
Student ID #:_______________________________
Professor Nick McKeown
Campus/SITN-Local/SITN-Remote?____________
_______________________________________________________________________
12. (3 points) Routing. Explain why a network operator might not use traffic load as a cost metric for
their routing protocol.
If routers pick lightly loaded paths, the paths will become more congested, and so routers will pick
new paths. This leads to oscillations, limit-cycles and eventually instability.
13. (3 points) RED. The RED mechanism for active queue management will drop packets before the
packet buffer is full. To do this, it keeps track of the average queue occupancy, and drops packets
if the average exceeds a threshold.
(a.) Explain why RED uses the average queue occupancy instead of the instantaneous queue
occupancy.
To make it tolerant of bursts from TCP. TCP tends to send in bursts (one window of traffic each
RTT). If the queue drops several packets from one burst, it is likely that the source will re-enter
slow-start, which is not desirable.
(b.) What would happen if it used the instantaneous value instead?
1. If the maximum threshold is set below the buffer size, then a portion of the buffer would never
be used.
2. The router would be intolerant to bursts of packets from TCP sources.
14. (8 points) Addresses. Consider a datagram network using 8-bit host addresses. Suppose a router
uses longest prefix matching and has the following forwarding table:
Prefix Match
00
01
10
11
Interface
0
1
2
3
For each of the four interfaces, write down the associated range of destination host addresses and
the number of addresses in the range.
Interface
0
1
2
3
Range of addresses
0x00 0x3F
0x40 0x7F
0x80 0xBF
0xC0 0xFF
Page 5 of 8
Number of addresses
64
64
64
64
Name:____________________________________
CS244a Midterm
February 20, 2007
Student ID #:_______________________________
Professor Nick McKeown
Campus/SITN-Local/SITN-Remote?____________
_______________________________________________________________________
Longer questions
15. (15 points) Routing. Use Dijkstras shortest path first algorithm to find the shortest path from
computer A to every other computer in the network below. At each stage of the algorithm, clearly
show the candidate set and the shortest path set. Assume all the links are bidirectional and
symmetric (i.e. the cost of using a link is the same in both directions).
Page 6 of 8
Name:____________________________________
CS244a Midterm
February 20, 2007
Student ID #:_______________________________
Professor Nick McKeown
Campus/SITN-Local/SITN-Remote?____________
_______________________________________________________________________
H
16. (12 points) General. MyTube makes available high-definition 2-hour movies on-line
using MPEG4 compression, which compresses the movie to a rate of 9Mb/s. Users
download them over the network onto a computer in their home, and then watch them
when they are fully downloaded.
(a.) Imagine that the users computer is in the back of their car and is automatically
replenished with new movies (using Wireless Ethernet running at 54Mb/s) each
time they go fill their car with gas. If the user fills their car with gas once per
week, and wants to download 3 movies, how long do they need to spend at the
gas station?
Page 7 of 8
Name:____________________________________
CS244a Midterm
February 20, 2007
Student ID #:_______________________________
Professor Nick McKeown
Campus/SITN-Local/SITN-Remote?____________
_______________________________________________________________________
the bottleneck link on the network also runs at 10Mb/s in other words, the video-call is
able to fill the pipe.
(a.) If we assume that the RTT includes the delay through the links and through the
buffer at the bottleneck link, what is the maximum congestion window-size
(cwnd) that TCPs AIMD will use once it reaches equilibrium? Express your
answer in bytes.
(Note: I hadnt meant to say that the RTT was fixed in the network only on the links.
i.e. I wanted to include the fact that the RTT will vary [by 50%] as the buffer fills and
empties. My mistake so I have graded it as if the RTT is fixed, but given the benefit
of the doubt to anyone who assumed it varied as the buffer occupancy varied).
The window size will reach a maximum when the pipe is full:
250ms at 10Mb/s = 2.5Mbits = 312, 500 bytes.
(b.) As a fraction of your answer in (a), what will be the value of cwnd immediately
after it learns that a packet has been dropped.
1/2
(c.) How long will it be until cwnd reaches value it was just before the loss? Express
your answer in seconds.
Each RTT, the window will grow by 125bytes, so it will take W_max/(2 * 125bytes)
RTTs = 312.5 seconds.
(d.) Explain why this could be a problem.
After a packet loss, it takes a very long time to re-reach the maximum window-size. In
the meantime, the rate is well below the maximum rate for the link (assuming many
flows are competing).
(e.) If several losses occur, cwnd is reduced to zero, and the slow-start algorithm is
used until cwnd reaches half of the value it was before the last packet was
dropped. How long does slow-start run for?
Assuming slow-start starts out with one packet (in fact, it starts with two) then we
need to figure out how long to reach 312,500/2 bytes if the window size increases by
125bytes each time an ACK is received. Essentially, the window size doubles each
( 312,500 %
# " 250ms ! 2.5 sec onds
' 2 " 125 $
(f.) How much slower can we expect an identical flow to run in a network with an
RTT of 500ms. Assume that both networks experience the same fraction of
dropped packets.
Because we know that the rate is proportional to
1
RTT ! p
rate will be halved and the flow will take approximately twice as long to complete.
Page 8 of 8