Professional Documents
Culture Documents
Mechanisms
Network telephony
Interactive applications
Transaction applications
interface Ethernet0/0
ip policy route-map lab
Two functions
Packet ClassificationIP precedence
and QoS group setting
Access Bandwidth Management
through rate limiting
Traffic Traffic
Action
Matching Measurement
Policy
Specification Instrumentation
Recolor
Drop
Drop Multimedia
Recolor
Mission-Critical
Per Application CAR
Classify
No Match
Configured
Queuing (e.g.
WFQ, CQ, etc.)
TS
SubIntf 1.2 Output
CIR=48 kbps Interleaving
Dual fifo if
Output FRF12
Shaping Queue
Interface
FIFO, LLQ FIFO, WFQ
Packet path:
When a packet arrives at the interface for transmission, the following happens:
if the SHAPING queue is empty, the arriving packet is processed by the traffic
shaper.
1. If possible, the traffic shaper sends the packet to the OUTPUT queue.
(Means if number of bits allowed during Tc is not reached)
2. Otherwise, the packet is placed in the SHAPING queue and sent in next Tc.
If the SHAPING queue is not empty, the packet is placed in the shaping queue.
When there are packets in the SHAPING queue, the traffic shaper removes the number of
packets it can transmit from the SHAPING queue every time interval.
Packets Enough
token in YES: Conform
arriving
bucket ? (transmit at line rate)
Policing
Traffic
Traffic
Time Time
Shaping
Traffic
Traffic
Traffic Rate
Traffic Rate
Time Time
Forwarder
Interface Yes
Congested?
FIFO/PQ/CQ/WFQ (output hold-queue
interface hold compromise latency/
No buffering )
Tx-Queues
Transmission
Tx-ring Always FIFO Queue (tx-ring)
(high-end txq=2+ BW/512k)
(in particles or packets, platform dependant !) When intf queue doesnt use FIFO
CSCdk17210, CSCdm75220, CSCdk70536 TxQ is automatically reduced (based on intf BW)
Changed w/ Tx-ring-limit or in order to activate fancy queuing earlier
show vip tx-polling-high <interface> If configured too small (high level of interrupts)
<new-tx-polling-high>
If configured too large (high latency)
QoS mechanisms 2001, Cisco Systems, Inc. www.cisco.com 27
tx-ring vs tx-queue
Tx-ring is the driver queue (L2 queues)
Tx-queues used ONLY when tx-ring is full
(fancy queuing is activated L3 queues)
Tx-ring configurable (platform/adapter
dependant) high enough to accommodate
line rate, short enough to reduce latency
Tx-ring tuned automatically when fancy
queuing configured (CSCdk17210)
Tx-queue default 64 on low-end, default Bw/
4000 (min=2) on VIP (500ms for 250B)
QoS mechanisms 2001, Cisco Systems, Inc. www.cisco.com 28
First In First Out (FIFO)
Transmit
Queue
Output Line
Traffic
Destined Medium Transmit Output
for Interface Queue Line
Classify
Normal
Low
Q Length Defined
by Q Limit Absolute Priority
Scheduling
Interface Buffer
Classification by: Resources
Protocol (IP, IPX, AppleTalk,
SNA, DecNet, Bridge, etc.)
Incoming Interface
(EO, SO, S1, etc.)
Forwarder
Priority Classification
(Access)
List
Transmission
Queue
Up to 16
Link
Q Length Utilization Weighted Round
Deferred by Ratio Robin Scheduling
(byte count min
Queue Limit default 1500, each packet
started is sent)
Forwarder
Priority
(Access)
Control Traffic List
Queue #0
Queue #1 Queue #9
Queue #2 Queue #10
Queue #3 Queue #11
Queue #4 Queue #12
Queue #5 Queue #13
Queue #6 Queue #14
Queue #7 Queue #15
Queue #8 Queue #16
Transmission Queue
QoS mechanisms 2001, Cisco Systems, Inc. www.cisco.com 36
Custom Queuing
PQ CQ
4 Queues: High, Medium, 16 Queues
Normal, Low
Packets classified by protocol or
Packets classified by protocol interface
or interface
FIFO within priority
FIFO within priority
Weighted round robin
Absolute priority scheduling scheduling
Lower priority queues may WRED and RSVP not supported
starve
Guarantees BW per queue, not
delay
Q Classification:
Source address 1 1 Reserved queues
Dest address
...
Source port (RSVP and RTP Reserve)
Dest. Port 2 2 2
Tos bits (not prec!)
Weight: 3
IP Precedence ... IP Precedence 7
RSVP/RTP Reserve De-
W=32384/(prec+1) 4 4
queue
...
5 5
IP Precedence 0
...
F(A2)=100+20 A2[20]
F(B2)=350+300 F(A3)=120+10 A3 [10]
B2[300]
t 100 70 60 50 0
B2 B1 A3 A2 A1
4 4 4 4
Class queues
1 1 Max: 255 since 12.2(6) CSCdv49675
(256 including the default class-queue)
...
2 2 2
De-queue
3
Default class-queue
OR
5 5
Classify
...
WFQ System
6 6 6 (unclassified traffic)
Forwarder
Per flow
Class #1 (hash)
Class #2
Flow #3
Class #3
Flow #2
Class #64
Flow #1
Forwarder
Per flow
Class #1 (hash)
Class #2
Flow #256
Class #3
Flow #2
Class #63
PQ Flow #1
Priority Classes
priority and max BW (not limited to RTP flows)
burst size (200ms of traffic by default)
Expedite Forwarding class in diffserv model
low latency queuing classes
Only 1 fifo PQ (even if several priority classes !!)
CAR like policed if congestion (exept LLQ in
FR is ALWAYS policed but drop if congested)
WFQ LLQ
%BW min guarantee per
class
Shared BW, no guarantees Pclass, BW max allowed
Prec define weight, BW (CAR like limiting)
Packets Queue
Arriving
Queue
Pointer
Prec 0
Probability drop
of Packet profile
Discard Prec 1
Slope is
adjustable drop
profile
Queue Length
IP Prec 0 IP Prec 1
Max0/max 1
Min. Min.
Queue
100%
Utilization
Time
Tail Drop
Traffic
Destined Transmit Output
for Interface Queue Line
IP Voice
Jumbogram
WFQ
Large Packet
Multlink PPP Fragmentation:
with LFI Fragment Size Based
Or Frame on Required Delay
Realy with
FRF 11/12
QoS mechanisms 2001, Cisco Systems, Inc. www.cisco.com 65
LFI
Line overhead
Segmentation/reassembly overhead (ppp
multilink or FRF12 overhead)
Fragment all packets greater than fragment
size defined
Interleave packets from OTHER queues
QoS mechanisms 2001, Cisco Systems, Inc. www.cisco.com 67
PQ-WFQ for Frame Relay
Voice flow
Data flow
Inter-
WFQ leaving
Data flow de-queuing Fragmentation PVC A
Interface queues
Voice flow
High FIFO
Data flow PVC B
Inter-
WFQ Tx Ring
Data flow leaving
de-queuing Fragmentation Normal FIFO
Voice flow
BW PQ: yes
No No No Yes Yes
Guarantee WFQ: No
Implemented on PA-A3
(TX-queue per VC allows fancy queuing per VC)
Phase 1 - Per-VC WRED (single VC)
Phase 2 - Precedence Mapping (multiple VC)
Bundle Management
Phase 3 - Per-VC WFQ
VC2
VC3
No discard
Per-VC Per-VC on PA
WRED: Queues
Intelligent Discard
QoS mechanisms 2001, Cisco Systems, Inc. www.cisco.com 73
IP ATM COS-Ph2: Bundle
Two Modes:
Protected VC rule : when a protected VC goes
down, the bundle goes down
Protected group rule : when all members in the
protected group fail, the bundle is declared DOWN
When a bundle is declared down, no traffic is
forwarded out of the bundle
DSCP ECN
Former ToS byte = new DS field
Layer 3 !
IPV4! Standard IPV4/IPV6: Type of Service field!
Version! ToS!
Len! ID! offset! TTL! Proto! FCS! IP-SA! IP-DA! Data!
Length! 1 Byte!
IP Prec (3 bits)!
DSCP (6 bits)! ECN!
Assured Forwarding
Low Drop Med Drop High Drop
Pref Pref Pref
10 12 14
Class 1 AF11 AF12 AF13 001010 001100 001110
18 20 22
Class 2 AF21 AF22 AF23 010010 010100 010110
26 28 30
Class 3 AF31 AF32 AF33 011010 011100 011110
34 36 38
Class 4 AF41 AF42 AF43 100010 100100 100110
0
Best Effort BE 000000
QoS mechanisms 2001, Cisco Systems, Inc. www.cisco.com 83
DS field pools
DiffServ Code Points (DSCP) pools(RFC2474)
Router(config-pmap-c)#set ip dscp ?
<0-63> Differentiated services codepoint value
af11 Match packets with AF11 dscp (001010)
af12 Match packets with AF12 dscp (001100)
af13 Match packets with AF13 dscp (001110)
af42 Match packets with AF42 dscp (100100)
af43 Match packets with AF43 dscp (100110)
cs1 Match packets with CS1(precedence 1) dscp (001000)
cs2 Match packets with CS2(precedence 2) dscp (010000)
cs6 Match packets with CS6(precedence 6) dscp (110000)
cs7 Match packets with CS7(precedence 7) dscp (111000)
default Match packets with default dscp (000000)
ef Match packets with EF dscp (101110)
policy-map test
class PQ
bandwidth Bandwidth in kbps or percent/percent remaining
priority Strict Scheduling Priority for this Class+ burst
(default 200ms of traffic)
queue-limit Queue Max Threshold for Tail Drop
random-detect Enable WRED as drop policy
(IPprec or DSCP based) + ECN bits option
service-policy Configure QoS Service Policy-------> hierarchical
set Set QoS values (prec, DSCP,cos, exp, FRde, CLP)
shape Traffic Shaping: avg (CIR) or peak (CIR*(1+be/bc))
police traffic policing (conform, exeed, violate)
+2 rate policer + multiple actions
policy-map tcp-hierarchy
class http
bandwidth <bw specification>
class ftp
bandwidth <bw specification>
QoS mechanisms 2001, Cisco Systems, Inc. www.cisco.com 89
Hierarchical limitations
dWFQ supports
Flow-based WFQ
ToS-based
Qos group-based
dLLQ
Forwarder
Calendar Queues
Transmission Queue
Forwarder
lower 2bits
IP Prec-Based
Classifier
Weight
Calendar Queues
Transmission Queue
calendar has 4 default weighted classes (10,20,30,40%)
QoS mechanisms 2001, Cisco Systems, Inc. www.cisco.com 95
Qos group dWFQ
Forwarder
QoS group set using CAR or
QoS policy progation via BGP
Classifier
QOS-
Group Queue Queue Queue Queue
0 1 2 99
Queues
Weight
(1-100) Calendar Queues
Transmission Queue
Forwarder
Per class
(ACL)
Inbound
Traffic
Classifier Marker Conditioner Queuing
Stream
(from dCEF MDRR
ToFab F
CAR CAR
Select dest xACL
or or A
slot/intf) Policy Routing WRED
B
R
I
Meter C
Outbound FromFab
Traffic Queuing Conditioner Marker Classifier
Stream
W-RED MDRR
Output
Ports
Crossbar Switch Fabric
Alternate Priority
In Alternate Priority mode, service
alternates between the low-latency
queue and the other queues.
.. Remaining queues are serviced in
round robin fashion
0 1 2 3
IM IM IM IM
Ingress Demux
Packet Packet
Egress Mux
4 5 6 7
Headers In IM IM IM IM
Headers Out
8 9 10 11
IM IM IM IM
12 13 14 15
IM IM IM IM
Column Column
Memory Memory feedback
CEF
VTMS,
Accounting shaping,
ACLs, policing CBWFQ,
Classification WRED, LLQ
.
ATM
LSP TE
By default ingress IP prec copied in EXP labels (or manually set to n new cli
set mpls exp imposition n replace set mpls exp n)
Classification behavior on egress PE use DSCP
PHP should not be configured (use explicit-null) and use QOS group to map
EXP to QOS-group for egress PE classification based on EXP
in both the MPLS-to-MPLS and the MPLS-to-IP cases, the PHBs of the top-most
popped label is copied into the new top label or the IP DSCP if no label remains.
mpls propagate-cos CSCdv21062
Only works for 8 distinct PHBs. Requires specific mapping dscp->mpls-exp-
>dscp if the distinct PHBs are encoded using more than the 3 precedence bits
Egress PE classification based on IP DSCP
QoS mechanisms 2001, Cisco Systems, Inc. www.cisco.com 121
CoS transparency
Short-Pipe mode
the PHBs of the top-most popped label is copied into the new top label
but not copied in IP DSCP
Egress PE classification still based on IP DSCP
the PHBs of the top-most popped label is copied into the new top label but not
copied in IP DSCP
classification is based on mpls-exp field (use qos group) of the top-most
received MPLS frame
PHP should not be configured (use explicit-null)
MPLS MPLS
IP: MPLS exp 2
dscp exp 2 exp 2
5 IP: MPLS
IP: exp 2
dscp dscp
5 5 IP:
dscp
Push a Null-Label and 5
use its EXP field to
convey result of Copy EXP of popped Null-label
classification into EXP of pushed labels
Preserve DSCP
class-map AF1
class-map AF11 match qos-group 1
match mpls exp top 0