Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS144, Stanford University Error in Q3-7. CS144, Stanford University Using longest prefix matching, the IP address 21.44.9.5 will match which entry? a.21.0.0.0/8.

Similar presentations


Presentation on theme: "CS144, Stanford University Error in Q3-7. CS144, Stanford University Using longest prefix matching, the IP address 21.44.9.5 will match which entry? a.21.0.0.0/8."— Presentation transcript:

1 CS144, Stanford University Error in Q3-7

2 CS144, Stanford University Using longest prefix matching, the IP address 21.44.9.5 will match which entry? a.21.0.0.0/8 b.21.44.9.0/24 c.21.44.9.1/32 d.21.44.9.2/28 2 IP address: …….. 0000 0101. Prefix: …….. 0000 0010/28 ✔ IP address: …….. 0000 0101. Prefix: …….. 0000 XXXX/28

3 CS144, Stanford University CS144 An Introduction to Computer Networks Packet Switching

4 CS144, Stanford University4 Outline 1.End-to-end delay 2.Queueing delay 3.Simpler queue model 4.Rate guarantees 5.Delay guarantees (hard!)

5 CS144, Stanford University5 Propagation Delay, t l : The time it takes a single bit to travel over a link at propagation speed c. l Example: A bit takes 5ms to travel 1,000km in an optical fiber with propagation speed 2 x 10 8 m/s.

6 CS144, Stanford University6 Packetization Delay, t p : The time from when the first to the last bit of a packet is transmitted. p Example 1: A 64byte packet takes 5.12  s to be transmitted onto a 100Mb/s link. Example 2: A 1kbit packet takes 1.024s to be transmitted onto a 1kb/s link. r bits/s

7 CS144, Stanford University End-to-end delay 7 l 1, r 1 l 2, r 2 l 3, r 3 l 4, r 4 Example: How long will it take a packet of length p to travel from A to B, from when the 1 st bit is sent, until the last bit arrives? Assume the switches store-and-forward packets along the path. A B

8 CS144, Stanford University8 l 1, r 1 l 2, r 2 l 3, r 3 l 4, r 4 AB S1S2S3 A B S1 S2 S3 p/r 2 l 2 /c p/r 3 l 3 /c p/r 4 l 4 /c time l 1 /c p/r 1 time

9 CS144, Stanford University9 l 1, r 1 l 2, r 2 l 3, r 3 l 4, r 4 AB S1S2S3 Q 2 (t) p/r 1 A B S1 S2 S3 p/r 2 l 1 /c l 2 /c p/r 3 p/r 4 l 3 /c l 4 /c Q 2 (t) time *Queueing = UK spelling, adopted by Kleinrock at UCLA in 1960s. Queueing and queuing (US spelling) are both widely used.

10 CS144, Stanford University Packet delay variation 10 CDF (%) RTT (ms)

11 CS144, Stanford University Simple model of router queue 11

12 CS144, Stanford University12 Simple model of a router queue Properties of A(t), D(t): A(t), D(t) are non-decreasing A(t) >= D(t) R A(t), D(t)D(t) Router queue Q(t)Q(t)

13 CS144, Stanford University13 Simple model of a queue A(t)A(t) D(t)D(t) Cumulative number of bytes departed up until time t. time Link rate Cumulative number of bytes Cumulative number of bytes arrived up until time t. R A(t)A(t) D(t)D(t) Q(t)Q(t) Properties of A(t), D(t) : A(t), D(t) are non-decreasing A(t) >= D(t) R

14 CS144, Stanford University14 D(t) A(t) Time Q(t) d(t) Queue occupancy: Q(t) = A(t) - D(t). Queueing delay, d(t), is the time spent in the queue by a byte that arrived at time t, assuming the queue is served first-come-first-served (FCFS). Simple model of a queue Cumulative number of bytes

15 CS144, Stanford University15 Example Cumulative number of bits Every second, a 100 bit packet arrives to a queue at rate 1000b/s. The maximum departure rate is 500b/s. What is the average occupancy of the queue? D(t) A(t) time 0.1s0.2s1.0s 100 Solution: During each repeating 1s cycle, the queue fills at rate 500b/s for 0.1s, then drains at rate 500b/s for 0.1s. Over the first 0.2s, the average queue occupancy is therefore bits. The queue is empty for 0.8s every cycle, and so average queue occupancy:

