IP QoS Principles and Quality of Service (QoS) classifies network traffic

ssuserc5f8a3 28 views 108 slides Sep 26, 2024
Slide 1
Slide 1 of 108
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86
Slide 87
87
Slide 88
88
Slide 89
89
Slide 90
90
Slide 91
91
Slide 92
92
Slide 93
93
Slide 94
94
Slide 95
95
Slide 96
96
Slide 97
97
Slide 98
98
Slide 99
99
Slide 100
100
Slide 101
101
Slide 102
102
Slide 103
103
Slide 104
104
Slide 105
105
Slide 106
106
Slide 107
107
Slide 108
108

About This Presentation

Ce cours s'approfondit dans les aspects critiques de la Qualité de Service (QoS) dans les réseaux de données et voix mobiles. Les étudiants exploreront les principes fondamentaux, les techniques et les défis associés à la garantie d'une prestation de service de haute qualité dans les...


Slide Content

IP QoS PrinciplesIP QoS Principles
Theory and Practice
Dimitrios Kalogeras

A Bit of History
The Internet, originally designed for U. S. government
use, offered only one service level: Best Effort.
–No guarantees of transit time or delivery
–Rudimentary prioritization was available, but it was rarely used.
Commercialization began in early 1990’s
–Private (intranet) networks using Internet technology appeared.
–Commercial users began paying directly for Internet use.
–Commerce sites tried to attract customers by using graphics.
–Industry used the Internet and intranets for internal, shared
communications that combined previously-separate, specialized
networks -- each with its own specific technical requirements.
–New technologies (voice over the Internet, etc.) appeared,
designed to capitalize on inexpensive Internet technologies.

The Demands on Modern Networks
Network flexibility is becoming central to enterprise strategy
–Rapidly-changing business functions no longer carried out in stable
ways, in unchanging locations, or for long time-periods
–Network-enabled applications often crucial for meeting new market
opportunities, but there’s no time to custom-build a network
Traffic is bursty
Interactive voice, video applications have stringent
bandwidth and latency demands
Multiple application networks are being combined into
consolidated corporate utility networks
–Bandwidth contention as critical transaction traffic is squeezed by
web browsing, file transfers, or other low-priority or bulk traffic
–Latency problems as interactive voice and video are squeezed by
transaction, web browsing, file transfer, and bulk traffic

Definitions
Quality of Service (QoS) classifies network traffic and
then ensures that some of it receives special handling.
–May track each individual dataflow (sender:receiver) separately.
–May include attempts to provide better error rates, lower network
transit time (latency), and decreased latency variation (jitter).
Differentiated Class of Service (CoS) is a simpler
alternative to QoS.
–Doesn't try to distinguish among individual dataflows; instead, uses
simpler methods to classify packets into one of a few categories.
–All packets within a particular category are then handled in the
same way, with the same quality parameters.
Policy-Based Networking provides end-to-end control.
–The rules for access and for management of network resources
are stored as policies and are managed by a policy server.

5
QoS Background
Video Streaming Services
Video Conferencing
VoIP
Legacy SNA / DLSw
QoS development inspired by new types of applications in IP environment:

6
QoS Architecture Models
Best Effort Service
Integrated Service
Differentiated Service

7
Best Effort Service
What exactly IP does:
All packets treated equally
Unpredictable bandwidth
Unpredictable delay and jitter

8
IntServ (RFC1633)

9
DiffServ (RFC2474/2475)

10
QoS Architecture Components
Classification
Coloring
Admission Control
Traffic Shaping/Policing
Congestion Management
Congestion Avoidance
Signaling

