Homework 1 solutions

advertisement

COMP 5621 Homework #1

Notes :

1) No late submission is accepted.

2) Submit in class or to COMP561 homework deposit box.

3) Electronic submissions are not allowed.

1.

(15 points) Consider the queuing delay in a router buffer (preceding an outbound link).

Suppose all packets are L bits, the transmission rate is R bps, and that N packets arrive to the buffer every LN/R seconds. Find the average queuing delay of a packet. (Hint: The queuing delay for the first packet is zero; for the second packet L/R; for the third packet 2L/R. The N th packet has already been transmitted when the second batch of packets arrives.)

Solution:

According the definition of queuing delay, we can know that the queuing delay for the first packet is zero, for the second packet L/R, for the third packet 2L/R; similarly, for Nth packet

(N-1)L/R. Thus, the average queuing delay of a packet is computed as follows.

ARD

N i

1  iL L

0

N

R

R

N

N i

1

0 i

 R

(

1)

N

2 

(

1)

2 R

2.

Consider distributing a file of F bits to N peers using a P2P architecture. Assume a fluid model where the server can simultaneously transmit to multiple peers, transmitting to each peer at different rates, as long as the combined rate does not exceed u s

. For simplicity assume that d min

is very large, so that peer download bandwidth is never a bottleneck. a.

(12 points) Suppose u s

<=( u s

+ u

1 + … + u

N

)/N. Specify a distribution scheme that has a distribution time of F/u s

.

Solution:

Define u = u

1

+ u

2

+ ….. + u

N.

Divide the file into N parts, with the i th

part having size (u i

/u)F. The server transmits the i th part to peer i at rate r i

= (u i

/u)u s

. Note that r

1

+ r

2

+ ….. + r

N

= u s

, so that the aggregate server rate does not exceed the link rate of the server. Also have each peer i forward the bits it receives to each of the N-1 peers at rate r i

. The aggregate forwarding rate by peer i is (N-1)r i

. We have

(N-1)r i

= (N-1)(u s u i

)/u <= u i

,

Thus the aggregate forwarding rate of peer i is less than its link rate u i

.

In this distribution scheme, peer i receives bits at an aggregate rate of r i

 j

 i r j

 u s

Thus each peer receives the file in F/u s

. b.

(12 points) Suppose u s

>=( u s

+ u

1 + … + u

N

)/N. Specify a distribution scheme that has a distribution time of NF/( u s

+ u

1 + … + u

N

).

Again define u = u

1

+ u

2

+ ….. + u

N

. By assumption u s

>= (u s

+ u)/N

Let r i

= u i

/(N-1) and r

N+1

= (u s

– u/(N-1))/N

In this distribution scheme, the file is broken into N+1 parts. The server sends bits from the i th

part to the i th

peer (i = 1, …., N) at rate r i

. Each peer i forwards the bits arriving at rate r i

to each of the other N-1 peers. Additionally, the server sends bits from the (N+1)

st

part at rate r

N+1

to each of the N peers. The peers do not forward the bits from the (N+1) st

part.

The aggregate send rate of the server is r

1

+ …. + r

N

+ N r

N+1

= u/(N-1) + u s

– u/(N-1) = u s

Thus, the server’s send rate does not exceed its link rate. The aggregate send rate of peer i is

(N-1)r i

= u i

Thus, each peer’s send rate does not exceed its link rate.

In this distribution scheme, peer i receives bits at an aggregate rate of r i

 r

N

1

 j

 i r j

 u /( N

1 )

( u s

 u /( N

1 )) / N

( u s

 u ) / N

Thus each peer receives the file in NF/(u s

+u).

(For simplicity, we neglected to specify the size of the file part for i = 1, …., N+1.

We now provide that here. Let Δ = FN/(u s

+u) be the distribution time. For i = 1,

…, N, the i th

file part is F i

= r i

Δ bits. The (N+1) st

file part is F

N+1

= r

N+1

Δ bits. It is straightforward to show that F

1

+ ….. + F

N+1

= F.)

3.

Recall the macroscopic description of TCP throughput. In the period of time from when the connection’s rate varies from W/(2*RTT) to W/RTT, only one packet is lost (at the very end of the period). a. (12 points) Determine the loss rate L. (Show the relation between L and W).

Solution:

The loss rate, L , is the ratio of the number of packets lost over the number of packets sent. In a cycle, 1 packet is lost. The number of packets sent in a cycle is

W

2

W

2

1

  

W

W n

/

0

2

(

W

2

 n )

W

2

1

W

2

 n

W  2 /

0 n

W

2

1

W

2

W / 2 ( W / 2

1 )

2

W

2

4

3

8

W

2

W

2

W

2

8

3

4

W

W

4

Thus the loss rate is

L

1

3

W

8

2 

3

4

W b. (14 points) Use the loss rate to show that if a connection has loss rate L, its average rate is approximately given by 1.22*MSS/(RTT*sqrt(L)).

8

3 L

. From the text, For W large,

3

8

W

2 we therefore have



3

4

W . Thus L

8 / 3 W

2

or W

 average throughput

3

4

8

3 L

MSS

RTT

1 .

22

MSS

RTT

L

4.

(10 marks) Suppose users share a 1Mbps link. Users generate data at a rate of 100 kbps when busy, but are busy only with probability p=0.1. If the network is packet switching, and the user population is M. Give a formula (in terms of p, M, N) for the probability that more than