16 CS144, Stanford University Priorities and Rates 16

17 CS144, Stanford University FIFO is a free for all 17 R B

18 CS144, Stanford University Strict Priorities 18 R High Low

19 CS144, Stanford University Weighted Priorities 19 R Weight = 2 Weight = 1

20 CS144, Stanford University Weighted Priorities 20 R Weight = w 1 Weight = w n

21 CS144, Stanford University What we’d like 21 R Weight = w 1 Weight = w n

22 CS144, Stanford University A practical way to do it 22 R Weight = w 1 Weight = w n

23 CS144, Stanford University Finishing Time 23 Finishing time: bit-by-bit Finishing time: pkt-by-pkt

24 CS144, Stanford University Summary: Priorities and Rates FIFO queues are a free for all: No priorities and no guaranteed rates. Strict priorities: High priority traffic “sees” a network with no low priority traffic. Useful if we have limited amounts of high priority traffic. Weighted Fair Queueing (WFQ) lets us give each flow a guaranteed service rate, by scheduling them in order of their bit-by-bit finishing times. 24

25 CS144, Stanford University Delay Guarantees 25

26 CS144, Stanford University Delay guarantees: Intuition 26 l 1, r 1 l 2, r 2 l 3, r 3 l 4, r 4 AB Q 2 (t)Q 1 (t)Q 3 (t) If we know the upper bound of Q 1 (t), Q 2 (t) and Q 3 (t), then we know the upper bound of the end-to-end delay.

27 CS144, Stanford University Delay guarantees: Intuition 27 R Rate = R 1 Rate = R n

28 CS144, Stanford University So how can we control the delay of packets? What we already know how to control: 1.The rate at which a queue is served (WFQ). 2.The size of each queue. How do we make sure no packets are dropped?

29 CS144, Stanford University Zooming in on one queue 29 R B A(t)D(t) time Cumulative bytes A(t) D(t) R Key idea: In general, we don’t know the arrival process. So let’s constrain it.

30 CS144, Stanford University Constraining traffic time Cumulative bits   Number of bits that can arrive in any period of length t is bounded by: This is called “(  ) regulation” In our example:  = B and  = R 1

31 CS144, Stanford University (  )-constrained Arrivals and Minimum Service Rate time Cumulative bits A(t) D(t) R1R1   d max B max If flows are leaky-bucket constrained, and routers use WFQ, then end-to-end delay guarantees are possible.

32 CS144, Stanford University The leaky bucket regulator Tokens at rate,  Token bucket size,  Packet buffer Packets Send packet if and only if enough tokens

33 CS144, Stanford University Putting it all together 33 A B Q 2 (t)Q 1 (t) Leaky Bucket Regulator

34 CS144, Stanford University An example In the network below, an application wants a rate of 10Mb/s and an end to end delay of less than 5ms for 1000byte packets. A B 10km, 1Gb/s100km, 100Mb/s10km, 1Gb/s Once we decided to bound the delay to no more than 2.15ms in each router, we concluded that we need to make sure: (a) we don't store more than 2960 bytes in each router, which we accomplish by setting the token bucket at the source equal to 2960 bytes, and (b) the router buffer can hold at least 2960 bytes so we don't drop data (we can make the router buffer bigger if we'd like to; we just won't use it).

35 CS144, Stanford University In practice While it is technically possible to do so, very few networks actually control end to end delay. Why? -It is complicated to make work, requiring coordination. -In most networks, a combination of over-provisioning and priorities work well enough. 35

36 CS144, Stanford University Summary If we know the size of a queue and the rate at which it is served, then we can bound the delay through it. We can pick the size of the queue, and WFQ lets us pick the rate at which it is served. Therefore, we just need a way to prevent packets being dropped along the way. For this, we use a leaky bucket regulator. We can therefore bound the end to end delay. 36


Download ppt "CS144, Stanford University Error in Q3-7. CS144, Stanford University Using longest prefix matching, the IP address 21.44.9.5 will match which entry? a.21.0.0.0/8."

Similar presentations


Ads by Google