20080404 QoS Training

100
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Confidential Presentation_I D 1 QoS Juan Fco. Roco Systems Engineer Cisco Chile

Transcript of 20080404 QoS Training

Page 1: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 1

QoS

Juan Fco. RocoSystems Engineer

Cisco Chile

Page 2: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 2

Agenda

Introducción a QoS Caracterización de tráfico en redes convergentes Clasificación y marcado Traffic Policing Queuing & Scheduling Congestion Avoidance Traffic Shaping Otras herramientas Auto-QoS Recomendaciones

Page 3: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 3

Introducción a QoS

Page 4: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 4

Why Enable QoS?

Enables VoIP and IP telephony

Drives productivity by enhancing servicelevels to mission-critical applications

Cuts costs by bandwidth optimization

Helps maintain network availability in the event of DoS/worm attacks

Quality ofService

High Availability

Security

QoS

Page 5: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 5

Campus QoS ConsiderationsTypical Campus Oversubscription Ratios

Access

Distribution

Core

Typical 4:1

Oversubscription

Typical 20:1

Oversubscription

SiSiSiSiSiSi SiSiSiSiSiSi

SiSiSiSiSiSi SiSiSiSiSiSi

Page 6: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 6

Automating and Management

Cisco QoS Architectural Framework

Cisco QoS Tools

QoS for Convergence

QoS forTiered Services

QoS for Security

HybridStandards

DiffServStandards

IntServStandards

Pro

vis

ion

ing

/A

uto

-Pro

vis

ion

ing

Policing CongestionMgmt

Classificationand Marking

CongestionAvoidance

Link-Specific

Signaling

Ma

na

ge

me

nt

Te

ch

no

log

ies

Ma

na

ge

me

nt

Ap

pli

ca

tio

ns

Vo

ice

Vid

eo

Da

ta

Router Cisco

IOS® QoS

CoS, DSCP, MPLS EXP,

NBAR

Single-Rate,

Dual-Rate

LLQ, CBWFQ

WRED, ECN

Shaping, cRTP, LFI

RSVP

Cisco Catalyst

QoS

CoS,DSCP

Single Rate, Dual Rate, Microflow

1PxQyTWTD,

WRED, ECN

ShapingRSVP, COPS

Page 7: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 7

Quality of Service OperationsHow Do QoS Tools Work?

Classification and Marking

Queuing and (Selective) Dropping

Post-Queuing Operations

Page 8: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 8

Formas de configurar QoS

CLI

MQC

AutoQoS

QoS Policy Manager

Page 9: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 9

MQC

Modular

Separa clasificación depolíticas

Separa políticas deinterfaces

Estructura uniforme

Independiente de laplataforma

Page 10: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 10

AutoQoS

Disponible en switches y routers

Un solo comando habilita QoS para VoIP en un puerto, interfaz o PVC

Ej:Interface serial0

bandwidth 256

ip address 10.10.10.1 255.255.255.0

auto qos voip

Page 11: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 11

Caracterizacióndel tráfico en redesconvergentes

Page 12: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 12

Enabling QoS in the WAN

Loss DelayDelay

Variation(Jitter)

The Evils of Packet-Based Voice/Video

Page 13: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 13

Voice QoS RequirementsEnd-to-End Latency

Delay Target

Avoid the “Human Ethernet”

Time (msec)

0 100 200 300 400

CB Zone

Satellite Quality

Fax Relay, BroadcastHigh Quality

500 600 700 800

ITU’s G.114 Recommendation: ≤ 150msec One-Way Delay

Hello? Hello?

Page 14: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 14

Voice QoS RequirementsElements That Affect Latency and Jitter

Campus Branch Office

IP WAN

PSTN

End-to-End Delay (Must Be ≤ 150 ms)

20–50 ms

Jitter Buffer

Fixed (3.3 s/Km) +Network Delay

(Variable)

Propagationand Network

Variable

Serialization

Variable

Queuing

G.729A: 25 ms

CODEC

Page 15: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 15

Voice QoS RequirementsPacket Loss Limitations

Cisco DSP codecs can use predictor algorithms to compensate for a single lost packet in a row

Two lost packets in a row will cause an audible clip in the conversation

Voice

1

Voice

2

Voice

3

Voice

4

Voice

