1 Comnet 2006 Communication Networks Recitation 10 QoS.

17
1 Comnet 2006 Communication Networks Communication Networks Recitation 10 Recitation 10 QoS QoS
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    217
  • download

    0

Transcript of 1 Comnet 2006 Communication Networks Recitation 10 QoS.

Page 1: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

1Comnet 2006

Communication NetworksCommunication Networks

Recitation 10Recitation 10

QoSQoS

Page 2: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

2Comnet 2006

Quality of Service: What is it?Quality of Service: What is it?

Multimedia applications: network audio and video

network provides application with level of performance needed for application to function.

QoS

Page 3: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

3Comnet 2006

Traffic ShapingThe Leaky Bucket Algorithm

(a) A leaky bucket with water. (b) a leaky bucket with packets.

Page 4: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

4Comnet 2006

Leaky Bucket exampleLeaky Bucket example

• A source generates data in terms of bursts: 3 MB A source generates data in terms of bursts: 3 MB bursts lasting 2 msec once every 100 msec.bursts lasting 2 msec once every 100 msec.

• The network offers a bandwidth of 60 MB/sec.The network offers a bandwidth of 60 MB/sec.• The leaky bucket has a capacity of 4 MB. How does The leaky bucket has a capacity of 4 MB. How does

the output look like?the output look like?

• Input:Input: 0-2 msec: 1500 MB/sec; 100-102 msec: 1500 0-2 msec: 1500 MB/sec; 100-102 msec: 1500 MB/sec; 200-202 msec: 1500 MB/sec; …MB/sec; 200-202 msec: 1500 MB/sec; …

• Output: 0-50 msec: 60 MB/sec; 100-150 msec: 60 Output: 0-50 msec: 60 MB/sec; 100-150 msec: 60 MB/sec; ….MB/sec; ….

Page 5: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

5Comnet 2006

Leaky Bucket CNTD.Leaky Bucket CNTD.

• What should be the capacity of the leaky What should be the capacity of the leaky bucket to avoid loss?bucket to avoid loss?

• During the burst, data inflow is at the rate of During the burst, data inflow is at the rate of 1.5 MB/msec and the outflow is at the rate of 1.5 MB/msec and the outflow is at the rate of 0.06 MB/msec.0.06 MB/msec.

• So accumulation is at the rate of 1.44 So accumulation is at the rate of 1.44 MB/msec. So at the end of 2 msec, there will MB/msec. So at the end of 2 msec, there will be an accumulation of 2.88 MB. This is the be an accumulation of 2.88 MB. This is the minimum leaky bucket capacity to avoid minimum leaky bucket capacity to avoid buffer overflow and hence data loss.buffer overflow and hence data loss.

Page 6: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

6Comnet 2006

The Token Bucket Algorithm

(a) Before. (b) After.

5-34

Token bucket allows some burstiness (up to the number of token the bucket can hold)

Page 7: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

7Comnet 2006

Token Bucket – simple exampleToken Bucket – simple example

• 2 tokens of size 100 bytes added each 2 tokens of size 100 bytes added each second to the token bucket of capacity 500 second to the token bucket of capacity 500 bytesbytes

– Avg. rate = 200 bytes/sec, burst size = 500 bytesAvg. rate = 200 bytes/sec, burst size = 500 bytes– Packets bigger than 500 bytes will never be sentPackets bigger than 500 bytes will never be sent– Peak rate is unbounded – i.e., 500 bytes of burst Peak rate is unbounded – i.e., 500 bytes of burst

can be transmitted arbitrarily fastcan be transmitted arbitrarily fast

Page 8: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

8Comnet 2006

Token Bucket exampleToken Bucket example

• Bucket capacity: 1 MBBucket capacity: 1 MB

• Token arrival rate: 2 MB/secToken arrival rate: 2 MB/sec

• Network capacity: 10 MB/secNetwork capacity: 10 MB/sec

• Application produces 0.5 MB burst Application produces 0.5 MB burst every 250 msec For 3 secondsevery 250 msec For 3 seconds

• The bucket is full of tokensThe bucket is full of tokens

Page 9: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

9Comnet 2006

Token Bucket example CNTD.Token Bucket example CNTD.

• Initially, output can be at the rate of 10 MB/s. Initially, output can be at the rate of 10 MB/s. But how long can the bucket sustain this?But how long can the bucket sustain this?– First, 1MB can be sentFirst, 1MB can be sent– From then on, for X seconds, the token input rate From then on, for X seconds, the token input rate

is 2MB/s, the traffic rate is 10MB/sis 2MB/s, the traffic rate is 10MB/s– 1 + 2X = 10X 1 + 2X = 10X 8X = 1 8X = 1 X = 1/8 sec =125 ms X = 1/8 sec =125 ms– The bucket can transmit 1.25 MB in this time > The bucket can transmit 1.25 MB in this time >

0.5MB the application produces0.5MB the application produces

• Output:Output: 0-50 ms: 10 MB/s0-50 ms: 10 MB/s50-250 ms: None50-250 ms: None

Page 10: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

10Comnet 2006

Token Bucket example CNTD.Token Bucket example CNTD.