N users are sending data.

Solution:

The probability that more than N users are sending data can be solved as follows:

 p n

1

 p

M

 n n

M

N

1



M n

5.

[15 marks] Suppose two hosts, A and B, are connected by two routers, U and V, and three links in the following topology.

A --- U --- V --- B

The transmission rate of the link A-U between A and U is R 1 = 10 Mbps , the transmission rate of the link U-V between U and V is R 2 = 400 Mbp s, and the transmission rate of the link V-B between V and

B is R 3 = 100 Mbps . All the three links have the same propagation speed 2*10

8 m/sec . The distance of the three links, A-U, U-V, and V-B, are 2000 km , 4000 km , and 1500 km , respectively. Assume a file of 10 MBytes is sent from host A to B. Suppose the nodal processing delay and queuing delay at each hop are negligible. Answer the following questions based on these given data. a. (5 marks) What is the throughput for the file transfer? Assume no other tra ffi c in the network.

When there is no other network tra ffi c, throughput will be approximately min(R1,R2,R3), i.e., 10 Mbps.

If we consider the packet size variation and the total delay in a packet forward network, the throughput is between 8*10Mb/8.0375s = 9.95Mbps and 8*10Mb/9.0375s =

8.85Mbps.(Refer to the following question for the delays).

b. (10 marks) How long will the file roughly take to transfer from host A to B?

Since the nodal processing delay and queuing delay at each hop are neglected, the delay will be the combination of transmission delay at each hop and propagation delay.

If the packets are small (the extreme case is that each packet contains only one bit), the lower bound of the transmission delay is 8b/B * 10MB / 10Mbps = 8s. The propagation delay in this case has a lower bound (2000+4000+1500)*1000m/2*10

8 m/s = 0.0375s.

Hence, the lower bound of the delay is 8s+0.0375s = 8.0375s.

If the packets are large (the extreme case is that the packet is 10MB), the transmission delay on the link AU is 8*10Mb/10Mbps = 8s. The propagation delay on the link AU is

2000*1000m/2*10

8 m/s = 0.01s. The total delay is thus 8.01s.

The transmission delay on the link UV is 8*10Mb/400Mbps = 0.2, and the propagation delay is 4000*1000m/2*10

8 m/s = 0.02s. The total delay is thus 0.22s.

The transmission delay on the link VB is 8*10Mb/100Mbps = 0.8s, and the propagation delay is 1500*1000m/2*10

8 m/s = 0.0075s, and the total delay is thus 0.8075s.

The total delay is 8.01s+0.22s + 0.8075s = 9.0375s.

Hence, the approximate delay is between 8,01s and 9.0375s.

6.

(15 marks) Use ‘traceroute’, ‘tracert’ or another similar tool to probe the path from an end system at HKUST to another end system. The path should go through at least one tier-1 carrier’s network. List all routers (intermediate nodes) in the path, and find out at least 5 routers’ approximate geographic locations in terms of cities, provinces or states. (Hint: There are web services that maps an IP to a geographic location)

Example: traceroute to wsj.com (205.203.132.65), 30 hops max, 60 byte packets

1 10.0.1.2 (10.0.1.2) 0.198 ms 0.203 ms 0.168 ms

2 143.89.135.251 (143.89.135.251) 0.855 ms 1.064 ms 0.978 ms (Hong Kong)

3 202.14.80.155 (202.14.80.155) 1.947 ms 1.913 ms 1.876 ms (Hong Kong)

4 203.188.117.129 (203.188.117.129) 2.823 ms 3.078 ms 2.718 ms

5 202.130.98.101 (202.130.98.101) 3.432 ms 3.371 ms 3.336 ms

6 115.160.187.41 (115.160.187.41) 4.264 ms 3.534 ms 115.160.187.103

(115.160.187.103) 3.743 ms

7 ge-1-2-5-xcr1.hkg.cw.net (203.169.57.97) 3.708 ms 3.627 ms 3.558 ms

8 xe-1-3-0-xcr1.tyo.cw.net (195.2.10.65) 153.210 ms 52.881 ms 52.850 ms (Tokyo,

Japan) – Tier 1

9 195.2.18.29 (195.2.18.29) 151.602 ms 195.2.30.141 (195.2.30.141) 58.487 ms

195.2.18.29 (195.2.18.29) 152.018 ms

10 xe-5-2-1.edge8.SanJose1.Level3.net (4.53.31.13) 158.479 ms 158.176 ms 158.397 ms

San Jose, CA, USA – Tier 1

11 ae-1-51.edge2.Newark1.Level3.net (4.69.156.9) 227.511 ms 227.465 ms 226.479 ms

12 ae-1-51.edge2.Newark1.Level3.net (4.69.156.9) 222.230 ms 222.660 ms 226.417 ms

13 ae-1-51.edge2.Newark1.Level3.net (4.69.156.9) 222.409 ms DOW-JONES-

C.edge2.Newark1.Level3.net (4.59.20.254) 221.624 ms ae-1-51.edge2.Newark1.Level3.net

(4.69.156.9) 222.555 ms

14 205.203.132.65 (205.203.132.65) 227.259 ms 227.240 ms DOW-JONES-

C.edge2.Newark1.Level3.net (4.59.20.254) 217.783 ms (New Jersey, USA)

Download
Study collections