Statistical Behavior: Random
Arrival
In random arrival, the time that each packet arrives is
completely independent of the time that any other packet
arrives.
–If the true situation is that arrivals tend to be evenly spaced, then
random arrival calculations will overestimate the queuing delay.
–If the true situation is that arrivals are bunched in groups (typical of data
flows, such as packets and acknowledgements), then random arrival
calculations will underestimate the queuing delay.
Our intuition is usually misleading when we think of random
processes.
–We tend to assume that queue size increases linearly as the number of
customers increases.
–But, with random arrival, there is a drastic increase in queue size as the
customer arrival rate approaches 80% of the theoretical server capacity.
There’s no way to store the capacity that is unused by late customers,
but early customers increase the queue.

Random Arrival and Intuition
The surprising increase in queue length is best
shown by a graph:
Q
u
e
u
e

L
e
n
g
t
h
System Capacity
20% 40% 60% 80%
Actual
Intuitive

Random Arrival vs. Self-Similar
Although random arrival is very convenient mathematically (it’s
relatively simple to do random arrival calculations), it has been
shown that much data traffic is self-similar.
–Ethernet and Internet traffic flows, in particular, are self-similar.
–The rate of initial connections is still random, however.
Self-similar traffic shows the same pattern regardless of
changes in scale.
–Fractal geometry (e.g., a coastline) is an example.
Self-similar traffic has a heavy tail.
–The probabilities of extremely large values (e.g., file lengths of a
gigabyte or more) don’t decrease as rapidly, as they would with random
distributions of file lengths.
–This matches real data traffic behaviors.
Long file downloads mixed with short acknowledgements
Compressed video with action scenes mixed with static scenes

14
Traffic Classification
Most fundamental QoS building block
The component of a QoS feature that recognizes
and distinguishes between different traffic
streams
Without classification, all packets are treated the
same

15
Traffic Classification/
Admission Control Issues
Always performed at the network perimeter
Makes traffic conform to the internal network
policy
Marks packets with special flags (colors)
Colors used afterwards inside the network for
QoS management

16
Classification/
Admission Control Scheme
Classifier
Meter
Marker
Shaper/
Policer
Packet
Admitted
Dropped

17
Classification Criteria
IP header fields
TCP/UDP header fields
Routing information
Packet Content (NBAR)
i.e. HTTP, HTTPS, FTP, Napster etc.

18
Traffic Coloring Options
IP Precedence
DSCP
QoS Group
802.1p CoS
ATM CLP
Frame Relay DE

19
Type-of-Service (RFC791)
Version Length Total Length
80 15 31
Precedence UnusedD T R
0 1
D
Normal Delay Low Delay
T
Normal Throughput High Throughput
R
Normal Reliability High Reliability
ToS Field

20
IP Precedence Values
111 Network Control
110 Internetwork Control
101 Critical
100 Flash Override
011 Flash
010 Immediate
001 Priority
000 Routine

21
DSCP
Diffserv Code Point
DSCP (6 bits) Unused
Class 1 Class 2 Class 3 Class 4
Low Drop
Precedence
001010 010010 011010 100010
Medium Drop
Precedence 001100 010100 011100 100100
High Drop
Precedence 001110 010110 011110 100110

22
Classification mechanisms
MQC ( Modular Qos Command Line Interface)
CAR ( Commited Access Rate)

23
Modular QoS CLI
Modular QoS CLI (MQC)
Command syntax introduced in 12.0(5)T
Reduces configuration steps and time
Uniform CLI across all main Cisco IOS-based
platforms
Uniform CLI structure for all QoS features

24
Basic MQC Commands
class-map [match-any | match-all] class-name
router(config)#
•1. Create Class Map - a traffic class ( match access list, input
interface, IP Prec, DSCP, protocol (NBAR) src/dst MAC address, mpls
exp).
policy-map policy-map-name
router(config)#
•2. Create Policy Map (Service Policy) - Associate a
class map with one or more QoS policies (bandwidth, police, queue-
limit, random detect, shape, set prec, set DSCP, set mpls exp).
service-policy {input | output} policy-map-name
router(config-if)#
•3. Attach Service Policy - Associate the policy map with an
input or output interface.