• At the end of this period, the amount of At the end of this period, the amount of tokens in the bucket is:tokens in the bucket is:– 1MB+250ms*2MB/s-0.5MB=1MB1MB+250ms*2MB/s-0.5MB=1MB

• So the bucket is full again!So the bucket is full again!

• Repeat for 3 secondsRepeat for 3 seconds

Page 11: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

11Comnet 2006

Minimum Bucket size and Token Minimum Bucket size and Token RateRate

• Discarding Bucket (Policing)Discarding Bucket (Policing)– Bucket Size Bucket Size ≥ 0.5MB≥ 0.5MB– Token Rate ≥ 0.5MB/250ms = 2MB/sToken Rate ≥ 0.5MB/250ms = 2MB/s

• Queueing Bucket (Shaping)Queueing Bucket (Shaping)– How will the traffic look with Bucket Size = 200K?How will the traffic look with Bucket Size = 200K?

• 0.2+2X=10X 0.2+2X=10X X=0.2/8=0.025s=25ms X=0.2/8=0.025s=25ms• 0-25ms : 10 MB/s = 0.25MB. 0.25MB left0-25ms : 10 MB/s = 0.25MB. 0.25MB left• 0.25MB/(2MB/s) = 125ms0.25MB/(2MB/s) = 125ms• 25-150ms: 2MB/s25-150ms: 2MB/s• 150-250ms: None150-250ms: None

– Tokens after: 100ms*2MB/s=0.2MBTokens after: 100ms*2MB/s=0.2MB

Page 12: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

12Comnet 2006

((σσ,,ρρ) Model) Model

• Over an interval of length Over an interval of length t t the number of packets/bits the number of packets/bits that are admitted is less than or equal to that are admitted is less than or equal to ((σσ++ρρtt))..

• Composing flows Composing flows ((σσ11,,ρρ11) & () & (σσ22,,ρρ22) ) – Resulting flow Resulting flow ((σσ11+ + σσ22,,ρρ11++ρρ22))

• What does a router need to support streams: (What does a router need to support streams: (σσ11,,ρρ11) ) … (… (σσkk,,ρρkk))– Buffer size B > Buffer size B > ΣΣ σσii

– Rate R > Rate R > Σ ρΣ ρii

• Admission Control (at the router)Admission Control (at the router)– Can support (Can support (σσkk,,ρρkk) if) if– Enough buffers and bandwidthEnough buffers and bandwidth

• R > R > Σ ρΣ ρi i and B > Σ σ and B > Σ σi i

Page 13: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

13Comnet 2006

((σσ,,ρρ) Model example) Model example

• The line from the previous question has The line from the previous question has router with 4MB of buffers. How many router with 4MB of buffers. How many flows of the above kind can it accept?flows of the above kind can it accept?

• σ = 0.5MB, ρ = 0.5MB/250ms = 2MB/sσ = 0.5MB, ρ = 0.5MB/250ms = 2MB/s• For n flows, we require 0.5n MB buffers, For n flows, we require 0.5n MB buffers,

2n MB/s rate 2n MB/s rate n = 5. n = 5.• Each line will be served with a Each line will be served with a

0.5MB:2MB/s token bucket0.5MB:2MB/s token bucket

Page 14: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

14Comnet 2006

IntServ (RFC1633)IntServ (RFC1633)

Page 15: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

15Comnet 2006

DiffServ (RFC2474/2475)DiffServ (RFC2474/2475)

Page 16: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

16Comnet 2006

Assured Forwarding PHBAssured Forwarding PHB• AF defines 4 classes AF defines 4 classes

– Strong assurance for traffic within profile & allow source Strong assurance for traffic within profile & allow source to exceed profileto exceed profile

– Admission based on expected capacity usage profilesAdmission based on expected capacity usage profiles– Within each class, there are three drop prioritiesWithin each class, there are three drop priorities

• User and network agree to some traffic profileUser and network agree to some traffic profile– Edges mark packets up to allowed rate as “in-profile” or Edges mark packets up to allowed rate as “in-profile” or

high priority high priority – Other packets are marked with one of 2 lower “out-of-Other packets are marked with one of 2 lower “out-of-

profile” prioritiesprofile” priorities– A congested router drops lower priority packets firstA congested router drops lower priority packets first

• Implemented using clever queue management (RED with Implemented using clever queue management (RED with In/Out bit)In/Out bit)

Page 17: 1 Comnet 2006 Communication Networks Recitation 10 QoS.

17Comnet 2006

Expedited Forwarding PHBExpedited Forwarding PHB

• User sends within profile & network commits to User sends within profile & network commits to delivery with requested profiledelivery with requested profile– Strong guaranteeStrong guarantee– Admitted based on peak rateAdmitted based on peak rate

• Rate limiting of EF packets at edges only, using Rate limiting of EF packets at edges only, using token bucket to shape transmissiontoken bucket to shape transmission

• Simple forwarding: classify packet in one of two Simple forwarding: classify packet in one of two queues, use priorityqueues, use priority– EF packets are forwarded with minimal delay and loss (up to EF packets are forwarded with minimal delay and loss (up to

the capacity of the router)the capacity of the router)