1

Voice

2

Voice

3

Voice

4

Voice

3

Voice

3

Voice

3

Voice

3Reconstructed Voice Sample

Page 16: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 16

Voice QoS RequirementsProvisioning for Voice

Latency ≤ 150 ms

Jitter ≤ 30 ms

Loss ≤ 1%

17–106 kbps guaranteed priority bandwidth per call

150 bps (+ layer 2 overhead) guaranteed bandwidth forvoice-control traffic per call

CAC must be enabled

• Smooth

• Benign

• Drop sensitive

• Delay sensitive

• UDP priority

VoiceOne-Way

Requirements

Page 17: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 17

“P” and “B” Frames128–256 Bytes

“I” Frame1024–1518

Bytes

“I” Frame1024–1518

Bytes

15pps

30pps

450Kbps

32Kbps

Video QoS RequirementsVideo Conferencing Traffic Example (384 kbps)

“I” frame is a full sample of the video

“P” and “B” frames use quantization via motion vectors and prediction algorithms

Page 18: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 18

Video QoS RequirementsProvisioning for Interactive Video

Latency ≤ 150 ms

Jitter ≤ 30 ms

Loss ≤ 1%

Minimum priority bandwidth guarantee required is

Video-stream + 10–20%

e.g., a 384 kbps stream could require up to 460 kbps of priority bandwidth

CAC must be enabled

VideoOne-Way

Requirements

• Bursty

• Drop sensitive

• Delay sensitive

• UDP priority

Page 19: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 19

Data QoS Requirements Provisioning for Data

Different applications have different traffic characteristics

Different versions of the same application can have different traffic characteristics

Classify data into four/five data classes model

Mission-critical apps

Transactional/interactive apps

Bulk data apps

Best effort apps

Optional: Scavenger apps

Data

• Smooth/bursty

• Benign/greedy

• Drop insensitive

• Delay insensitive

• TCP retransmits

Page 20: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 20

Scavenger-Class What Is the Scavenger Class?

The Scavenger class is an Internet 2 draft specification for a “less than best effort” service

There is an implied “good faith” commitment for the “best effort” traffic class

It is generally assumed that at least some network resources will be available for the default class

Scavenger class markings can be used to distinguish out-of-profile/abnormal traffic flows from in-profile/normal flows

The Scavenger class marking is CS1, DSCP 8

Scavenger traffic is assigned a “less-than-best effort” queuing treatment whenevercongestion occurs

Page 21: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 21

Enabling QoS in the CampusTraffic Profiles and Requirements

Latency ≤ 150 ms Jitter ≤ 30 ms Loss ≤ 1%One-Way Requirements

Smooth Benign Drop sensitive Delay sensitive UDP priority

Voice

Bandwidth per CallDepends on Codec,Sampling-Rate, and Layer 2 Media

Bursty Greedy Drop sensitive Delay sensitive UDP priority

Video-Conf

Latency ≤ 150 ms Jitter ≤ 30 ms Loss ≤ 1%One-Way Requirements

IP/VC has the SameRequirements as VoIP, but Has Radically DifferentTraffic Patterns (BW VariesGreatly)

Smooth/bursty Benign/greedy Drop insensitive Delay insensitive TCP retransmits

Data

Data Classes:Mission-Critical AppsTransactional/Interactive AppsBulk Data AppsBest Effort Apps (Default)

Traffic patterns for Data Vary Among Applications

Page 22: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 22

Clasificacióny Marcado

Page 23: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 23

Classification ToolsEthernet 802.1Q Class of Service

802.1p user priority field also called Class of Service (CoS)

Different types of traffic are assigned different CoS values

CoS 6 and 7 are reserved for network use

TAG4 Bytes

Three Bits Used for CoS(802.1p User Priority)

Data FCSPTSADASFDPream. Type

802.1Q/pHeader

PRI VLAN IDCFI

Ethernet Frame

1

2

3

4

5

6

7

0 Best Effort Data

Bulk Data

Critical Data

Call Signaling

Video

Voice

Routing

Reserved

CoS Application

Page 24: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 24

Classification ToolsIP Precedence and DiffServ Code Points

IPv4: three most significant bits of ToS byte are called IP Precedence (IPP)—other bits unused

