Sei sulla pagina 1di 5

Computer Networks

Homework 3 Reference Solution



Chapter 1

1. Consider an application that transmits data at a steady rate (for example, the sender
generates an N-bit unit of data every k time units, where k is small and fixed). Also,
when such an application starts, it will continue running for a relatively long period of
time. Answer the following questions, briefly justifying your answer:
(a)Would a packet-switched network or a circuit-switched network be more
appropriate for this application? Why?
(b)Suppose that a packet-switched network is used and the only traffic in this network
comes from such applications as described above. Furthermore, assume that the
sum of the application data rates is less than the capacities of each and every link.
Is some form of congestion control needed? Why?

a) A circuit-switched network would be well suited to the application described,
because the application involves long sessions with predictable smooth
bandwidth requirements. Since the transmission rate is known and not bursty,
bandwidth can be reserved for each application session circuit with no
significant waste. In addition, we need not worry greatly about the overhead
costs of setting up and tearing down a circuit connection, which are amortized
over the lengthy duration of a typical application session.

b) Given such generous link capacities, the network needs no congestion control
mechanism. In the worst (most potentially congested) case, all the applications
simultaneously transmit over one or more particular network links. However, since
each link offers sufficient bandwidth to handle the sum of all of the applications'
data rates, no congestion (very little queuing) will occur.


2. Consider two hosts, A and B, connected by a single link of rate R bps. Suppose that
the two hosts are separated by m meters, and suppose the propagation speed along the
link is s meters/sec. Host A is to send a packet of size L bits to Host B.
(a) Express the propagation delay, d
prop
, in terms of m and s.
(b) Determine the transmission time of the packet, d
trans
, in terms of L and R.
(c) Ignoring processing and queueing delays, obtain an expression for the end-to-end
delay.
(d) Suppose Host A begins to transmit the packet at time t = 0. At time t = d
trans
,
where is the last bit of the packet?
(e) Suppose d
prop
is greater than d
trans
. At time t = d
trans
, where is the first bit of the
packet?
(f) Suppose d
prop
is less than d
trans
. At time t = d
trans
, where is the first bit of the packet?
(g) Suppose s = 2.510
8
, L = 100 bits, and R = 28 kbps. Find the distance m so that
d
prop
equals d
trans
.

a) s m d
prop
/ = seconds.
b) R L d
trans
/ = seconds.
c) ) / / ( R L s m d
end to end
+ =

seconds.
d) The bit is just leaving Host A.
e) The first bit is in the link and has not reached Host B.
f) The first bit has reached Host B.
g) Want
( ) 893 10 5 . 2
10 28
100
8
3
=

= = S
R
L
m km.

3. Suppose users share a 1 Mbps link. Also suppose each user requires 100 kbps when
transmitting, but each user transmits only 10 percent of the time.
(a) When circuit switching is used, how many users can be supported?
(b) For the remainder of this problem, suppose packet switching is used. Find the
probability that a given user is transmitting.
(c) Suppose there are 40 users. Find the probability that at any given time, exactly n
users are transmitting simultaneously. (Hint: Use the binomial distribution).
(d) Find the probability that there are 11 or more users transmitting simultaneously.

a) 10 users can be supported because each user requires one tenth of the bandwidth.
b) 1 . 0 = p .
c) ( )
n n
p p
n

|
|
.
|

\
|
40
1
40
.
d) ( )

|
|
.
|

\
|

9
0
40
1
40
1
n
n n
p p
n
.


4. Suppose two hosts, A and B, are separated by 10,000 kilometers and are connected
by a direct link of R =1 Mbps. Suppose the propagation speed over the link is 2.510
8

meters/sec.
(a) Calculate the bandwidth-delay product, Rtprop.
(b) Consider sending a file of 400,000 bits from Host A to Host B. Suppose the file is
sent continuously as one big message. What is the maximum number of bits that
will be in the link at any given time?
(c) Provide an interpretation of the bandwidth-delay product.
(d) What is the width (in meters) of a bit in the link? Is it longer than a football field?
(e) Derive a general expression for the width of a bit in terms of the propagation speed
s, the transmission rate R, and the length of the link m.