25
1. Create Class Map – defines traffic selection criteria
Router(config)# class-map class1
Router(config-cmap)# match ip precedence 5
Router(config-cmap)# exit
Router(config)# policy-map policy1
Router(config-pmap)# class class1
Router(config-pmap-c)# set mpls experimental 5
Router(config-pmap-c)# bandwidth 3000
Router(config-pmap-c)# queue-limit 30
Router(config-pmap)# exit
Router(config)# interface e1/1
Router(config-if)# service-policy output policy1
Router(config-if)# exit
2. Create Policy Map- associates classes with actions
3. Attach Service Policy – enforces policy to interfaces
Basic MQC Commands

26
Classification Configuring Sample
class-map match-all premium
match access-group name premium
!
class-map match-any trash
match protocol napster
match protocol fasttrack
!
policy-map classify
class premium
set ip precedence priority
class trash
police 64000 conform-action set-prec-transmit 1
excess-action drop
!
ip access-list extended premium
permit tcp host 10.0.0.1 any eq telnet
!
interface serial 2/1
ip unnumbered loopback 0
service-policy input classify
Traffic class definitions
QoS policy definition
QoS Policy attached
to interface
ACL definition
MQC based IOS 12.1(5)T

27
Classification Configuring Sample
ip cef
!
interface serial 2/1
ip unnumbered loopback 0
rate-limit input access-group 100 64000 8000 8000
conform-action set-prec-transmit 1 exceed-action
set-prec-transmit 0
!
access-list 100 permit tcp host 10.0.0.1 any eq http
CAR definition
ACL definition
CAR based

28
Classification Configuring Sample
route-map classify permit 10
match ip address 100
set ip precedence flash
!
route-map classify permit 20
match ip next-hop 1
set ip precedence priority
!
interface serial 2/1
ip unnumbered loopback 0
ip policy route-map classify
!
access-list 1 permit 192.168.0.1
access-list 100 permit tcp host 10.0.0.1 any eq http
Route-map definitions
ACL definitions
Route-map based
Route-map attached
to interface

29
Shaping/Policing
Used to assign more predictive behavior to traffic
Uses Token Bucket model

30
Token Bucket Model
Token Bucket main parameters:
Token Arrival Rate - v
Bucket Depth - Bc
Time Interval – tc
Link Capacity - C Overflow Tokens
Tokens
Incoming
packets
Conform
Exceed
Bc
v
C
Token Bucket characterizes traffic source
tc = Bc/v

31
Token Bucket Model
Bucket is being filled with tokens at a rate v token/sec.
When bucket is full all the excess tokens are discarded.
When packet of size L arrives, bucket is checked for
availability of corresponding amount of tokens.
If several packets arrive back-to-back and there are
sufficient tokens to serve them all, they are accepted at
peak rate (usually physical link speed).
If enough tokens available, packet is optionally colored
and accepted to the network and corresponding amount of
tokens is subtracted from the bucket.
If not enough tokens, special action on packet is
performed.

32
Token Bucket Model
Actions performed on nonconforming packets:
Dropped (Policing)
Delayed in queue either FIFO or WFQ (Shaping)
Colored/Recolored

33
Token Bucket Model
Bucket depth variation effect:
Bc = 0Constant Bit Rate (CBR)
BcNo Regulation
Bucket depth is characteristic of traffic burstiness
Maximum number of bytes transmitted over period of time t:
A(t)
max = Bc+v·t

34
Excess Burst (Be)
Cisco Implementation
GTS ( Generic Traffic Shaping)
If during previous tc
n-1 interval bucket Bc was not depleted (there is
no congestion), in the next interval tc
n Bc+Be bytes are available for
burst.
In frame relay implementations packets admitted via Be tokens are
marked with DE bit.

35
Excess Burst (Be)
Cisco Implementation
CBTS (Class Based Traffic Shaping)
allows higher throughput in uncongested environment up to peak
rate calculated as
v
Peak
= v
CIR
(1+Be/Bc)
Peak rate can be set up manually.