DiffServ: six most significant bits of ToS byte are called DiffServ Code Point (DSCP)—remaining two bits used for flow control

DSCP is backward-compatible with IP precedence

7 6 5 4 3 2 1 0

ID Offset TTL Proto FCS IP SA IP DA DataLenVersion Length

ToSByte

DiffServ Code Point (DSCP) IP ECN

IPv4 Packet

IP Precedence UnusedStandard IPv4

DiffServ Extensions

Page 25: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 25

Classification ToolsDSCP Per-Hop Behaviors

IETF RFCs have defined special keywords, called Per-Hop Behaviors, for specific DSCP markings

EF: Expedited Forwarding (RFC3246)(DSCP 46)

CSx: Class Selector (RFC2474)Where x corresponds to the IP Precedence value (1–7)

(DSCP 8, 16, 24, 32, 40, 48, 56)

AFxy: Assured Forwarding (RFC2597)Where x corresponds to the IP Precedence value (only 1–4 are used for AF Classes)

And y corresponds to the Drop Preference value (either 1 or 2 or 3)

With the higher values denoting higher likelihood of dropping

(DSCP 10/12/14, 18/20/22, 26/28/30, 34/36/38)

BE: Best Effort or Default Marking Value (RFC2474)(DSCP 0)

Page 26: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 26

Classification and MarkingCisco Marking Recommendations

ApplicationL3 Classification

DSCPPHBIPP CoS

Transactional Data 18AF212 2

Call Signaling 24CS3*3 3

Streaming Video 32CS44 4

Video Conferencing 34AF414 4

Voice 46EF5 5

Network Management 16CS22 2

L2

Bulk Data 10AF111 1

Scavenger 8CS11 1

Best Effort 000 0

Routing 48CS66 6

Mission-Critical Data 26AF31*3 3

Page 27: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 27

Payload

Label Header

Label Header

Label Stack Layer-2 Header

Classification ToolsMPLS EXP Bits

Packet class and drop precedence inferred from EXP (three-bit) field

RFC3270 does not recommend specific EXP values for DiffServ PHB (EF/AF/DF)

Used for frame-based MPLS

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

Label EXP S TTL

MPLS Shim Header

EXP

Frame Encapsulation

3 2 1 0

MPLS EXP S

Page 28: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 28

Classification ToolsNetwork-Based Application Recognition

Identifies over 90 applications and protocols TCP and UDP port numbers

Statically assigned

Dynamically assigned during connection establishment

Non-TCP and non-UDP IP protocols

Data packet inspection for matching values

ToS SourceIP Addr

DestIP Addr

SrcPort Sub-Port/Deep Inspection

DstPort

Protocol

TCP/UDP Packet Data AreaIP Packet

Stateful and Dynamic Inspection

Page 29: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 29

Classification and Marking Design PrinciplesWhere and How Should Marking Be Done?

QoS policies (in general) should always be performed in hardware, rather than software, whenever a choice exists

Classify and mark applications as close to their sources as technically and administratively feasible

Use DSCP markings whenever possible

Follow standards-based DSCP PHBs to ensure interoperation and future expansion

RFC 2474 Class Selector Code Points

RFC 2597 Assured Forwarding classes

RFC 3246 Expedited Forwarding

Page 30: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 30

Clasificación (MQC)

class-map {match any | match all} class-map-name

match condition

ACL,IPP,DSCP,MPLS Exp,protocol (NBAR), CoS, interfaz entrada…

Ejemplo:

CAT2950(config)# class-map match-all AutoQoS-VoIP-RTP-Trust

CAT2950(config-cmap)# match ip dscp 46

CAT2950(config)# class-map match-all AutoQoS-VoIP-Control-Trust

CAT2950(config-cmap)# match ip dscp 24 26

show class-map

Page 31: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 31

Marcado (MQC)

policy-map policy-map-name class class-map-name

set DSCP nset COS m

(interface) service-policy {input|output} policy-map-name

Ejemplo:CAT2950(config)#policy-map UNTRUSTED-SERVERCAT2950(config-pmap)# class SAPCAT2950(config-pmap-c)# set ip dscp 18CAT2950(config)#interface FastEthernet0/1CAT2950(config-if)# service-policy input UNTRUSTED-SERVER

show policy-map

Page 32: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 32

