CS 455/655: Introduction to Computer Networks Fall 2013

CS 455/655: Introduction to Computer Networks
Fall 2013
Sample Midterm Examination
NAME:
This exam is closed books and closed notes. Please write clearly and neatly. Be precise in
your answers; do not just re-iterate what you know about the topic. Clearly state any
assumptions you make. The exam has 3 questions over 4 pages1. Answer all questions.
Problem 1 (Protocol specification):
Consider three network entities: A, B, and C, which are connected by a perfect broadcast
channel (that is, any message sent will be received by the other two entities correctly; the
channel will not corrupt, lose, or re-order packets). A, B, and C are to deliver data
messages to each other in a rotating manner: first A must deliver a message to B, then B
must deliver a message to C, and then C must deliver a message to A, and so on.
Draw a FSM specification for this protocol (one FSM for A, one for B, and one for C).
You should define and use events and actions, including:
•
•
•
•
•
rdt_send(data): call from above to send a data message.
udt_send(packet = <data, B, …>): your protocol sends a packet containing the
data message, destination B, and any other packet header fields that you may need
for your protocol to work correctly.
rdt_rcv(packet): your protocol receives a packet from the channel.
extract(packet, data): function to extract data from the packet structure.
deliver_data(data): function to deliver data to layer above your protocol.
Your protocol does not have to use ACK messages.
1
Number of questions in an exam varies and a typical exam usually has 3-5 questions. Still, this sample
should give you a feel of what an exam might look like.
1
NAME:
Problem 2 (HTTP performance):
Consider a web client requesting a base html page of size O = 3,500 bytes from a web
server. This base html page contains 2 objects of the same size of O bytes each. These
two embedded objects reside on the same web server. The TCP segment size S = 500
bytes, the round-trip propagation delay RTP = 150 msec, and the channel rate R =
40Kbps.
In answering the following questions, assume error-free transmission and no client-side
buffering limitation. Be sure to consider TCP connection establishment, the data
transmission delay, and assume that TCP has a static window size of 3500 bytes.
(a) Assume the client uses non-persistent HTTP (HTTP 1.0) using 2 parallel TCP
connections to retrieve the 2 embedded objects, how long is the response time—
the time it takes to receive the base page and its 2 embedded objects from the web
server after the user requests the initial base html page? Show all steps of your
calculations and associated expressions in terms of O, S, R, and RTP.
(b) Now suppose persistent HTTP (HTTP 1.1) with pipelining is used. What is the
response time? How significant is the gain, if any, over the non-persistent case. If
there is a gain in response time, explain the main factors that contributed to it.
.
2
NAME:
Problem 3 (caching):
Consider a 1 Gbps local-area network (LAN) “a.com”, with a local HTTP cache and a
local DNS server, connected to the Internet through an access (bottleneck) link of 1Mbps.
Suppose that there are two user machines, m1.a.com and m2.a.com, in the network
a.com. Suppose the user at m1.a.com types in the URL www.b.com/bigfile.htm into a
browser to retrieve a large file of 1G bits (1000M bits) from another 1Gbps LAN
“b.com” on the Internet. See figure below.
(a) List the sequence of DNS and HTTP messages sent/received from/by m1.a.com,
as well as any other messages that leave/enter the a.com network that are not
directly sent/received by m1.a.com from the point that the URL is entered into the
browser until the file is completely received. Indicate the source and
destination of each message. Assume that every HTTP request by m1.a.com is
first directed to the HTTP cache in a.com, that the cache is initially empty, and
that the local DNS server processes all DNS requests iteratively. Also, assume
that a user machine knows the IP addresses of both the local HTTP cache and the
local DNS server.
Local DNS
server
Local HTTP
cache
b.com 1Gbps LAN
m1.a.com
a.com 1Gbps LAN
www.b.com
Internet
1Mbps
router
Authoritative DNS
server for b.com
m2.a.com
3
NAME:
Problem 3 (caching) – cont’d:
(b) How long does it take to accomplish the steps you outlined in your answer to the
previous question regarding the m1.a.com DNS and HTTP messages? Explain
how you arrived at your answer. In answering this question, you can assume the
following:
• The packets containing DNS commands and HTTP commands such as GET
are very small compared to the size of the file. Therefore, their transmission
times (but not their propagation times) can be neglected.
• Propagation delays within the same LAN are small enough to be ignored.
• The one-way propagation delay from/to anywhere in a.com to/from any other
site in the Internet (including b.com) is 500 msec.
Make sure to include delays due to TCP connection establishment, but ignore
other TCP details.
(c) Now assume that machine m2.a.com makes a request to the same URL that
m1.a.com requested. Assume that the file has not been modified since then. List
the sequence of DNS and HTTP messages sent/received from/by m2.a.com, as
well as any other messages that leave/enter the a.com network that are not directly
sent/received by m2.a.com from the point that the URL is entered into the
browser until the file is completely received. Indicate the source and
destination of each message. Be sure to consider caching.
(d) Now suppose there is no HTTP cache in the network a.com. What is the
maximum rate at which machines in a.com can make requests for the file
www.b.com/bigfile.htm while keeping the time from when a request is made to
when it is satisfied non-infinite in the long run?
4