36
Excess Burst (Be)
Cisco Implementation
CAR
allows RED like behavior:
traffic fitting into Bc always conforms
traffic fitting into Be conforms with probability proportional to
amount of tokens left in the bucket
traffic not fitting into Be always exceeds
CAR uses the following parameters:
t – time period since the last packet arrival
Current Debt (D
cur
) – Amount of debt during current time interval
Compound Debt (D
comp) – Sum of all D
cur since the last drop
Actual Debt (D
act) – Amount of tokens currently borrowed

37
Excess Burst (Be)
Cisco Implementation
CAR Algorithm
Packet of length
L arrived
Bc
cur
– L > 0
Conform
Action
Y
D
cur
= L - Bc
cur
Bc
cur
= 0
D
comp
= D
comp
+ D
cur
D
act = D
act + D
cur
+v·t
N
D
act
> Be
Y
N
Exceed
Action
D
comp
> Be
Y
N
D
comp
= 0
Bc
cur
= Bc
cur
– L

38
Shaping Configuration Sample
interface serial 2/1
ip unnumbered loopback 0
traffic-shape rate 64000 8000 1000 256
!
interface serial 2/2
ip unnumbered loopback 0
traffic-shape group 100 64000 8000 8000 512
!
access-list 100 permit tcp host 10.0.0.1 any eq http
GTS Based
Shaper Definitions
ACL definition
Shaper can be only used to control egress traffic flow!

39
Policing Configuration Sample
ip cef
interface serial 2/1
ip unnumbered loopback 0
rate-limit output access-group 100 64000 8000 16000
conform-action transmit excess-action drop
!
interface serial 2/2
ip unnumbered loopback 0
rate-limit input 128000 16000 32000 conform-action
transmit excess-action drop
!
access-list 100 permit tcp host 10.0.0.1 any eq http
CAR Based
CAR Definitions
ACL definition
Policer can be used to control ingress traffic flow!
IOS 12.0(5)T

40
Shaping/Policing Configuration
Sample
class-map match-all policed
match protocol http
class-map match-all shaped
match access-group name ftp-downloads
!
policy-map bad-boy
class policed
police 64000 8000 8000 conform-action transmit
exceed-action drop
class shaped
shape average 128000
!
interface serial 2/1
ip unnumbered loopback 0
service-policy output bad-boy
!
ip access-list extended ftp-downloads
permit tcp any eq ftp-data any
MQI Based
ACL definition
Class definitions
IOS 12.1(5)T
QoS policy definition
QoS Policy attached
to interface

41
CAR Policing Problem
Why cannot my traffic reach CIR value?
Cause: Improper setting of Bc and Be values
CAR is aggressive, as drops excessive packets and the lost data needs to
be retransmitted by upper layers (mainly TCP) after timeout. This also
causes TCP to shrink its window reducing flow throughput.
Cisco Systems recommends the following settings:
Bc = 1.5
x
CIR/8
Be = 2
x
Bc

42
Congestion ManagementCongestion Management

43
Queuing
Traffic burst may temporarily exceed
interface capacity
Without queuing this excess traffic will
be lost
Queuing allows bursty traffic to be
transmitted without drops
Queuing strategy defines order in
which packets are transmitted through
egress interface
Queuing introduced additional delay
which signals to adaptive flows (like
TCP) to back off their throughput

44
Queuing Algorithms
FIFO
Priority (Absolute)
Weighted Round Robin (WRR)
Fair

45
FIFO
Simplest queuing method with the least CPU
overhead
No congestion control
Transmits packets in the order of arrival
High volume traffic can suppress interactive flows
Default queuing for interfaces > 2Mbps (i.e. Ethernet)

46
FIFO
FIFO average queue depth dependence on load

47
Absolute Priority Queuing
Generic Priority Queuing
Custom Queuing
RTP Priority Queuing
Low Latency Queuing (LLQ)

48
Simplest QoS Algorithm: Priority
Queuing
Stated requirement:
–“If <application> has traffic waiting,
send it nextsend it next”
Commonly implemented
–Defined behavior of IP precedence