Enabling QoS in the Campus Trust Boundary

A device is trusted if it correctly classifies packets

For scalability, classification should be done as close to the edge as possible

The outermost trusted devices represent the trust boundary

1 and 2 are optimal, 3 is acceptable (if access switch cannot perform classification)

Endpoints Access Distribution Core WAN Agg.

Trust Boundary

1

2

3

1 2 3

SiSi

SiSiSiSi

SiSi

Page 33: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 33

Enabling QoS in the Campus Scheduling in IP Phones

Voice media traffic is marked with CoS 5/ DSCP EF (high priority)

Data traffic from the PC is remarked with CoS 0 (low priority) by the IP phone switch; this occurs if PC tags frames as 802.1p/Q; phone switch transparent if PC frames untagged

P0P1

Priority Q

Data Qs

P2

VoiceCoS = 5CoS = 5

DataCoS = 0

P1 Untrusted:Phone Switch

Rewrites CoS = 0

PC

AccessSwitch

IP Phone Enclosure

Phone

P

P Trusted:Switch Accepts incoming CoS

Page 34: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 34

Trust QoS

Catalyst 2950/2960/3560/3750/6500mls qos trust device cisco-phone

mls qos trust cos

mls qos trust dscp

Catalyst 4500qos trust device cisco-phone

qos trust cos

qos trust dscp

QoS: debe ser habilitado: mls qos | qos

Page 35: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 35

Policing

Page 36: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 36

RFC 2697 Single Rate Three Color Policer

Action Action

Overflow

B<Tc B<Te

Conform Exceed Violate

CBS EBS

CIR

Yes Yes

No No

Action

Packet ofSize B

Page 37: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 37

Single rate policing (MQC)

Page 38: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 38

Single Rate, Single Token Bucket

Page 39: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 39

Single rate, dual bucket

Page 40: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 40

RFC 2698 Two Rate Three Color Policer

ActionAction

B>Tp B>Tc

ExceedViolate

PBS CBS

PIR

Yes Yes

No No

Conform

Action

Packet ofSize B

CIR

Page 41: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 41

Dual rate policing (MQC)

Page 42: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 42

Dual rate (MQC)

Page 43: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 43

Queuing &Scheduling

Page 44: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 44

Scheduling ToolsQueuing Algorithms

Congestion can occur at any point in the network where there are speed mismatches

Routers use Cisco IOS-based software queuingLow-Latency Queuing (LLQ) used for highest-priority traffic (voice/video)

Class-Based Weighted-Fair Queuing (CBWFQ) used for guaranteeing bandwidth to data applications

Cisco Catalyst switches use hardware queuing

Voice

Video

Data 33

2 2

1 1

Page 45: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 45

LLQ/CBWFQ

Page 46: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 46

Link Capacity = (Min BW for Voice + Min BW for Video + Min BW for Data)/0.75

Voice Is not Free—Especially on Low-Speed Links—Engineer the Network for Data, Voice, and Video

Enabling QoS in the WANProvisioning

Sum of Traffic = 75%

Link Capacity

Video

LLQ = 33%

Reserved

Voice/VideoControl

DataRouting,

Etc.Voice

Page 47: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 47

class-map class-default match any class-map match-all voice match ip dscp efClass-map match-all voice-control match ip dscp af31 ; or CS3!policy-map WAN class voice priority percent 17 class voice-control bandwidth percent 2 class class-default fair-queue!interface Serial0/1 ip address 10.1.6.2 255.255.255.0 bandwidth 128 no ip directed-broadcast service-policy output WAN!

Enabling QoS in the WANLLQ Example

LLQ

Classify

De-queue

2 2

33 3

class-map default = remaining

3 2 1 2 11128kbps

Class-Map Voice = 17%

Any Packet with DSCP = 46 (PHB=EF) Gets Assigned to a Class that Will Get a High Priority Queue with 17% Bandwidth

11PriorityQueue

CBWFQ

Page 48: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 48

Catalyst 2950

Page 49: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 49

Catalyst 2950/2960

Incoming CoS to internal DSCPmls qos map cos-dscp dscp1...dscp8 Switch(config)# mls qos map cos-dscp 10 15 20 25 30 35 40 45

Switch(config)# end

Switch# show mls qos maps cos-dscp