a) 40,000 bits
b) 40,000 bits
c) The bandwidth-delay product of a link is the maximum number of bits that can
be in the link
d) 1 bit is 250 meters long, which is longer than a football field
e) s/R


5. Refer to problem 4.
(a) How long does it take to send the file, assuming it is sent continuously?
(b) Suppose now the file is broken up into 10 packets with each packet containing
40,000 bits. Suppose that each packet is acknowledged by the receiver and the
transmission time of an acknowledgment packet is negligible. Finally, assume that
the sender cannot send a packet until the preceding one is acknowledged. How long
does it take to send the file?
(c) Compare the results from (a) and (b).

a) t
trans
+ t
prop
= 400 msec + 40 msec = 440 msec
b) 10 * (t
trans
+ 2 t
prop
) = 10*(40 msec + 80 msec) = 1.2 sec
c) It takes a longer time to send the file if it is broken up into packets and each
packet has to be acked before the next one can be sent out.

Chapter 2

1. True or false?
(a)A user requests a Web page that consists of some text and two images. For this
page, the client will send one request message and receive three response messages.
(b)Two distinct Web pages (for example, www.cs.dartmouth.edu/people.html and
www.cs.dartmouth.edu/academics.html) can be sent over the same persistent
connection.
(c)With non-persistent connections between browser and origin server, it is possible
for a single TCP segment to carry two distinct HTTP request messages.
(d)The Date: header in the HTTP response message indicates when the object in the
response was last modified.

a) F
b) T
c) F
d) F

2.Two HTTP request methods are GET and POST. Are there any other methods in
HTTP/1.0? If so, what are they used for? Are there other methods in HTTP/1.1?

HTTP/1.0: GET, POST, HEAD
HTTP/1.1: GET, POST, HEAD, OPTIONS, PUT, DELETE, CONNECT,TRACE

See RFCs for explanations.

3. Suppose within your Web browser you click on a link to obtain a Web page. The IP
address for the associated URL is not cached in your local host, so a DNS look-up is
necessary to obtain the IP address. Suppose that n DNS servers are visits incur an
RTT of RTT1, ... , RTTn. Further suppose that the Web page associated with the link
contains exactly one object, consisting of a small amount of HTML text. Let RTT0
denote the RTT between the local host and the server containing the object. Assuming
zero transmission time of the object, how much time elapses from when the client
clicks on the link until the client receives the object?

The total amount of time to get the IP address is
n
RTT RTT RTT + + +
2 1
.
Once the IP address is known,
O
RTT elapses to set up the TCP connection and
another
O
RTT elapses to request and receive the small object. The total response
time is
n o
RTT RTT RTT RTT + + + +
2 1
2

4. Referring to Problem 4, suppose the HTML file references three very small objects
on the same server. Neglecting transmission times, how much time elapses with
(a) Nonpersistent HTTP with no parallel TCP connections?
(b) Nonpersistent HTTP with parallel connections?
(c) Persistent HTTP with pipelining?

a)
o o n
RTT RTT RTT RTT 2 3 2
1
+ + + +

n o
RTT RTT RTT + + + =
1
8 .
b)
o o n
RTT RTT RTT RTT 2 2
1
+ + + +

n o
RTT RTT RTT + + + =
1
4
c)
o o n
RTT RTT RTT RTT + + + + 2
1


n o
RTT RTT RTT + + + =
1
3 .

5. Suppose you are downloading MP3s using some P2P file-sharing system. The
bottleneck in the Internet is your residential access link, which is a 128 kbps
full-duplex link. While you are downloading MP3s, all of a sudden 10 other users
start uploading MP3s from your computer. Assuming that your computer is very
powerful, and all of these downloads and uploads are not putting any strain on your
computer (CPU, disk I/O, and so on), will the simultaneous uploadswhich are also
passing through your bottleneck linkshow down your downloads? Why or why not?
Also answer the same question for when you have 128 kbps upstream and 512 kbps
downstream as part of an ADSL connection.

Because the link is full duplex, you have 128 kbps in each direction, and the
uploading does not interfere with the downloading. However, for an asymmetric
link, uploading can significantly reduce the download rate due to metered acks.
(The explanation of this somewhat involved and beyond the scope of the chapter.)

Potrebbero piacerti anche