49
Priority Queuing Implementation
Approach
Identify interesting traffic
–Access lists
Place traffic in various queues
Dequeue in order of queue precedence

50
Priority Queuing (PQ)
Traffic
Destined
for Interface
Classification by:
•Protocol (IP, IPX, AppleTalk,
SNA, DecNet, Bridge, etc.)
•Incoming Interface
(EO, SO, S1, etc.)
Interface Buffer
Resources
Transmit
Queue
Output
Line
Interface Hardware
•Ethernet
•Frame Relay
•ATM
•Serial Link
•Etc.
High
Medium
Normal
Low
Q Length Defined
by Q Limit
ClassifyClassify
Absolute Priority
Scheduling

51
Priority Queuing Scheme
High Empty?
Send packet
from High
Medium Empty? Normal Empty?
Send Packet
from Medium
Send Packet
from Normal
Send Packet
from Low
Low Empty?
Y Y Y Y
N N N N

52
Generic PQ Drawbacks
Needs thorough admission control
No upper limit for each priority level
High risk of low priority queues` starvation effect

53
Generic PQ Configuration Sample
priority-list 1 protocol ip high tcp telnet
priority-list 1 protocol ip high list 100
priority-list 1 protocol ip medium lt 1000
priority-list 1 interface ethernet 0/0 medium
priority-list 1 default low
!
interface serial 2/1
ip unnumbered loopback 0
priority-group 1
!
access-list 100 permit tcp host 10.0.0.1 any eq http
PQ Definition
ACL definition
PQ Attached
to Interface

54

Custom Queuing (CQ)
(Weighted Round Robin)
Traffic
Destined
for Interface
Interface
Buffer
Resources
Q Length
Deferred by
Queue Limit
Up to 16
3/10
1/10
Weighted Round
Robin Scheduling
(byte count)
Classification by:
•Protocol (IP, IPX, AppleTalk,
SNA, DecNet, Bridge, etc.)
•Incoming interface
(EO, SO, S1, etc.)
Allocate
Proportion of
Link Bandwidth)
ClassifyClassify
Interface Hardware
•Ethernet
•Frame Relay
•ATM
•Serial Link
•Etc.
2/10
3/10
2/10
Link
Utilization
Ratio
Transmit
Queue
Output
Line

55
WRR Drawbacks
Unpredictable jitter
Fairness significantly depends on MTU and TCP
window size
Complex calculations to achieve desired traffic
proportions

56
CQ Byte-count Calculus
Distribute bandwidth to 3 queues with proportion x:y:z and packet sizes q
x, q
y, q
z.
1.Calculate a
x=x/q
x, a
y=y/q
y, a
z=z/q
z.
2.Normalize and round a
x
, a
y
, a
z
.
a
x
’= round(a
x
/min(a
x
, a
y
, a
z
)); a
y
’= round(a
y
/min(a
x
, a
y
, a
z
)); a
z
’= round(a
z
/min(a
x
, a
y
, a
z
)).
3.Convert obtained packet proportion into byte count
bc
x = a
x’·q
x; bc
y = a
y’·q
y; bc
z = a
z’·q
z.
4.Actual bandwidth share of i-th queue can be calculated with the following formula:
5.For better approximation obtained byte-counts can be multiplied by some positive whole
number.
Starting with IOS 12.1 CQ employs Deficit Round Robin
algorithm and there is no need in such byte-count tuning.
C
bc
bc
share
n
j
j
i
i


1

57
CQ Configuration Sample
queue-list 1 protocol ip 1 tcp telnet
queue-list 1 protocol ip 2 list 100
queue-list 1 protocol ip 3 udp 53
queue-list 1 interface ethernet 0/0 4
queue-list 1 queue 1 byte-count 3000
queue-list 1 queue 2 byte-count 4500
queue-list 1 queue 3 byte-count 3000
queue-list 1 queue 4 byte-count 1500
queue-list 1 default 4
!
interface serial 2/1
ip unnumbered loopback 0
custom-queue-list 1
!
access-list 100 permit tcp host 10.0.0.1 any eq http
CQ List Definition
ACL Definition
CQ Attached
to Interface

58
“Bitwise Round Robin” Fair Queuing
Keshav, Demers, Shenker, and Zhang
Simulates a TDM
One flow per channel
Time Division
Multiplexer
TDM Model

59
TDM Message Arrival Sequence
66 44 11
33
55 22
Time Division
Multiplexer

60
TDM Message Delivery Sequence
55 44 11
22
66 33
Time Division
Multiplexer

61
Fair Queuing Algorithm
Employs virtual bit-by-bit round robin model (BRR)
)(tNt
R
ac





iii PtRtR  )()(
0
BRR dynamics are described by the equation:
i-th packet from flow  arriving at time t
0 is services at time t :
Servicing of i-th packet from flow  will start at S
i

and finish at F
i

:
))(,(
1

iii tRFMAXS


iii PSF 
Additional  parameter is added for priority assignment to inactive flows :
))(,(
1 


 iii tRFMAXB
Packets are ordered for transmission according to B
i

values.

62
Fair Queuing Approach
Enqueue traffic in the sequence
the TDM would deliver it
As a result, be as fair as the TDM

63
Effects of Fair Queuing
Low-bandwidth flows get
–As much bandwidth as they can use
–Timely service
High-bandwidth flows
–Interleave traffic
–Cooperatively share bandwidth
–Absorb latency

64
What Weighting Does
In TDM
–Channel speed determines message “duration”
In WFQ
–Multiplier on message length changes
simulated message “duration”
Result:
–Flow’s “fair” share predictably unfair

65
Weighted Fair Queuing (WFQ)
Traffic
Destined
for Interface
Interface
Buffer
Resources
Configurable
Number of
Queues
Flow-Based Classification by:
•Source and destination address
•Protocol
•Session identifier (port/socket)
Weight Determined by:
•Requested QoS (IP Procedure, RSVP)
•Frame Relay FECN, BECN, DE
(For FR Traffic)
•Flow throughput (weighted-fair)
Weighted Fair
Scheduling
ClassifyClassify
Transmit
Queue
Output
Line

66
Weighted Fair Queuing (WFQ)
Fair bandwidth per flow allocation
Low delay for interactive applications
Protection from ill-behaved sources

67
Weighted Fair Queuing (WFQ)
Flow classified by the following fields:
Source address
Source port
Destination address
Destination port
ToS
Weight of each flow (queue) depends on ToS:
weight = 1/(precedence+1)
Bandwidth distributed in 1/weight proportions

68
Weighted Fair Queuing (WFQ)
Packets are ordered according to the expected virtual departure time
of their last bit.
Low volume flows have preference over high volume transfers.
Low volume flow is identified as using less than its share of
bandwidth.
The special queue length threshold value is established, after which
only low volume flows can enqueue. All the packets, that belong to
high volume flows are dropped.

69
Drawbacks of Weighted Fair
Queuing
Requires more sorting
than other approaches

70
Weighted Fair Queuing (WFQ)
FTP
Telnet
t
D
e
l
a
y

71
Weighted Fair Queuing (WFQ)
FTP
Telnet
t
D
e
l
a
y

72
WFQ Configuration Sample
interface serial 2/1
ip unnumbered loopback 0
fair-queue 32 128 0
Queue Threshold
(packets)
Maximal number
of queues
Number of
reservable queues

73
RTP Priority Queuing
Classifies only by UDP port range
Only even ports from the range are classified
Establishes upper limit via integrated policer
Excess traffic dropped during congestion periods
RTP PQ has priority over LLQ

74
RTP PQ Configuration Sample
interface serial 2/1
ip unnumbered loopback 0
ip rtp priority 16384 16383 256
Starting UDP port
Range length
Bandwidth Limit
(kbps)

75
Low Latency Queuing (LLQ)
Implemented using MQI
Very rich classification criteria (class-map)
Establishes upper limit via integrated policer
Excess traffic dropped during congestion periods

76
LLQ Configuration Sample
class-map match-all voice
match access-group name voip
!
policy-map llq
class voip
priority 30
class class-default
fair-queue 64
!
interface serial 2/1
ip unnumbered loopback 0
service-policy output llq
!
ip access-list extended voip
permit ip host 10.0.0.1 any
ACL definition
Class definitions
IOS 12.0(5)T
LLQ policy definition
LLQ Policy attached
to interface

77
Class Based WFQ (CBWFQ)
Based on the same algorithm as WFQ
Weights can be manually configured
Allows to easily specify guaranteed bandwidth
for a class
Configuration based on Cisco MQI

78
CBWFQ Configuration Sample
class-map match-all premium
match access-group name premium-cust
class-map match-all low-priority
match protocol napster
!
policy-map cbwfq-sample
class premium
bandwidth 512
class low-priority
shape average 128
shape peak 512
class class-default
fair-queue 64
!
interface serial 2/1
ip unnumbered loopback 0
max-reserved-bandwidth 85
service-policy output cbwfq-sample
!
ip access-list extended premium-cust
permit ip host 10.0.0.1 any ACL definition
Class definitions
IOS 12.0(5)T
Qos policy definition
QoS Policy attached
to interface

79
CBWFQ Configuration Sample
class-map match-all premium
match access-group name premium-cust
class-map match-all voice
match ip precedence flash
!
policy-map total-shaper
class class-default
shape average 1536
service-policy class-
policy
policy-map class-policy
class premium
bandwidth 512
class voice
priority 64
class class-default
fair-queue 128
IOS 12.1(5)T
Hierarchical Design
interface fastethernet 1/0
ip unnumbered loopback 0
max-reserved-bandwidth 85
service-policy output total-shaper
!
ip access-list extended premium-cust
permit ip host 10.0.0.1 any

80
Hierarchical CBWFQ Limitations
Only two levels of hierarchy are supported
set command not supported in child policy
Shaping allows only in parent policy
LLQ can be configured only either in child or
parent policies but not in both
FQ allowed only in child policy

81
Congestion AvoidanceCongestion Avoidance

82
Global Synchronization Effect
L
o
a
d
t
Link Capacity
Avg. Throughput

83
Tail Drop and TCP Flow Control
Packet drops from all TCP sessions
simultaneously
High probability of multiple drops from the same
TCP session
Uniformly distributed drops from high volume and
interactive flows
Result: Low average throughput!

84
Random Early Detection (RED)
Starts randomly dropping packets before actual
congestion occurs
Keeps average queue depth low
Increases average throughput
Developed by Van Jacobson in 1993

85
Global Synchronization Removed
L
o
a
d
t
Link Capacity
Avg. Throughput

86
Random Early Detection (RED)
p
1
0
q
avg
q
max
Tail Drop
p
1
0
q
avg

max

min

RED
Adjustable

87
Random Early Detection (RED)

min – Minimal threshold after which RED starts packet drops.
Minimal recommended value is 5 packets.

max
– Maximal threshold after which all packets are dropped.
Recommended value is 2-3 times 
min
.
 - Mark probability denominator denotes packet drop probability
at 
max average queue depth. Optimal value – 0.1 .
 - Exponential weighting factor determines the level of
backward value-dependence in average queue depth
calculation:
q
avg = (q
old · (1 - 2
-
)) + (q
cur · 2
-
)
General recommendation  = 9.
RED Parameters:

TCP Rate Control - 1
In TCP, the spacing of ACKs and the window size in the
ACKs controls the transmitter’s rate.
Rate Control manipulates the ACKs as they pass through
the rate control device by:
–Adjusting the size of TCP ACK window
–Inserting new ACKs
–Re-spacing existing ACKs
Rate Control works only with TCP; other methods, such
as Token Bucket, must be used with UDP.
Rate Control violates the protocol layering design, as it
allows network devices to manipulate a higher-layer
protocol’s operation. Nevertheless, it usually functions
well and provides fine-grained control.

TCP Rate Control - 2
Example:
window: 8000
window: 2000
window: 2000
window: 2000
window: 2000
Transmitter Rate-control device Receiver

90
Weighted Random Early Detection
(WRED)
Modified version of RED
Weights determine the set of parameters: 
min ,

max and  .
Weight depends on ToS field value
Interactive flows are preserved

91
WRED Configuration Sample
interface serial 2/1
ip unnumbered loopback 0
random-detect
random-detect 0 32 64 20
random-detect 1 32 64 20
random-detect 2 32 64 20
random-detect 3 32 64 20


min

Interface based

max

92
WRED Configuration Sample
policy-map red
class class-default
random-detect
random-detect 0 32 64 20
random-detect 1 32 64 20
random-detect 2 32 64 20
random-detect 3 32 64 20

interface Serial2/1
ip unnumbered loopback 0
service-policy output red

min

MQI based

max
WRED is incompatible with LLQ feature!

93
Link OptimizationLink Optimization

94
Link Fragmentation and
Interleaving (LFI)
Voice
Packet
Jumbogram
64 kbps
1500 bytes  190ms
For links < 128kbps

95
Link Fragmentation and
Interleaving (LFI)
64 kbps
Supported interfaces:
Multilink PPP
Frame Relay DLCI
ATM VC

96
LFI Configuration Sample
interface virtual-template 1
ip unnumbered loopback 0
ppp multilink
ppp multilink interleave
ppp multilink fragment-delay 30
ip rtp interleave 16384 1024 512

MLP version

97
SignalingSignaling

98
Resource Reservation Protocol
(RSVP)
End-to-end QoS signaling protocol
Used to establish dynamic reservations over the
network
Always establishes simplex reservation
Supports unicast and multicast traffic
Actually uses WFQ and WRED mechanisms

99
Resource Reservation Protocol
(RSVP)

10
0
Resource Reservation Protocol
(RSVP)

10
1
Resource Reservation Protocol
(RSVP)
Reservation Types:
Guaranteed Rate (uses WFQ and LLQ)
Controlled Load (uses WRED)
Distinct Shared
ExplicitFixed Filter (FF)Shared Explicit (SE)
Wildcard X Wildcard Filter (WF)

10
2
Resource Reservation Protocol
(RSVP)

10
3
QoS Policy Propagation over BGP
QoS policy can be shared inside single AS or
among different ASs.
Community attribute is usually used for color
assignments
Prevents manual policy changes in network
devices

10
4
QoS Policy Propagation over BGP

10
5
QPPB Configuration Sample
ip bgp-community new-format
!
router bgp 10
neighbor 10.0.0.1 remote-as 20
neighbor 10.0.0.1 send-community
neighbor 10.0.0.1 route-map cout out
!
route-map cout permit 10
match ip address 20
set community 60:9
!
access-list 20 permit 192.168.0.0
0.0.0.255
Router A
ip bgp-community new-format
!
router bgp 20
neighbor 10.0.0.2 remote-as 10
table-map mark-pol
!
route-map mark-pol permit 10
match community 1
set ip precedence flash
!
ip community-list 1 permit 60:9
!
interface Serial 0/1
ip unnumbered loopback 0
bgp-policy source ip-prec-map
Router B

10
6
Topics not Covered
Multiprotocol Label Switching (MPLS)
Frame Relay QoS
ATM QoS
Distributed Queuing Algorithms
Multicast

10
7
Conclusion
QoS is not an exotic feature any more
QoS allows specific applications (VoIP, VC) to
share network infrastructure with best-effort
traffic
QoS in IP networks simplifies their
functionality avoiding Frame Relay and ATM
usage

10
8
??
Questions???
Tags