Incoming DSCP to CoS (to select queue)mls qos map dscp-cos dscp-list to cos Switch(config)# mls qos map dscp-cos 0 8 16 24 32 40 48 50 to 0

Switch(config)# end

Switch# show mls qos maps dscp-cos

Page 50: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 50

Catalyst 2950

Mapea DSCP (interno) a CoS

Cuatro colas de salida, basado en CoS:La cola 4 puede ser Expedita

(es servida antes que las otras)

Las colas restantes son Weighted Round Robin

Se evita la congestión con WRED (1000) y tail drop (1000/100/10)

Page 51: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 51

Catalyst 2950

Page 52: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 52

Catalyst 2960

Mapea DSCP (interno) a CoS Colas de entrada

Una cola expeditaUna cola SRR

Cola de salidaUna cola puede ser expeditaEl resto (3) es SRR

Shaped Round RobinShaped: estrictoShared: si otra cola no está usando, lo ocupa

Se evita la congestión con WTDCada cola tiene 3 umbrales: 2 son configurables como un porcentaje del buffer de la cola, el tercero es el 100% del buffer

Page 53: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 53

Catalyst 2960

Page 54: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 54

Catalyst 2960 - AutoQoS

Page 55: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 55

CongestionAvoidance

Page 56: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 56

Time

Bandwidth Utilization100%

Tail Drop

Three Traffic Flows Start at Different Times

Another Traffic FlowStarts at This Point

TCP Global Synchronization: The Need for Congestion Avoidance

All TCP flows synchronize in waves Synchronization wastes available bandwidth

Page 57: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 57

312302021201

TAIL DROP

3

3

3

WRED

01

0

1

0

3

Queue

Scheduling ToolsCongestion Avoidance Algorithms

Queueing algorithms manage the front of the queue Which packets get transmitted first

Congestion avoidance algorithms manage the tail ofthe queue

Which packets get dropped first when queuing buffers fill

Weighted Random Early Detection (WRED)WRED can operate in a DiffServ-compliant mode

Drops packets according to their DSCP markings

WRED works best with TCP-based applications, like data

Page 58: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 58

Scheduling ToolsDSCP-Based WRED Operation

AverageQueueSize

100%

0

DropProbability

BeginDropping

AF13

Drop AllAF11

Max QueueLength

(Tail Drop)

Drop AllAF12

Drop AllAF13

BeginDropping

AF12

BeginDropping

AF11

50%

AF = (RFC 2597) Assured Forwarding

Page 59: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 59

Traffic Shaping

Page 60: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 60

Traffic Shaping

Policers typically drop traffic

Shapers typically delay excess traffic, smoothing bursts and preventing unnecessary drops

Very common on Non-Broadcast Multiple-Access (NBMA) network topologies such as Frame Relay and ATM

With Traffic Shaping

Without Traffic ShapingLineRate

ShapedRate

Traffic Shaping Limits the Transmit Rate to a Value Lower Than Line Rate

Page 61: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 61

Otras herramientas

Page 62: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 62

Link-Fragmentation and Interleaving

Serialization delay is the finite amount of time required to put frames on a wire

For links ≤ 768 kbps serialization delay is a major factor affecting latency and jitter

For such slow links, large data packets need to be fragmented and interleaved with smaller, more urgent voice packets

Voice

Voice DataDataDataData

DataSerializationCan Cause

Excessive Delay

With Fragmentation and Interleaving Serialization Delay Is Minimized

Page 63: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 63

IP RTP Header Compression

cRTP reduces L3 VoIP BW by:~ 20% for G.711

~ 60% for G.7292–5

Bytes

RTP Header12 Bytes

VoicePayload

IP Header20 Bytes

UDP Header8 Bytes

Page 64: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 64

Handset

Multimedia Server

Multimedia Station

Handset

Reserve 16KBW on this Line

I Need 16KBW and

100 msec Delay

This App Needs16K BW and

100 msec Delay

Signaling ToolsResource Reservation Protocol (RSVP)

RSVP QoS services

Guaranteed service

Mathematically provable bounds on end-to-end datagram queuing delay/bandwidth

Controlled service

Approximate QoS from an unloaded network for delay/bandwidth

RSVP provides the policy to WFQ and LLQ

Page 65: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 65

AutoQoS

Page 66: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 66

Cisco Catalyst 2950 AutoQoS VoIP Model Example

Options:auto qos voip cisco-phone

auto qos voip cisco-softphone

auto qos voip trust

C2950(config-if)#auto qos voip cisco-phone

!wrr-queue bandwidth 10 20 70 1wrr-queue cos-map 1 0 1wrr-queue cos-map 2 2 4wrr-queue cos-map 3 3 6 7wrr-queue cos-map 4 5mls qos map cos-dscp 0 8 16 26 32 46 48 56!!interface FastEthernet0/1 mls qos trust device cisco-phone mls qos trust cos auto qos voip cisco-phone!

Page 67: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 67

!mls qos map cos-dscp 0 8 16 26 32 46 48 56mls qos srr-queue output cos-map queue 1 threshold 3 5mls qos srr-queue output cos-map queue 2 threshold 3 3 6 7mls qos srr-queue output cos-map queue 3 threshold 3 2 4mls qos srr-queue output cos-map queue 4 threshold 2 1mls qos srr-queue output cos-map queue 4 threshold 3 0mls qos srr-queue output dscp-map queue 1 threshold 3 40 41 42 43 44 45 46 47mls qos srr-queue output dscp-map queue 2 threshold 3 24 25 26 27 28 29 30 31mls qos srr-queue output dscp-map queue 2 threshold 3 48 49 50 51 52 53 54 55mls qos srr-queue output dscp-map queue 2 threshold 3 56 57 58 59 60 61 62 63mls qos srr-queue output dscp-map queue 3 threshold 3 16 17 18 19 20 21 22 23mls qos srr-queue output dscp-map queue 3 threshold 3 32 33 34 35 36 37 38 39mls qos srr-queue output dscp-map queue 4 threshold 1 8mls qos srr-queue output dscp-map queue 4 threshold 2 9 10 11 12 13 14 15mls qos srr-queue output dscp-map queue 4 threshold 3 0 1 2 3 4 5 6 7mls qos queue-set output 1 threshold 1 138 138 92 138mls qos queue-set output 1 threshold 2 138 138 92 400mls qos queue-set output 1 threshold 3 36 77 100 318mls qos queue-set output 1 threshold 4 20 50 67 400mls qos queue-set output 2 threshold 1 149 149 100 149mls qos queue-set output 2 threshold 2 118 118 100 235mls qos queue-set output 2 threshold 3 41 68 100 272mls qos queue-set output 2 threshold 4 42 72 100 242mls qos queue-set output 1 buffers 10 10 26 54mls qos queue-set output 2 buffers 16 6 17 61mls qos!!interface GigabitEthernet0/1 srr-queue bandwidth share 10 10 60 20 srr-queue bandwidth shape 10 0 0 0 queue-set 2 mls qos trust device cisco-phone mls qos trust cos auto qos voip cisco-phone!

CAT2970(config-if)#auto qos voip cisco-phone

Options:

auto qos voip cisco-phone auto qos voip cisco-softphone auto qos voip trust

Cat 2960/2970/3560/3750 AutoQoS Example

Page 68: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 68

Cisco Catalyst 4500 AutoQoS: VoIP Model

Options:auto qos voip cisco-phone

auto qos voip trust

!qos qos dbl qos map cos 3 to 26 qos map cos 5 to 46 qos map dscp 24 25 26 27 28 29 30 31 to tx-queue 4 qos map dscp 32 33 34 35 36 37 38 39 to tx-queue 4 !policy-map autoqos-voip-policy class class-default dbl !Interface GigabitEthernet0/1 qos trust device cisco-phone qos trust cos tx-queue 3 priority high shape percent 33 bandwidth percent 33 !

CAT4500(config-if)#auto qos voip cisco-phone

Page 69: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 69

AutoQoS AutoQoS VoIP: WAN

interface Serial2/0 bandwidth 768 ip address 10.1.102.2 255.255.255.0 encapsulation ppp auto qos voip trust

!interface Multilink2001100117 bandwidth 768 ip address 10.1.102.2 255.255.255.0 service-policy output AutoQoS-Policy-Trust ip tcp header-compression iphc-format no cdp enable ppp multilink ppp multilink fragment delay 10 ppp multilink interleave ppp multilink group 2001100117 ip rtp header-compression iphc-format!…!interface Serial2/0 bandwidth 768 no ip address encapsulation ppp auto qos voip trust no fair-queue ppp multilink ppp multilink group 2001100117!

! class-map match-any AutoQoS-VoIP-RTP-Trust match ip dscp ef class-map match-any AutoQoS-VoIP-Control-Trust match ip dscp cs3 match ip dscp af31!! policy-map AutoQoS-Policy-Trust class AutoQoS-VoIP-RTP-Trust priority percent 70 class AutoQoS-VoIP-Control-Trust bandwidth percent 5 class class-default fair-queue!

Page 70: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 70

AutoQoS WAN DiffServ Classes

Traffic Class

Transactional/Interactive AF21

Telephony Signaling CS3

Streaming Video CS4

Interactive Video AF41

Interactive Voice EF

Network Management CS2

Bulk Data AF11

Scavenger CS1

Best Effort 0

IP Routing CS6

DSCPAutoDiscovery Cisco AutoQoS Policy

Application and Protocol Types

Cisco AutoQoS Class-Maps

Match Statements

Offered Bit Rate (Average and

Peak)

Minimum Bandwidth to Class Queues,

Scheduling and WRED

Page 71: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 71

interface Serial4/0 point-to-pointencapsulation frame-relaybandwidth 256ip address 10.1.71.1 255.255.255.0frame-relay interface-dlci 100 auto discovery qos

AutoQoS WAN, Part One: Discovery

Command should be enabled on interface of interest Do not change interface bandwidth when running auto

discovery Cisco Express Forwarding must be enabled All previously attached QoS policies must be removed

from the interface

AutoDiscovery Notes

Page 72: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 72

Router# show auto discovery qos

AutoQoS Discovery enabled for applications Discovery up time: 2 days, 55 minutes AutoQoS Class information: Class VoIP: Recommended Minimum Bandwidth: 517 Kbps/50% (PeakRate) Detected applications and data: Application/ AverageRate PeakRate Total Protocol (kbps/%) (kbps/%) (bytes) rtp audio 76/7 517/50 703104 Class Interactive Video: Recommended Minimum Bandwidth: 24 Kbps/2% (AverageRate) Detected applications and data: Application/ AverageRate PeakRate Total Protocol (kbps/%) (kbps/%) (bytes) rtp video 24/2 5337/52 704574 Class Transactional: Recommended Minimum Bandwidth: 0 Kbps/0% (AverageRate) Detected applications and data: Application/ AverageRate PeakRate Total Protocol (kbps/%) (kbps/%) (bytes) citrix 36/3 74/7 30212 sqlnet 12/1 7/<1 1540

AutoQoS WAN, Part One: Discovery (Cont.)

Page 73: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 73

interface Serial4/0 point-to-point bandwidth 256 ip address 10.1.71.1 255.255.255.0 frame-relay interface-dlci 100 auto qos

AutoQoS WAN, Part Two: Provisioning

class-map match-any AutoQoS-Voice-Se4/0 match protocol rtp audio class-map match-any AutoQoS-Inter-Video-Se4/0 match protocol rtp video class-map match-any AutoQoS-Transactional-Se4/0 match protocol sqlnet match protocol citrix!policy-map AutoQoS-Policy-Se4/0 class AutoQoS-Voice-Se4/0 priority percent 70 set dscp ef class AutoQoS-Inter-Video-Se4/0 bandwidth remaining percent 10 set dscp af41 class AutoQoS-Transactional-Se4/0 bandwidth remaining percent 1 set dscp af21 class class-default fair-queue!

Page 74: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 74

AutoQoS Enterprise: WAN, Part Two: Provisioning (Cont.)

<policy continued>!policy-map AutoQoS-Policy-Se4/0-Parent class class-default shape average 256000 service-policy AutoQoS-Policy-Se4/0!interface Serial4/0 point-to-point frame-relay interface-dlci 100 class AutoQoS-FR-Serial4/0-100!map-class frame-relay AutoQoS-FR-Serial4/0-100frame-relay cir 256000frame-relay mincir 256000frame-relay fragment 320service-policy output AutoQoS-Policy-Se4/0-Parent

interface Serial4/0 point-to-point bandwidth 256 ip address 10.1.71.1 255.255.255.0 frame-relay interface-dlci 100 auto qos

Page 75: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 75

AutoQoS WAN, Part Three: Monitoring

Thresholds are activated in RMON alarm table to monitor drops in Voice Class

Default drop threshold is 1bps

rmon event 33333 log trap AutoQoS description “AutoQoSSNMP traps for Voice Drops” owner AutoQoS rmon alarm 33350 cbQoSCMDDropBitRate.2881.2991 30Absolute rising-threshold 1 33333 falling-threshold 0 Owner AutoQoS

RMON Event Configured and Generated by Cisco AutoQoS

Monitoring Drops in LLQ

Page 76: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 76

Recomendaciones

Page 77: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 77

Catalyst 2950

AutoQoS—VoIP Model

IP Phone + PC + Scavenger (Basic) Model

Trusted-EndpointModel

Trust-DSCPGlobal1P3Q1TQueuing

Access-EdgesUplinks to

Distribution LayerGlobal

Commands

Page 78: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 78

Catalyst 2950

Q4Priority Queue

1P3Q1T

Queue 1 (5%)CoS 1

Queue 3(70%)

CoS 5

CoS 3

CoS 2

CoS 4

CoS 6

CoS 7

Queue 2(25%)CoS 0

Network Management

Call Signaling

Streaming Video

Transactional Data

Interactive Video

Voice

Application

Bulk Data

AF21

CS3

CS4

AF41

EF

CS2

AF11

Scavenger CS1

Best Effort 0

Internetwork Control CS6

Mission-Critical Data AF31

DSCP

Network Control –

CoS 2

CoS 3

CoS 4

CoS 4

CoS 5

CoS 2

CoS 1

CoS 1

0

CoS 6

CoS 3

CoS

CoS 7

Page 79: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 79

Catalyst 2960/3560/3750

Page 80: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 80

Catalyst 2960/3560/3750

Page 81: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 81

WAN Edge QoS Design ConsiderationsQoS Requirements of WAN Aggregators

WAN Aggregator

WAN Edges

CampusDistribution/

Core Switches

LAN Edges

WAN

Queuing/Dropping/Shaping/Link-Efficiency Policies for Campus-to-Branch Traffic

Page 82: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 82

WAN AggregationExample Strategy for Expanding the Number of Classes of Service over Time

4/5 Class Model

Scavenger

Critical Data

Call Signaling

Realtime

8 Class Model

Critical Data

Video

Call Signaling

Best Effort

Voice

Bulk Data

Network Control

Scavenger

11 Class Model

Network Management

Call Signaling

Streaming Video

Transactional Data

Interactive-Video

Voice

Best Effort

IP Routing

Mission-Critical Data

Scavenger

Bulk Data

Time

Best Effort

Page 83: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 83

8 Class model

Page 84: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 84

11 class model

Page 85: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 85

11 class model (cont.)

Page 86: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 86

Branch Router QoS DesignQoS Requirements for Branch Routers

Branch Router

WAN Edge

WAN

Queuing/Dropping/Shaping/Link-Efficiency Policies forBranch-to-Campus Traffic

Optional: DSCP-to-CoS Mapping Policies for Campus-to-Branch Traffic

LAN Edge

Classification and Marking (+ NBAR)Policies for Branch-to-Campus Traffic

BranchSwitch

Page 87: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 87

MPLS VPN QoS DesignQoS Requirements in MPLS VPN Architectures

CE Router

MPLS VPN

PE Router

P Routers

CE RouterPE Router

Required

Optional

CE-to-PE Queuing/Shaping/Remarking/LFI

PE Ingress Policing and Remarking

PE-to-CE Queuing/Shaping/LFI

Optional: Core DiffServ or MPLS TE Policies

Page 88: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 88

Q&A

Page 89: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 89

At-a-glance

http://www.cisco.com/en/US/tech/tk543/tk759/tech_white_papers_list.html

Page 90: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 90

Page 91: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 91

Page 92: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 92

Page 93: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 93

Page 94: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 94

Page 95: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 95

Page 96: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 96

Page 97: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 97

Page 98: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 98

Page 99: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 99

Page 100: 20080404 QoS Training

© 2006 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 100

Muchas gracias