Sunteți pe pagina 1din 338

QOS

CALIDAD DE SERVICIO
1

QoS
Datos del Instructor
ANDRS ALMEIDA ARCOS INGENIERO EN ELECTRNICA Y TELECOMUNICACIONES EPN CCNP Cisco Certified Network Professional CCDP Cisco Certified Design Professional CCNA Cisco Certified Network Associate CCDA Cisco Certified Design Associate CCAI Cisco Certified Academy Instructor CCIP Cisco Certified Internetwork Professional
Corporacion Nacional de Telecomunicaciones CNT Core IP/MPLS Network Engineer Jefe Nacional O&M Plataformas IP/MPLS

caaamh@hotmail.com
2

QoS

AGENDA
INTRODUCCION MODELOS DE CALIDAD DE SERVICIO MODULAR QOS Y AUTOQOS CLASIFICACION Y MARCADO ADMINISTRACIN DE LA CONGESTIN ANULANDO LA CONGESTION TRAFFIC POLICING Y SHAPING MECANISMOS DE EFICIENCIA DE ENLACE MEJORES PRCTICAS DE QOS

Ing. Andres Almeida CCNP CCDP CCIP

Redes tradicionales

Redes convergentes

Problemas en Redes Convergentes

Requerimientos de Calidad de Servicio de las aplicaciones


Aplicacin Correo electrnico Transferencia de ficheros Fiabilidad Retardo Alta (*) Alta (*) Alto Alto Jitter Alto Alto Ancho de Banda Bajo Medio

Acceso Web Login remoto


Audio bajo demanda Vdeo bajo demanda Telefona Vdeoconferencia

Alta (*) Alta (*)


Media Media Media Media

Medio Medio
Alto Alto Bajo Bajo

Alto Medio
Medio Medio Bajo Bajo

Medio Bajo
Medio Alto Bajo Alto

(*) La fiabilidad alta en estas aplicaciones se consigue automticamente al utilizar el protocolo de transporte TCP

Requerimientos de las Aplicaciones

Calidad de Servicio (QoS)

Decimos que una red o un proveedor ofrece Calidad de Servicio o QoS (Quality of Service) cuando se garantiza el valor de uno o varios de los parmetros que definen la calidad de servicio que ofrece la red. Si el proveedor no se compromete en ningn parmetro decimos que lo que ofrece un servicio best effort. El contrato que especifica los parmetros de QoS acordados entre el proveedor y el usuario (cliente) se denomina SLA (Service Level Agreement)

QoS:

Se refiere a la habilidad de la red, de ofrecer tratamiento a determinados tipos de trfico, sobre diferentes tecnologas, incluyendo: Frame Relay, Asynchronous Transfer Mode (ATM), IP, LANs y lneas dedicadas.

QOS EN REDES IP
End-to-end QoS es obtenido de la unin de edge-to-edge QoS suministrado por cada dominio por donde viaja el datagrama.
End-to-end QoS depende de las caractersticas de QoS de los saltos individuales a lo largo de cualquier ruta dada.

La Internet actual, tipo best effort, usa un modelo de buffer FIFO. Los buffer (o colas) introducen latencia y prdidas de paquetes.

QOS EN REDES IP:


QoS depende tanto de los routers a lo largo del trayecto como la QoS de cada una de las tecnologa de enlace.

Para soportar end-to-end QoS, es necesario conocer el comportamiento dinmico de la red.

Jitter

Latencia

Prdida de paquetes

Congesti n

Buffer

Delay

Prdida de paquetes

No predecible

Predecibl e

Delay del procesamiento

Delay del enlace

End-to-end latencia

Efectos de la congestin en el tiempo de servicio y el rendimiento


Sin Congestin Congestin Moderada Congestin Fuerte

Tiempo de Servicio

Sin Congestin Congestin Moderada

Congestin Fuerte

Carga
QoS intil QoS til y viable QoS inviable QoS intil QoS til y viable

Rendimiento

Carga
QoS inviable

QoS:

Para un operador de redes, significa evitar situaciones de congestin en los nodos de la red y proporcionar mecanismos para clasificar el trfico. La definen 4 parmetros: ancho de banda, retraso (latencia), variacin de retraso (o jitter) y prdida de paquetes o fiabilidad.

QoS
Ancho

de Banda / Caudal de Trfico Retardo (delay) Variacin del retardo (Jitter Delay) Paquetes perdidos

QoS
FALTA

DE ANCHO DE BANDA DE EXTREMO A

RETARDO

EXTREMO
VARIACION PERDIDA

DEL RETARDO (JITTER)

DE PAQUETES

Falta de Ancho de Banda

El mximo ancho de banda disponible es el correspondiente al enlace ms pequeo. Si mltiples flujos compiten por el ancho de banda resulta una disminucin de ancho de banda resultante. Calcular el ancho de banda disponible es una misin bastante difcil en una red real.

Retardo
Se define como el tiempo que tarda un paquete en llegar desde la fuente al destino.
ho

la

co

mo es

tas
?

La ho co mo es tas?

Retardo de extremo a extremo

El retardo extremo a extremo es igual a la suma de todos los tiempos de propagacin, transmisin, paquetizacin, procesamiento y espera en cola. Los tiempos de propagacin y paquetizacin son conocidos. En cambio, el tiempo de procesamiento y espera en cola suele ser muy difcil de calcular.

Retardo = P1 + Q1 + P2 + Q2 + P3 + Q3 + P4 = X ms

Tipos de retardo

Retardo de paquetizacin es el tiempo que le cuesta al cdec generar los paquetes IP que se van a transmitir (en el nodo transmisor) Retardo de procesado es el tiempo que le cuesta a un router llevar un paquete desde la entrada de un interfaz hasta la cola del interfaz de salida. (en cada nodo del camino)

Tipos de retardo

Retardo de espera en cola es el tiempo que tiene que esperar un paquete en la cola de salida. (en cada nodo del camino) Retardo de propagacin es el tiempo que le cuesta al router transmitir el paquete por el interfaz de salida. (en cada enlace del camino) Es importante tanto el valor medio de dicho retardo extremo a extremo como su variacin o Jitter.

Fluctuacin del retardoJitter


Emisor Red Receptor

Emisor Transmite

t
A
50 ms 50 ms

B
90 ms
Congestin

Receptor Recibe

Red vaca

Retardo: 70 ms 20 ms (retardo: 70 ms, jitter: 40 ms)

Reduccin del Jitter

La principal causa de jitter es la congestin Se puede reducir el jitter aadiendo un retardo adicional en el lado del receptor. Por ejemplo con un retardo de 70 20 ms se puede asegurar jitter 0 si se aade un retardo de 40 ms (90 0 ms). Para el retardo adicional el receptor ha de tener un buffer suficientemente grande. En algunas aplicaciones no es posible aadir mucho retardo pues esto reduce la interactividad. Ej.: videoconferencia, telefona por Internet

Prdida de paquetes

Normalmente, un paquete es eliminado cuando el enlace se encuentra congestionado (colas de salida llenas). En medios poco fiables, como las comunicaciones inalmbricas, el propio medio de transmisin hace que se pierdan paquetes. Las prdidas pueden ser totalmente aleatorias o a rfagas

Cmo aumentar el ancho de banda disponible?

Actualizar el enlace (mejor solucin, pero la ms cara). Clasificar el trfico en clases de QoS y priorizar las ms importantes. Comprimir el contenido (MPEG4, ZIP). Comprimir las cabeceras IP.

Cmo reducir el retardo?


Actualizar el enlace (mejor solucin, pero la ms cara). Transmitir los paquetes ms sensibles a retardo primero. No suele compensar comprimir el contenido (MPEG4, ZIP), por el retardo de compresin asociado. Comprimir la cabecera IP no requiere tanta CPU. Puede ser til.

Cmo reducir el nmero de paquetes perdidos?


Actualizar el enlace (mejor solucin, pero la ms cara). Garantizar el suficiente ancho de banda para los paquetes de aplicaciones ms sensibles. Prevenir situaciones de congestin. Distintas alternativas

Congestin y Calidad de Servicio

Sera muy fcil dar Calidad de Servicio si las redes nunca se congestionaran. Para ello habra que sobredimensionar todos los enlaces, cosa no siempre posible o deseable. Para dar QoS con congestin es preciso tener mecanismos que permitan dar un trato distinto al trfico preferente y cumplir el SLA (Service Level Agreement).

Parmetros tpicos de los SLAs


Parmetro Significado Ejemplo

Disponibilidad Tiempo mnimo que el operador asegura que la red estar en funcionamiento Ancho de Banda Prdida de paquetes Round Trip Delay
Jitter

99,9% 2 Mb/s 0,1% 80 mseg


20 mseg

Indica el ancho de banda mnimo que el operador garantiza al usuario dentro de su red Mximo de paquetes perdidos (siempre y cuando el usuario no exceda el caudal garantizado) El retardo de ida y vuelta medio de los paquetes
La fluctuacin que se puede producir en el retardo de ida y vuelta medio

Definicion de QoS
La disponibilidad de la red para proveer mejor o un especial servicio a un grupo de usuarios o aplicaciones

QoS para Redes Convergentes

Paso 1: Identificar el trafico y sus requerimientos


Auditar

la red

Identificar el trafico en la red

Auditar

el Negocio

Determinar como cada tipo de trafico es importante para el negocio

Niveles

de servicio requeridos
Determinar el tiempo de respuesta requerido

QoS Requerimientos de trafico: Voz


Latencia < 150 ms Jitter < 30 ms Perdida < 1% 17-106 kbps guaranteed priority bandwidth per call 150 bps (+ Layer 2 overhead) guaranteed bandwidth for voice-control traffic per call

Videoconferencia y datos

Paso 2: Dividir el trafico en clases

Paso 3: Definir las Politicas para cada clase

QoS Policy
Recursos de la red y prioridades de Negocio

2004 Cisco Systems, Inc. All rights reserved.

QOS v2.11-42

2004 Cisco Systems, Inc. All rights reserved.

QOS v2.11-43

Concepto de flujo

Secuencia de datagramas Simplex (unidireccional) La entidad ms pequea a la que los routers pueden aplicar una determinada QoS

Concepto de flujo

Ejemplo: videoconferencia formada por cuatro flujos, dos en cada sentido, uno para el audio y otro para el vdeo. Los flujos pueden agruparse en clases; todos los flujos dentro de una misma clase reciben la misma QoS.

Flujos en una videoconferencia

A 147.156.135.22

B 158.42.35.13

Flujo vdeo A->B: 147.156.135.22:2056 -> 158.42.35.13:4065 Flujo audio A->B: 147.156.135.22:3567 -> 158.42.35.13:2843 Flujo vdeo B->A: 158.42.35.13:1734 -> 147.156.135.22:6846 Flujo vdeo B->A: 158.42.35.13:2492 -> 147.156.135.22:5387

Agrupacin de flujos
Flujo rojo (128 Kb/s): 147.156.21.20:2038158.26.112.76:2127 Reserva total flujos de vdeo: en sentido X Y: 384 Kb/s Vdeo 128 Kb/s IP: 147.156.21.20 Puerto UDP: 2038

IP: 158.26.112.76 Puerto UDP: 2127

Flujo verde (256 Kb/s): 147.156.47.12:3124158.26.36.97:5753


Vdeo 256 Kb/s IP: 147.156. 47.12 Puerto UDP: 3124

IP: 158.26.36.97 Puerto UDP: 5753

Identificacin de flujos

En IPv4 se hace por:


Direccin IP de origen Puerto de origen Direccin IP de destino Puerto de destino Protocolo de transporte utilizado (TCP o UDP)

Identificacin de flujos

En IPv6 como en IPv4 o usando el campo etiqueta de flujo en vez de los nmeros de puertos. An no hay ninguna implementacin de RSVP que utilice la etiqueta de flujo.

Metodos para implementar QoS


CLI

(Command Line Interface) MQC (Modular QoS CLI) AutoQoS QPM (QoS Policy Manager)

1) Implementando QoS con CLI


Permite configurar manualmente interfaz por interfaz las opciones de QoS. Es un mtodo poco escalable Mtodo Tradicional Es un mtodo poco escalable

Implementando QoS con CLI

No se puede separar o clasificar el trafico segn una poltica determinada Mtodo mas manipulable que tener AutoQos

Implementando QoS con CLI


interface serial 0/0 ip address 10.1.61.1 255.255.255.0 ip tcp header-compression iphc-format load-interval 30 custom-queue-list 1 ppp multilink ppp multilink fragment-delay 10 ppp multilink interleave multilink-group 1 ip rtp header-compression iphc-format !

2) Implementando QoS con MQC


Un comando por cada poltica de QoS Reduce los pasos de configuracin y tiempo Polticas no de manera global si no por interfaces CLI uniforme para todas las caractersticas de QoS Separados motores de clasificacin segn la poltica

Implementando QoS con MQC


class-map VoIP-RTP match access-group 100 class-map VoIP-Control match access-group 101 ! policy-map QoS-Policy class VoIP-RTP priority 100 class VoIP-Control bandwidth 8 class class-default fair-queue ! interface serial 0/0 service-policy output QoS-Policy ! access-list 100 permit ip any any precedence 5 access-list 100 permit ip any any dscp ef access-list 101 permit tcp any host 10.1.10.20 range 2000 2002 access-list 101 permit tcp any host 10.1.10.20 range 11000 11999

Implementando QoS con MQC

Implementando QoS con MQC

Implementando QoS con MQC

3) Implementando QoS con AutoQoS


Routers

y Switchs LAN & WAN Un comando habilita Cisco QoS para VoIP en un puerto dado interface, or PVC

3) Implementando QoS con AutoQoS

3) Implementando QoS con AutoQoS


Un comando por interfaz para habilitar y configurar QoS

AutoQoS
Un comando por interfaz para habilitar y configurar QoS

AutoQoS
Manual QoS
interface Multilink1 ip address 10.1.61.1 255.255.255.0 ip tcp header-compression iphc-format load-interval 30 service-policy output QoS-Policy ppp multilink ppp multilink fragment-delay 10 ppp multilink interleave multilink-group 1 ip rtp header-compression iphc-format ! interface Serial0 bandwidth 256 no ip address encapsulation ppp no ip mroute-cache load-interval 30 no fair-queue ppp multilink multilink-group 1

AutoQoS
interface Serial0 bandwidth 256

ip address 10.1.61.1 255.255.255.0


auto qos voip

AutoQoS
Clasificacin de Aplicaciones Generacin de Polticas Configuracin Monitoreo & Reporte Consistente

AutoQoS: Router Platforms


Cisco

1760, 2600, 3600, 3700, and 7200 series routers User can meet the voice QoS requirements without extensive knowledge about:

Underlying technologies PPP, FR, ATM) Service policies Link efficiency Mecanismos

(for example:

AutoQoS

lends itself to tuning of all generated parameters & configurations

AutoQoS: Switch Platforms


Cisco

Catalyst 6500, 4500, 3550, and 2950 (EI) switches User can meet the voice QoS requirements without extensive knowledge about: Trust boundary CoS-to-DSCP mappings Weighted round robin (WRR) & priority queue (PQ) scheduling parameters Generated parameters and configurations are user-tunable

Configurando AutoQoS: Routers


router(config-if)# or router(config-fr-dlci)# auto qos voip [trust] [fr-atm]

Configures the AutoQoS VoIP feature. Untrusted mode by default. trust: Indicates that the DSCP markings of a packet are trusted (relied on) for Clasificacin of the voice traffic. fr-atm: For low-speed Frame Relay DLCIs interconnected with ATM PVCs in the same network, the fr-atm keyword must be explicitly configured in the auto qos voip command to configure the AutoQoS VoIP feature properly.

4) QPM (QoS Policy Manager)


Provisioning Monitoreando Reporting

Voice QoS-ready devices Deployment audit Device overwrite report

Recommendations via wizards, templates Verify Customize

Device QoS troubleshooting

Cisco AutoQoS con CiscoWorks QPM


Use AutoQoS to configure each switch or router.
Use QPM to manage network-wide QoS for multiple devices.

Redes MIBs para monitorear QoS


MIB: Management Information Base Una estructura SNMP que describe el dispositivo particula que esta siendo monitoreado

Class-Based QoS MIB (CBQoSMIB)

QPM: Monitoreando and Reporting with CBQoSMIB

Cisco NBAR Protocol Discovery MIB

Cisco NBAR Protocol Discovery MIB


Voz, datos y video tienen muy diferentes requerimientos y deben ser definidos en clases.
Hay diferentes mtodos para implementar QoS: Use existing CLI configuration mode Use MQC-based QoS configuration Use automated methods such as AutoQoS and QPM

Cisco NBAR Protocol Discovery MIB

Comparacion de Mtodos

2004 Cisco Systems, Inc. All rights reserved.

QOS v2.12-77

Calidad de Servicio en Internet


La congestin y la falta de QoS es el principal problema de Internet actualmente. TCP/IP fue diseado para dar un servicio best effort. Existen aplicaciones que no pueden funcionar en una red congestionada con best effort. Ej.: videoconferencia, VoIP (Voice Over IP), etc. Se han hecho modificaciones a IP para que pueda funcionar como una red con QoS

3 Modelos para QoS


Best-Effort:

QoS no es aplicado a los

paquetes
IntServ:

incluye el servicio best-effort, y la reserva de recursos para los servicios en tiempo real DiffServ: Las redes reconocen clases que requieren calidad de servicio

1) Modelo Best-Effort

Internet se basa inicialmente en el mejor esfuerzo pa enviar los paquetes. Todo el trfico se envia por defecto No existe diferenciacin entre tipos de trfico Como el e-mail estndar.

Lo consiguiremos si es que llega

1) Modelo Best-Effort
+

Beneficios:

Alta escalabilidad

No requiere mecanismos especiales

Desventajas

No garantizacin de los equipos

No diferenciacin de los servicios

2) IntServ Model
Algunas

aplicaciones tienen requerimientos de ancho de banda o retardo o ambas IntServ se introdujo para
garantizar un comportamiento predecible de la red para estas aplicaciones
Envo

garantizado: Otros tipos de trfico no pueden reservar ancho de banda Es como tener un avin privado de mensajera

It will be there by 10:30 a.m.

Integrated Service
Integrated Service. Dos tipos de QoS.
Este modelos tambin es conocido en muchas reas de la literatura de QoS, como Guaranteed level. Se le llama as porque uno de los dos tipos de QoS que ofrece garantiza recursos ntegramente.

Antes de enviar datos peticin servicio


En este modelo, una aplicacin realiza una peticin de una clase de servicio especfica a la red, antes de comenzar a enviar informacin.

83

Modelo IntServ

Provee multiples niveles de servicio Peticiones especificas de clases de servicio de la red antes de enviar datos Usa RSVP para reservar recursos de la red Usa mecanismos inteligentes de encolamiento End to end

Problemas de IntServ/RSVP

RSVP produjo una euforia inicial (19961997) que luego di paso a la decepcin. La razn principal fueron problemas de escalabilidad debidos a la necesidad de mantener informacin de estado en cada router de cada flujo. Esto hace inviable usar RSVP en grandes redes, por ejemplo en el core de Internet.
85

Problemas de IntServ/RSVP

Los fabricantes de routers no han desarrollado implementaciones eficientes de RSVP, debido al elevado costo que tiene implementar en hardware las funciones de mantenimiento de la informacin de estado. A pesar de todo RSVP/IntServ puede desempear un papel en la red de acceso, donde los enlaces son de baja capacidad y los routers soportan pocos flujos. Recientemente ha resurgido el inters por RSVP por su aplicacin en MPLS y funciones de ingeniera de trfico. En estos casos el nmero de flujos no suele ser muy grande

3) Modelo DiffServ
Trfico

de la red se identifica por clase Las polticas de QoS cumplen con un tratamiento diferenciado segn la clase de trfico Tu escoges el nivel de servicio de cada clase de trfico Como el uso de un servicio de mensajera

Do you want overnight delivery? Do you want two-day air delivery? Do you want three- to sevenday ground delivery?

Modelo DiffServ (Differentiated Services)

Intenta evitar los problemas de escalabilidad que plantea IntServ/RSVP. Se basa en el marcado de paquetes nicamente. No hay reserva de recursos por flujo, no hay protocolo de sealizacin, no hay informacin de estado en los routers. Las garantas de calidad de servicio no son tan severas como en IntServ pero en muchos casos se consideran suficientes.

DiffServ

La informacin se puede sumarizar fcilmente ya que todos los flujos quedan clasificados en alguna de las categoras existentes. El nmero de categoras posibles es limitado e independiente del nmero de flujos o usuarios; por tanto la complejidad es constante, no proporcional al nmero de usuarios (decimos que la arquitectura es escalable, o que escala bien). La informacin de QoS no est en los routers sino que cabalga montada en los datagramas.

DiffServ
Version Lon.Cab. TOS Identificacin Tiempo de vida Longitud total X D M Desplazamiento F F fragmento Protocolo Checksum Direccin de origen Direccin de destino Opciones

Cabecera IPv4 antes de DiffServ

DiffServ
Version Lon.Cab. DS Identificacin Tiempo de vida Longitud total XDM Desplazamiento F F fragmento Protocolo Checksum Direccin de origen Direccin de destino Opciones

Cabecera IPv4 con DiffServ (RFC2474, 12/1998)

Campo DS (RFC 2474)


Campo DS

DSCP

CU

DSCP: Differentiated Services CodePoint son 6 bits que indican el tratamiento que debe recibir este paquete en los routers CU: Currently Unused (reservado). Este campo se utiliza actualmente para control de congestin

DSCP Encoding

DiffServ

field: The IP version 4 header ToS octet or the IP version 6 traffic class octet when interpreted in conformance with the definition given in RFC2474 DSCP: The first 6 bits of the DiffServ field, used to select a PHB (forwarding and queuing method)

Per-Hop Behaviors

DSCP

selects PHB throughout the network.

Default PHB (FIFO, tail drop) EF PHB AF PHB Class-Selector (IP Precedence) PHB

Re-envo (PHB)
PHBs en desarrollo:

Expedited Forwarding: pkt salen a tasa igual o mayor a la especificada

Abstraccin de un enlace lgico con tasa mnima garantizada

Assured Forwarding: 4 clases de trfico


Cada uno con cantidad mnima garantizada de BW Cada una con tres particiones de descarte predefinidas, si hay congestin el router descarta basado en esta preferencia

Servicio EF (Expedited Forwarding, RFC2598)


Es

el que da ms seguridad (virtual leased line). Ofrece un SLA (Service Level Agreement) que garantiza:
Un caudal mximo Una tasa mnima de prdida de paquetes Un retardo mnimo Un jitter mnimo El valor DSCP es 101110

Servicio AF (Assured Forwarding, RFC2597)


Asegura

un trato preferente, pero no garantiza caudales, retardos, etc. Se definen cuatro clases, pudindose asignar una cantidad de recursos (ancho de banda y espacio en buffers) diferente a cada una. En cada clase se definen tres categoras de descarte de paquetes (alta, media y baja). DSCP: cccdd0 (ccc = clase, dd = descarte)

Per-Hop Behaviors

EF PHB: Ensures a minimum departure rate Guarantees bandwidth (The class is guaranteed an amount of bandwidth with prioritized forwarding.) Polices bandwidth (The class is not allowed to exceed the guaranteed amountexcess traffic is dropped.) DSCP

value 101110: looks like IP Precedence 5 to non-DiffServ-compliant devices

Bits 5 to 7: 101 = 5 (Same three bits used for IP precedence) Bits 3 to 4: 11 = No drop probability Bit 2: Just 0

Per-Hop Behaviors

AF

PHB:

Ancho de banda garantizado Permite acceso a ancho de banda extra si es que este se encuentra disponible

Four

standard classes (af1, af2, af3, and af4) DSCP value range: aaadd0

Where aaa is a binary value of the class Where dd is drop probability

Per-Hop Behaviors

Backward Compatibility Utilizando the Class Selector

xxx000 DSCP Compatibility with current IP Precedence usage (RFC 1812) = maps IP Precedence to DSCP Differentiates probability of timely forwarding (xyz000) >= (abc000) if xyz > abc
Class-Selector

If a packet has DSCP = 011000, it has a greater probability of timely forwarding than a packet with DSCP = 001000.

Codepoints del Servicio AF (RFC2597)


Menor probabilidad de descarte Mayor probabilidad de descarte

Precedencia de descarte dd Clase ccc


Mayor prioridad

Baja 01 10001

Media 10 10010

Alta 11 10011

4 100

3 011 2 010
1 001
Menor prioridad

01101 01001
00101

01110 01010
00110

01111 01011
00111

Tipos de Servicio en DiffServ


Servicio Expedited Forwarding o Premium Caractersticas
Es

Equivalencia en ATM CBR VBR-rt

el que da ms garantas. Equivale a una lnea dedicada Garantiza Caudal, tasa de prdidas, retardo y jitter Valor 101110 en DSCP
Asegura

Assured Forwarding

un trato preferente, pero sin fijar garantas (no hay SLA) Se definen cuatro clases y en cada una tres niveles de descarte de paquetes
Sin

VBR-nrt

Best Effort con prioridad

garantas, pero obtendr trato preferente frente a best effort sin prioridad

ABR UBR

Best Effort sin Ninguna garanta, obtiene solo las prioridad migajas

Reparto de recursos en DiffServ


Best Effort sin prioridad
Caudal

Best Effort con prioridad

Assured Forwarding

Expedited Forwarding o Premium

Tiempo

Otros codepoints

Las clases 111 y 110 estn reservadas para paquetes de control de la red y protocolos de routing El DSCP 000000 es por defecto el servicio Best Effort sin prioridad. Otros DSCP de la clase 000 pueden usarse para servicios Best Effort con prioridad.

Valores de codepoint, campo DSCP


111110
111100 111010 111000 110110

Reservado (routing y control)


Reservado (routing y control) Reservado (routing y control) Reservado (routing y control) Reservado (routing y control)

011110
011100

Assured Clase 3 Preced. Alta


Assured Clase 3 Preced. Media

011010
011000 010110 010100 010010

Assured Clase 3 Preced. Baja


Configurable por el usuario Assured Clase 2 Preced. Alta Assured Clase 2 Preced. Media Assured Clase 2 Preced. Baja

110100
110010 110000 101110 101100 101010

Reservado (routing y control)


Reservado (routing y control) Reservado (routing y control) Expedited (Premium) Configurable por el usuario Configurable por el usuario

010000
001110

Configurable por el usuario


Assured Clase 1 Preced. Alta

001100
001010 001000 000110 000100

Assured Clase 1 Preced. Media


Assured Clase 1 Preced. Baja Configurable por el usuario Configurable por el usuario Configurable por el usuario

101000
100110 100100 100010 100000

Configurable por el usuario


Assured Clase 4 Preced. Alta Assured Clase 4 Preced. Media Assured Clase 4 Preced. Baja Configurable por el usuario

000010
000000

Configurable por el usuario


Best Effort (default)

Ejemplo de aplicacion de clases de servicio

Implementacin de DiffServ en los routers

Identificar y separar trfico en las diferentes clases

Descartar trfico que se comporta mal para garantizar la integridad de la red

Marcar trfico, si es necesario. Asigna al DSCP el valor que corresponde

Priorizar, proteger y aislar trfico

Controlar rfagas y conformar trfico

Encolamiento de paquetes en los routers


Cola Expedited

Cola Assured 4
Cola Assured 3

PQ

WFQ Cola Assured 2 Cola Assured 1 Cola Best Effort

Lnea de salida FWFQ

DiffServ Model
+

Beneficios:

Highly scalable

Many levels of quality possible

Desventajas:

No absolute service guarantee

Complex Mecanismos

IntServ vs DiffServ

IntServ fue desarrollado con anterioridad a DiffServ. Sin embargo DiffServ se ha extendido ms que IntServ DiffServ permite agregar flujos, el modelo es escalable. Debido a estas diferencias muchos fabricantes de routers implementan versiones eficientes de DiffServ, pero no de IntServ. Actualmente muchos ISP implementan DiffServ. Qbone (red expermiental de QoS en Internet 2) utiliza el modelo DiffServ.

2004 Cisco Systems, Inc. All rights reserved.

QOS v2.12-112

Mecanismos de QoS

Diferenciar entre tipos de trficos o servicios para darles diferentes tratamientos. Tratar los trficos de forma diferenciada dentro de la red.
2004 Cisco Systems, Inc. All rights reserved. QOS v2.12-113

Mecanismos de QoS
Clasificacin:

Cada clase orientada a mecanismos de QoS tienen que soportar ser clasificados Marking: Utilizado para marcar paquetes basados en la clasificacin , medicin o ambos. Administracin de la Congestin: Cada interfaz debe tener un mecanismo de encolamiento para priorizar la transmisin de paquetes

QoS Mecanismos
Evitar

la Congestion: Utilizado para dropear tempranamente paquetes y evitar la congestion en la red Policing and Shaping: Utilizado para forzar un tasa limite. El exceso de trfico puede ser dropeado, marcado o retardado. Eficiencia de enlace: utilizado para proveer ancho de banda eficiente a travs de la comprensin, fragmentacin del enlace e intercalado.

Clasificacin

Clasificacin es la identificacin y divisin de trfico en distintas clases. El trafico puede ser clasificado de varias formas, incluyendo por ejemplo segn el valor de DSCP. Modular QoS CLI permite la clasificacin para ser implementada separadamente de las politicas.

Marcado

Marking, tambien conocido como coloreado. Se marca cada paquete como miembro de una clase, para que el paquete sea rapidamente reconocido a travs del resto de la red.

Administracin de la Congestin

La adminstracin de la congestin utiliza el marcado para determinar en que cola poner los paquetes La administracion de la congestin usa sofisticadas tecnicas de encolamiento tales como WFQ and LLQ, to ensure that time-sensitive packets such as voice are transmitted first.

Administracin de la Congestin

Policing

Policing dropea o marca los paquetes cuando un limite predefinido es alcanzado.

Policing

Policing dropea o marca los paquetes cuando un limite predefinido es alcanzado

Policing

Policing dropea o marca los paquetes cuando un limite predefinido es alcanzado

Shaping

Shaping encola los paquetes cuando un limite predefinido es alcanzado.

Shaping

Shaping encola los paquetes cuando un limite predefinido es alcanzado.

Shaping

Shaping encola los paquetes cuando un limite predefinido es alcanzado.

Shaping

Shaping encola los paquetes cuando un limite predefinido es alcanzado.

Shaping

Shaping queues packets when a predefined limit is reached.

Compression

Header compression puede reducir dramaticamente el overhead asociado con el transporte de voz.

Compression

Header compression puede reducir dramaticamente el overhead asociado con el transporte de voz. .

Link Fragmentation and Interleaving

Link Fragmentation and Interleaving

Trust Boundaries Donde clasificar?

Cisco QoS model assumes that the CoS carried in a frame may or may not be trusted by the network device. For scalability, Clasificacin should be done as close to the edge as possible. End hosts can mostly not be trusted to tag a packet priority correctly. The outermost trusted devices represent the trust boundary. 1 and 2 are optimal, 3 is acceptable (if access switch cannot perform Clasificacin).

Trust Boundaries Mark Where?

For scalability, marking should be done as close to the source as possible.

Frontera de confianza

Resumen Aplicando QoS en las interfaces


Input interface Output interface Congestion Management* Mark Congestion Avoidance Shaping (Coming from a higher-speed link or aggregation) Policing Policing Compression Fragmentation and Interleaving (Low-speed WAN links)

(Always)
(As close to the source as possible)

Classify
Mark

(Always)

(High-speed to low-speed links or aggregation points)


(Going to lower-speed links or from points of aggregation)

2004 Cisco Systems, Inc. All rights reserved.

QOS v2.12-137

Modular QoS CLI


The

MQC provides a modular approach to configuration of QoS Mecanismos.

First, build modules defining classes of traffic. Then, build modules defining QoS policies and assign classes to policies. Finally, assign the policy modules to interfaces.

Componentes Modular QoS CLI

Define Classes of Traffic


What traffic do we care about? Each class of traffic is defined using a class map.

Define QoS Policies for Classes


What will be done to this traffic? Defines a policy map which configures the QoS features associated with a traffic class previously identified using a class map.

Apply a Service Policy


Where will this policy be implemented? Attaches a service policy configured with a policy map to an interface.

Clasificacin Usando Class Maps

Configurando Class Maps


router(config)#

class-map [match-all | match-any] class-map-name

Enter the class-map configuration mode. Specify the matching strategy. Match-all is the default matching strategy.
router(config-cmap)#

match condition

Use at least one condition to match packets.


router(config-cmap)#

description description

You should use descriptions in large and complex configurations. The description has no operational meaning.

Configurando Clasificacin Utilizando opciones especiales


router(config-cmap)#

match not condition

The not keyword inverts the condition.


router(config-cmap)#

match class-map class-map-name

One class map can use another class map for Clasificacin. Nested class maps allow generic template class maps to be used in other class maps.
router(config-cmap)#

match any

The any keyword can be used to match all packets.

Monitoreando Class Maps


router>

show class-map [class-name] Displays all class maps and their matching criteria

router>show class-map Class Map class-3 Match access-group 103 Class Map class-2 Match protocol ip Class Map class-1 Match input-interface Ethernet1/0

Policy Maps
Que

se har con este trfico? Defina una politica de trafico, la cual configure las carctersitcas asociadas con la clase de trfico previamente identificadas utilizando una class map. Una plitica de trfico contiene 3 principales elementos :

Un nombre case-sensitive Una clase de trfico La poltica de QoS asociada con la clase de trfico

Mas

de 256 clases de trafico pueden ser asociadas a una sola poltica de trfico. Multiples policy maps pueden ser can be anidados para influenciar la secuencia de las acciones de QoS

Configurando Policy Maps


router(config)#

policy-map policy-map-name
Enter policy-map configuration mode. Policy maps are identified by a case-sensitive name.
router(config-pmap)#

class {class-name | class-default} Enter the per-class policy configuration mode by using the name of a previously configured class map. Use the name class-default to configure the policy for the default class.
router(config-pmap)#

class class-map-name condition Optionally, you can define a new class map by entering the condition after the name of the new class map. Uses the match-any strategy.

Configurando Policy Maps


router(config-pmap)#

description description You should use descriptions in large and complex configurations. The description has no operational meaning.
router(config-pmap-c)#

<PHB mechanism>
Per-class service policies are configured within the per-class policy-map configuration mode. MQC supports the following QoS Mecanismos: Class-based weighted fair queuing (CBWFQ) Low-latency queuing Class-based policing Class-based shaping Class-based marking

Policy Maps anidadas


router(config-map-class)#

service-policy policy-map-name
class-map AllTraffic match any ! policy-map ShapeAll class AllTraffic shape 2000000 service-policy QueueAll ! interface FastEthernet/0 service-policy output ShapeAll class-map HTTP match protocol http ! policy-map QueueAll class HTTP bandwidth 1000

Monitoreando Policy Maps


router>

show policy-map [policy-map] Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps.
router>show policy-map Policy Map Test Class Test1 Weighted Fair Queueing Bandwidth 100 (kbps) Max Threshold 64 (packets) Class Test2 Weighted Fair Queueing Bandwidth 200 (kbps) Max Threshold 64 (packets) Class Test3 Weighted Fair Queueing Bandwidth 300 (kbps) Max Threshold 64 (packets)

Monitoreando Policy Maps


router>

show policy-map interface interface-name [input | output]


router>show policy-map interface FastEthernet0/0 output FastEthernet0/0
Service-policy output: Test (1101) Class-map: Test1 (match-any) (1103/3) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: access-group 101 (1107) Match: access-group 102 (1111) Match: protocol http (1115) Weighted Fair Queueing Output Queue: Conversation 265 Bandwidth 100 (kbps) Max Threshold 64 (packets) (pkts matched/bytes matched) 0/0 (depth/total drops/no-buffer drops) 0/0/0 ... Class-map: class-default (match-any) (1143/0) 25 packets, 19310 bytes 5 minute offered rate 1000 bps, drop rate 0 bps Match: any (1147)

Service Policy

Donde esta politica ser implementada?

Adjunta a una poltica de trafico configurada con un policy map en una interfaz. Service policies pueden ser aplicadas a una interfaz para paquetes entrantes o salientes

Attaching Service Policies to Interfaces


router(config-if)#

service-policy {input | output} policy-map-name

class-map HTTP match protocol http ! policy-map PM class HTTP bandwidth 2000 class class-default bandwidth 6000 !

interface Serial0/0 service-policy output PM !

Utilizando MQC para la Clasificacin

Opciones de Clasificacin MQC


Las

opciones de configuracin se las realiza en las class map Requieren referirse a un policy map para ser utilizado Las opciones de clasificacin por MQC son:
Access list IP precedence value IP DSCP value QoS group number MPLS experimental bits Protocol (including NBAR) Utilizando another class map Frame Relay DE bit

IEEE 802.1Q/ISL CoS/Priority values Input interface Source MAC address Destination MAC address RTP (UDP) port range Any packet

Configurando Clasificacin with MQC


router(config)#

class-map [match-any | match-all] class-map-name

Enters the class map configuration mode. Names can be a maximum of 40 alphanumeric characters. Match all is the default matching strategy.
router(config-cmap)#

match condition

Use at least one condition to match packets.


router(config-cmap)#

match class-map class-map

One class map can use another class map for Clasificacin. Nested class maps allow generic template class maps to be used in other class maps.

Configurando Clasificacin with MQC


router(config-cmap)#

match not match-criteria

The not keyword inverts the condition.


router(config-cmap)#

match any

The any keyword can be used to match all packets.


class-map Well-known-services match access-group 100 ! Class-map Unknown-services match not class-map Well-known-services ! Class-map All-services match any ! access-list 100 permit tcp any any lt 1024 access-list 100 permit tcp any lt 1024 any

Configurando Clasificacin Utilizando Input Interface


router(config-cmap)#

match input-interface interface-name All packets received through the selected input interface are matched by this class map.
class-map match-any Ethernets match input-interface Ethernet0/0 match input-interface Ethernet0/1 ! class-map match-any FastEthernets match input-interface FastEthernet1/0 match input-interface FastEthernet1/1 ! class-map match-any Serials match input-interface Serial2/0 match input-interface Serial2/1 match input-interface Serial2/2 match input-interface Serial2/3

Configurando Clasificacin Utilizando CoS


router(config-cmap)#

match cos cos-value [cos-value cos-value cos-value] Select up to four Cos or priority values.

Allowed values are 0 to 7.


This Clasificacin option can only be used on interfaces using 802.1Q or ISL encapsulation.
class-map Strict-priority match cos 5 ! class-map High-priority match cos 4 6 7 ! class-map Low-priority match cos 0 1 2 3

Configurando Clasificacin Utilizando Access Lists


Access lists are the oldest Clasificacin tool used with QoS Mecanismos. Class maps support all types of access lists. Class maps are multiprotocol. Class maps can use named access lists and numbered access lists (in the range from 1 to 2699) for all protocols.

Configurando Clasificacin Utilizando Access Lists


router(config-cmap)#

match access-group {number | name} [name]

Select an access list to be used for Clasificacin.


class-map Telnet match access-group 100 ! class-map IPX_Printers match access-group name IPX_Printers ! access-list 100 permit tcp any any eq 23 access-list 100 permit tcp any eq 23 any ! ipx access-list sap IPX_Printers permit -1 7

Configurando Clasificacin Utilizando IP Precedence


router(config-cmap)#
match ip precedence ip-prec-value [ip-prec [ip-prec [ip-prec]]]

Select up to four IP precedence values or names. All packets marked with one of the selected IP precedence values are matched by this class map.
class-map VoIP match ip precedence 5 ! class-map Mission-Critical match ip precedence 3 4 ! class-map Transactional match ip precedence 1 2 ! class-map Best-Effort match ip precedence routine

Configurando Clasificacin Utilizando DSCP


router(config-cmap)#

match ip dscp ip-dscp-value [ip-dscp-value ...]

Select up to eight DSCP values or names. All packets marked with one of the selected DSCP values are matched by this class map.

Configurando Clasificacin Utilizando DSCP


class-map Voice match ip dscp ef cs5 ! class-map Mission-Critical match ip dscp af31 af32 af33 cs3 ! class-map Transactional match ip dscp af21 af22 af23 cs2 ! class-map Bulk match ip dscp af11 af12 af13 cs1 ! class-map Best-Effort match ip dscp default

Configurando Clasificacin Utilizando a UDP Port Range


router(config-cmap)#

match ip rtp starting-port-number port-range


Use this command to implement Clasificacin equal to IP RTP Priority.

All UDP packets with source or destination port numbers within the specified range are matched.
Range is between the starting-port (values from 2000 to 65535) and the sum of the starting-port and the port-range (values from 0 to 16383). The command should be used in combination with class-based lowlatency queuing to implement RTP Priority using MQC.

class-map RTP match ip rtp 16384 16383

Monitoreando Class Maps


router>

show class-map [class-map-name]

Displays all class maps and their matching criteria


router>show class-map Class Map match-any class-default (id 0) Match any Class Map match-all Well-known-services (id 2) Match access-group 100 Class Map match-any All-services (id 4) Match class-map Well-known-services Match class-map Unknown-services Class Map match-all Unknown-services (id 3) Match not class-map Well-known-services

Utilizando MQC para Class-Based Marking

Opciones MQC Marking


Packets

can be marked with one of the following markers:


IP precedence IP DSCP QoS group MPLS experimental bits IEEE 802.1Q or ISL CoS/priority bits Frame Relay DE bit ATM CLP bit

Configurando Class-Based Marking


router(config)#

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

1. Create class map: A traffic class (match access list, input interface, IP precedence, DSCP, protocol [NBAR] src/dst MAC address).
router(config)#

policy-map policy-map-name

2. Create policy map (service policy): Associate a class map with one or more QoS marking policies.
router(config-if)#

service-policy {input | output} policy-map-name

3. Attach service policy: Associate the policy map to an input or output interface.

Configurando Class-Based Marking


class-map Well-known-services match access-group 100 ! class-map Unknown-services match not class-map Well-known-services ! policy-map set-DSCP class Well-known-services set DSCP AF21 class Unknown-services set DSCP 0 ! access-list 100 permit tcp any any lt 1024 access-list 100 permit tcp any lt 1024 any ! Interface ethernet 0/0 service-policy input set-DSCP

Configurando CoS Marking


router(config-pmap-c)#

set cos cos-value Mark frames with the specified value (0 to 7). The value applies to the CoS bits with the IEEE 802.1Q encapsulation or priority bits with the ISL encapsulation. The command can only be used on LAN interfaces that are using one of the two mentioned encapsulations.
policy-map SetCoS class Class1 set cos 1 class Class2 set cos 2 class Class3 set cos 3

Configurando IP Precedence Marking


router(config-pmap-c)#

set ip precedence ip-precedence-value

Mark IP packets with the specified IP precedence value. IP precedence can be set using a value (0 to 7) or a corresponding name (for example, routine, priority, immediate).
policy-map SetPrec class Class1 set ip precedence priority class Class2 set ip precedence flash class Class3 set ip precedence 5

Configurando IP DSCP Marking


router(config-pmap-c)#

set [ip] dscp ip-dscp-value

Mark IP packets with the specified DSCP value. DSCP can be set using a value (0 to 63) or a corresponding name (for example, af11, af12, af13, af21, ef, cs1, default).

policy-map SetDSCP class Class1 set ip dscp af11 class Class2 set ip dscp af21 class Class3 set ip dscp ef

Monitoreando Class-Based Marking


Router>

show policy-map [policy-map] Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps.
router#show policy-map
Policy Map SetCoS Class Class1 set cos 1 Class Class2 set cos 2 Class Class3 set cos 3 Class Class4 set cos 4 Class Class5 set cos 5 Class Class6 set cos 6 Class Class7 set cos 7

Monitoreando Class-Based Marking


Router>

show policy-map interface interface-name Displays the configuration of all classes configured for all service policies on the specified interface.
router#show policy-map interface serial 0/0 Serial0/0

Service-policy input: SetMPLS (1837)


Class-map: Class1 (match-any) (1839/12) 0 packets, 0 bytes 30 second offered rate 0 bps, drop rate 0 bps Match: qos-group 1 (1843) 0 packets, 0 bytes 30 second rate 0 bps QoS Set mpls experimental 1 ...

Introduccin al Encolamiento (Queuing)

Congestion and Queuing

Una congestin puede ocurrir en cualquier punto de la red donde hay un mitmatch de velocidad , agregacin o confluencia.

Administrar la congestin para proporcionar ancho de banda y retardo garantizado.

Congestion and Queuing Speed Mismatch

Speed mismatches are the most typical cause of congestion. Possibly persistent when going from LAN to WAN. Usually transient when going from LAN to LAN.

Congestion and Queuing Speed Mismatch

Speed mismatches are the most typical cause of congestion. Possibly persistent when going from LAN to WAN. Usually transient when going from LAN to LAN.

Congestion and Queuing Aggregation

Congestion and Queuing Aggregation

Mecanismos de encolamiento

FIFO PQ Round robin y WRR WFQ DRR CBWFQ LLQ

FIFO
packet in is first packet out Simplest of all One queue All individual queues are FIFO FIFO est limitado por su bufer.
First

No es recomendable para QoS.

FIFO
FIFO est limitado por su buffer.
Este algoritmo, al igual que ocurre con el resto de mecanismo de cola, tiene como limitacin la capacidad de su bufer en momentos de congestin.

No es recomendable para QoS.

Hoy en da se necesitan algoritmos ms sofisticados, que permiten diferenciar entre distintos tipos de paquete, por lo que este mtodo est cayendo en desuso.

FIFO Queuing

The software FIFO queue is basically an extension of the hardware FIFO queue.

FIFO Queuing

The software FIFO queue is basically an extension of the hardware FIFO queue.

FIFO Queuing

The software FIFO queue is basically an extension of the hardware FIFO queue.

FIFO Queuing

The software FIFO queue is basically an extension of the hardware FIFO queue.

FIFO Queuing

The software FIFO queue is basically an extension of the hardware FIFO queue.

Prioritizing Traffic (PQ)


Da prioridad estricta al trfico importante
Asegura que el trfico importante reciba un servicio rpido en cada punto de la red, donde est mecanismo este presente.

Existen 4 clases de prioridad de trfico


En el mecanismo PQ, cada uno de los paquetes debe de ser colocado en una de las cuatro posibles colas (alta, media, normal, baja prioridad), servidas en riguroso orden de prioridad, lo cual puede crear inanicin. Ofrece garantas totales. Las prioridades se definen por filtros en los routers.

Prioritizing Traffic (PQ)


Clasificacin: Protocolo,interfaz de acceso dir. Origen y destino, tamao del paquete.
Inconveniente: Este mtodo es esttico y no se adapta a los requerimientos de la red. Adems, puede crear inanicin, es decir dejar fuera de servicio a trfico menos prioritario.

PQ: Prioritizing Traffic.

Round Robin

Uses multiple queues No prioritization Dispatches one packet from each queue in each round One packet from Queue no. 1 One packet from Queue no. 2 One packet from Queue no. 3 Then repeat

Weighted Round Robin

Allows prioritization Assign a weight to each queue Dispatches packets from each queue proportionally to an assigned weight: Dispatch up to 4 from Queue no. 1 Dispatch up to 2 from Queue no. 2 Dispatch 1 from Queue no. 3 Go back to Queue no. 1

Weighted Round Robin

Problem

with WRR

Some implementations of WRR dispatch a configurable number of bytes (threshold) from each queue for each roundseveral packets can be sent in each turn. The router is allowed to send the entire packet even if the sum of all bytes is more than the threshold.

Weighted fair queuing (WFQ)


WFQ es adaptativo a los cambios en la red Proporciona un buen tiempo de respuesta WFQ es un algoritmo basado en flujos.
197

Weighted fair queuing (WFQ)

WFQ es un algoritmo de cola basado en flujos (o sesiones), que realiza dos tareas simultneamente y de forma automtica:
Organiza el trfico (de tiempo real), ponindolo al principio de la cola, reduciendo as el tiempo de respuesta. Comparte equitativamente el resto del ancho de banda, entre el resto de trfico de alta prioridad WFQ asegura que las diferentes colas no se queden privadas de un mnimo ancho de banda, de modo que el servicio proporcionado al trfico es ms predecible. Considera flujos de poco caudal con flujos sensibles al retardo, por ej. VOIP No es escalable dentro de una gran red.

Esquema grfico (WFQ)

Funcionamiento de CBWFQ
La falta de escalabilidade WFQ se soluciona con Class Based WFQ. Estructura interna del interface de salida

Bwi < 75%


Los paquetes llegan clasificados, ya no tenemos en cuenta los flujos independientes, solo la clase.
200

WFQ Clasificacin

Packets of the same flow end up in the same queue.

The ToS field is the only parameter that might change, causing packets of the same flow to end up in different queues.

WFQ Clasificacin

A fixed number of per-flow queues is configured. A hash function is used to translate flow parameters into a queue number. System packets (8 queues) and RSVP flows (if configured) are mapped into separate queues. Two or more flows could map into the same queue, resulting in lower per-flow bandwidth. Important: the number of queues configured has to be larger than the expected number of flows.

Configurando WFQ
router(config-intf)#

fair-queue [cdt [dynamic-queues [reservablequeues]]]

CDT

dynamic-queues
reservable-queues

WFQ Configuration Parameters


router(config-if)#

hold-queue max-limit out

Specifies the maximum number of packets that can be in all output queues on the interface at any time. The default value for WFQ is 1000.

Under special circumstances, WFQ can consume a lot of buffers, which may require lowering this limit.

WFQ Configuration Defaults


Fair

queuing is enabled by default:

On physical interfaces whose bandwidth is less than or equal to 2.048 Mbps On interfaces configured for Multilink PPP
Fair

queuing is disabled:

If you enable the autonomous or silicon switching engine Mecanismos For any sequenced encapsulation: X.25, SDLC, LAPB, reliable PPP

Monitoreando WFQ
router>

show interface interface Displays interface delays including the activated queuing mechanism with the summary information
Router>show interface serial 1/0 Hardware is M4T Internet address is 20.0.0.1/8 MTU 1500 bytes, BW 19 Kbit, DLY 20000 usec, rely 255/255, load 147/255 Encapsulation HDLC, crc 16, loopback not set Keepalive set (10 sec) Last input 00:00:00, output 00:00:00, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/4/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) 5 minute input rate 18000 bits/sec, 8 packets/sec 5 minute output rate 11000 bits/sec, 9 packets/sec rest deleted ...

Monitoreando WFQ
router>

show queue interface-name interface-number Displays detailed information about the WFQ system of the selected interface
Router>show queue serial 1/0 Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair Output queue: 2/1000/64/0 (size/max total/threshold/drops) Conversations 2/4/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated)

(depth/weight/discards/tail drops/interleaves) 1/4096/0/0/0 Conversation 124, linktype: ip, length: 580 source: 193.77.3.244, destination: 20.0.0.2, id: 0x0166, ttl: 254, TOS: 0 prot: 6, source port 23, destination port 11033
(depth/weight/discards/tail drops/interleaves) 1/4096/0/0/0 Conversation 127, linktype: ip, length: 585 source: 193.77.4.111 destination: 40.0.0.2, id: 0x020D, ttl: 252, TOS: 0 prot: 6, source port 23, destination port 11013

Definicin de clases
Las clases utilizadas en CBWFQ pueden asociarse a:

Flujos (direcciones origen-destino, protocolo, puertos) Prioridades (campo DS differentiated service, otras etiquetas) Interfaces de entrada/salida VLAN

Estas clases se implementan filtrando el trfico con filtros en los routers. Este proceso se llama clasificacin de trfico, que puede ir acompaado a su vez con proceso de marcado de paquetes. El servicio recibido en funcin de esta clasificacin se asocia a la poltica de servicio.
208

Class-Based Weighted Fair Queuing


CBWFQ

is a mechanism that is used to guarantee bandwidth to classes. CBWFQ extends the standard WFQ functionality to provide support for userdefined traffic classes.
Classes are based on user-defined match criteria. Packets satisfying the match criteria for a class constitute the traffic for that class.

queue is reserved for each class, and traffic belonging to a class is directed to that class queue.

CBWFQ Architecture

Supports multiple classes (depending on platform)

CBWFQ Architecture

Supports multiple classes (depending on platform)

CBWFQ Architecture

Supports multiple classes (depending on platform)

CBWFQ Architecture

Supports multiple classes (depending on platform)

CBWFQ Architecture: Clasificacin


Clasificacin

uses class maps. Availability of certain Clasificacin options depends on the Cisco IOS version. Some Clasificacin options depend on type of interface and encapsulation where service policy is used. For example:

Matching on Frame Relay discard eligible bits can only be used on interfaces with Frame Relay encapsulation. Matching on MPLS experimental bits has no effect if MPLS is not enabled. Matching on ISL priority bits has no effect if ISL is not used.

CBWFQ Architecture: Insertion Policy


Each

queue has a maximum number of packets that it can hold (queue size). The maximum queue size is platform-dependent. After a packet is classified to one of the queues, the router will enqueue the packet if the queue limit has not been reached (tail-drop within each class). WRED can be used in combination with CBWFQ to prevent congestion of the class.

CBWFQ Architecture: Scheduling


CBWFQ

guarantees bandwidth according to weights assigned to traffic classes. Weights can be defined by specifying:
Bandwidth (in kbps) Percentage of bandwidth (percentage of available interface bandwidth) Percentage of remaining available bandwidth

One

service policy can not have mixed types of weights. The show interface command can be used to display the available bandwidth.

CBWFQ Architecture: Available Bandwidth

Available bandwidth is calculated according to the following formula:

CBWFQ Architecture: 75 Percent Rule

Add Class bandwidths RSVP maximum reserved bandwidth Result must be less than or equal to 75% of interface bandwidth (or Frame Relay, DLCI, CIR) Leaves headroom for overhead traffic such as layer 2 keepalives and bandwidth for the class default traffic

The 75% rule is a conservative rule


max-reserved-bandwidth command overrides 75% limit, but seldom recommended

CBWFQ Benefits
+

Benefits

Minimum bandwidth allocation Finer granularity and scalability MQC interface easy to use Maximizes transport of priority traffic Weights guarantee minimum bandwidth Unused capacity shared among the other classes Queues separately configured for QoS

Drawbacks
Voice traffic can still suffer unacceptable delay

Configurando CBWFQ
router(config-pmap-c)#

bandwidth bandwidth

Allocates a fixed amount of bandwidth to a class

Sets the value in kbps


router(config-pmap-c)#

bandwidth percent percent

Allocates a percentage of bandwidth to a class


The configured (or default) interface bandwidth is used to calculate the guaranteed bandwidth
router(config-pmap-c)#

bandwidth remaining percent percent

Allocates a percentage of available bandwidth to a class

Configurando CBWFQ
router(config-pmap-c)#

queue-limit queue-limit

Sets the maximum number of packets this queue can hold The default maximum is 64

router(config-pmap-c)#

fair-queue [number-of-dynamic-queues]

The class-default class can be configured to use WFQ. The number of dynamic queues is a power of 2 number in the range from 16 to 4096, specifying the number of dynamic queues

Configurando CBWFQ
Router(config)# access-list 101 permit udp host 10.10.10.10 host 10.10.10.20 range 16384 20000 Router(config-if)# access-list 102 permit udp host 10.10.10.10 host 10.10.10.20 range 53000 56000 Router(config)# class-map class1 Router(config-cmap)# match access-group 101 Router(config-cmap)# exit Router(config-cmap)# class-map class2 Router(config-cmap)# match access-group 102 Router(config-cmap)# exit Router(config)# policy-map policy1 Router(config-pmap)# class class1 Router(config-pmap-c)# bandwidth 3000 Router(config-pmap-c)# queue-limit 30 Router(config-pmap-c)# exit Router(config-pmap)# class class2 Router(config-pmap-c)# bandwidth 2000 Router(config-pmap-c)# exit

Monitoreando CBWFQ
router>

show policy-map interface [interface]

Displays parameters and statistics of CBWFQ


router>show policy-map interface FastEthernet0/0 Service-policy output: Policy1

Class-map: Class1 (match-any) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any Weighted Fair Queueing Output Queue: Conversation 265 Bandwidth remaining 20 (%) Max Threshold 64 (packets) (pkts matched/bytes matched) 0/0 (depth/total drops/no-buffer drops) 0/0/0 Class-map: class-default (match-any) 42 packets, 4439 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any

LLQ

Mtodos bsicos son combinados para crear mas mecanismos verstiles

Low Latency Queue


LLQ se comporta como una Priority Queue.

V: voice

LLQ es recomendable para trfico multimedia (VoIP) que requiere de unas caractersticas muy especiales: bajo retardo y jitter.

Se puede configurar junto al resto de colas CBWFQ como una cola ms asociada a una clase determinada.
226

Low-Latency Queuing
Priority queue added to CBWFQ for realtime traffic High-priority classes are guaranteed:

Low-latency propagation of packets Bandwidth

High-priority classes are also policed when congestion occurs they can then not exceed their guaranteed bandwidth Lower priority classes use CBWFQ

LLQ Architecture

LLQ Architecture

LLQ Architecture

LLQ Architecture

LLQ Benefits
Benefits
High-priority

classes are guaranteed:

Low-latency propagation of packets Bandwidth


Consistent

configuration and operation across all media types Entrance criteria to a class can be defined by an ACL
Not limited to UDP ports as with IP RTP priority Defines trust boundary to ensure simple Clasificacin and entry to a queue

Configurando LLQ
router(config-pmap-c)#

priority bandwidth [burst]

Allocates a fixed amount of bandwidth (in kbps) to a class and ensures expedited forwarding. Traffic exceeding the specified bandwidth is dropped if congestion exists; otherwise, policing is not used.
router(config-pmap-c)#

priority percent percentage [burst]

Allocates a percentage of configured or default interface bandwidth to a class and ensures expedited forwarding.
Traffic exceeding the specified bandwidth is dropped if congestion exists; otherwise, policy is not used.

Configurando LLQ
class-map voip match ip precedence 5 ! class-map mission-critical match ip precedence 3 4 ! class-map transactional match ip precedence 1 2 ! policy-map Policy1 class voip priority percent 10 class mission-critical bandwidth percent 30 random-detect class transactional bandwidth percent 20 random-detect class class-default fair-queue random-detect

Monitoreando LLQ
router>

show policy-map interface interface


Displays the packet statistics of all classes that are configured for all service policies either on the specified interface or subinterface
router>show policy-map interface fastethernet 0/0 FastEthernet0/0

Service-policy output: LLQ


Class-map: LLQ (match-any) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any Weighted Fair Queueing Strict Priority Output Queue: Conversation 264 Bandwidth 1000 (kbps) Burst 25000 (Bytes) (pkts matched/bytes matched) 0/0 (total drops/bytes drops) 0/0 Class-map: class-default (match-any) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any

Colas de Hardware y Software

Componentes de encolamiento

Cada

interfaz fsica tiene sistemas de hardware y software

Queuing Components (Cont.)

La cola de Software

Generally, a full hardware queue indicates interface congestion and software queuing is used to manage it.

When a packet is being forwarded, the router will bypass the software queue if the hardware queue has space in it (no congestion).

Tamao de la cola de Hardware (TxQ)

Routers determine the length of the hardware queue based on the configured bandwidth of the interface. The length of the hardware queue can be adjusted with the txring-limit command. Reducing the size of the transmit ring has two benefits:

It reduces the maximum amount of time packets wait in the FIFO queue before being transmitted. It accelerates the use of QoS in the Cisco IOS software.

Improper tuning of the hardware queue may produce undesirable results:


Long TxQ may result in poor performance of the software queue. Short TxQ may result in a large number of interrupts, which causes high CPU utilization and low link utilization.

Congestion en interfaces de Software

Subinterfaces and software interfaces do not have their own separate tx ring, therefore no congestion can occur.
Dialers, tunnels, Frame Relay subinterfaces They congest when their main hardware interface tx-ring congests

The tx-ring state (full, not full) is, therefore, an indication of congestion for software interfaces. Only hardware interfaces have a tx-ring.

Implementaciones de enconlamiento in Cisco IOS


Priority

queuing
queuing

Implementation of priority queuing Four queues (high, medium, normal, low)

Custom

Implementation of weighted round robin Up to 16 queues Threshold based on number of bytes Configurable priority queues Inaccurate bandwidth allocation due to threshold issue with weighted round robin

Modified

deficit round robin

Deficit round robin with a priority queue for Cisco 12xxx routers

Traffic Policing y Shaping

Traffic Policing and Shaping Overview

Porque usar Policy? Porque usar Shaping?

Traffic Policing Example

Traffic Policing Example

Traffic Shaping Example

Traffic Shaping Example

Central to remote site speed mismatch

Traffic Shaping Example

Central to remote site speed mismatch Remote to central site over-subscription

Traffic Shaping Example

Central to remote site speed mismatch Remote to central site over-subscription Both situations result in buffering and in delayed or dropped packets

Policing vs. Shaping

Incoming and outgoing directions Out-of-profile packets are dropped Dropping causes TCP retransmits Supports packet marking or re-marking Less buffer usage (shaping requires an additional shaping queuing system)

Outgoing direction only Out-of-profile packets are queued until a buffer gets full Buffering minimizes TCP retransmits Marking or re-marking not supported Shaping supports interaction with Frame Relay congestion indication

Single Token Bucket

If sufficient tokens are available (conform action): Tokens equivalent to the packet size are removed from the bucket. The packet is transmitted.

Single Token Bucket

If sufficient tokens are NOT available (exceed action): Drop (or mark) the packet

Single Token Bucket (Cont.)

If sufficient tokens are NOT available (exceed action): Drop (or mark) the packet

Single Token Bucket ClassBased Policing

Bc is normal burst size Tc is the time interval CIR is the committed information rate CIR = Bc / Tc

Dual Token Bucket (Single Rate) Class-Based Policing

Be: Excess burst size Tc: Tokens in Bc bucket Te: Tokens in Be bucket The return value is conform or exceed or violate

Dual Token Bucket (Single Rate) Class-Based Policing (Cont.)

Traffic is conforming, exceeding, or violating

Dual-Rate Class-Based Policing

Tc: Tokens in CIR bucket Tp: Tokens in PIR bucket Enforce traffic policing according to two separate rates:
Committed Information Rate Peak Information Rate

Class-Based Traffic Shaping

Resumen

Resumen

Aplicando Rate Limiting

Configurando Class-Based Traffic Policing

Class-Based Policing Overview


Class-based

policing is used to rate-limit a traffic class to a configured bit rate. Class-based policing can drop or re-mark and transmit exceeding traffic. Class-based policing can be implemented using a single or dual token bucket scheme. Class-based policing supports multiaction policing:

Applying two or more set parameters as a conform or exceed or violate action

Class-based policing conforms to two RFC 2697, A Single Rate Three Color Marker RFC 2698, A Two Rate Three Color Marker Class-based

RFCs:

method.

policing is configured using the MQC

Configurando Single-Rate ClassBased Policing


router(config-pmap-c)#

police avg-rate [BC [BE]] [conform-action action] [exceed-action action] [violate-action action]

avg-rate: Traffic rate in bps (8,000 to 200,000,000) BC : normal burst sets the size in bytes
Default is 1500 bytes, or CIR / 32, whatever is higher

BE: Excess burst sets the size in bytes


Default is BC

action:
transmit (default conform action) drop (default exceed and violate action) set-prec-transmit ip-precedence set-dscp-transmit dscp set-qos-transmit qos-group set-mpls-exp-transmit mple-exp set frde-transmit set-clp-transmit

Class-Based Policing Example: Single Rate, Single Token Bucket

Class-Based Policing Example: Single Rate, Dual Token Bucket

Class-Based Policing Example: Multiactions Class-Based Policing

Available in Cisco IOS 12.2(8)T Mainly Used for Setting Layer 2 and Layer 3 QoS Fields

Configurando Dual-Rate ClassBased Policing


router(config-pmap-c)#

police {cir cir} [bc conform-burst] {pir pir} [be peak-burst] [conform-action action] [exceed-action action] [violate-action action]

Specifies both the CIR and the PIR for two-rate traffic policing CIR = committed information rate (bps) PIR = peak information rate (bps) The bc and be keywords and their associated arguments (conform-burst and peak-burst, respectively) are optional Available in Cisco IOS Release 12.2(4)T

Class-Based Policing Example: Dual Rate Class-Based Policing

Configurando Percentage-Based Class-Based Policing


router(config-pmap-c)#

police cir percent percent [bc conform-burst-in-msec] [pir percent percent] [be peak-burst-in-msec] [conform-action action] [exceed-action action] [violate-action action]

Enables the same policy map for multiple interfaces with different bandwidths Available in Cisco IOS Release 12.2(13)T
policy-map police1 class bulk-ftp police cir percent 20 pir percent 40 conform-action set-dscp-transmit af11 exceed-action set-dscp-transmit 0 violate-action drop ! interface Ethernet 0/0 service-policy input police1 ! interface Serial 0/0 service-policy input police1

Monitoreando Class-Based Policing


router#show policy interface Ethernet 0/0 Ethernet0/0 Service-policy input: police1 Class-map: bulk-ftp (match-all) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: protocol ftp police: cir 20 % cir 2000000 bps, bc 62500 bytes pir 40 % pir 4000000 bps, be 125000 bytes conformed 0 packets, 0 bytes; actions: set-dscp-transmit cs1 exceeded 0 packets, 0 bytes; actions: set-dscp-transmit default violated 0 packets, 0 bytes; actions: drop conformed 0 bps, exceed 0 bps, violate 0 bps ...

Class-Based Shaping

Class-Based Shaping Overview

Traffic Shaping Methods


Class-based shaping has two Shaping to the configured average rate Shaping to the peak rate Average

shaping methods:

rate is forwarding packets at the configured average rate with allowed bursting up to Be when there are extra tokens available. This is the more common method used. Peak rate is forwarding packets at the peak rate of up to Bc + Be of traffic at every Tc. However, traffic sent above the CIR may be dropped during network congestion. Peak rate shaping recommended when:

Network has additional bandwidth available Application tolerates occasional packet loss

Configurando Class-Based Shaping


router(config-pmap-c)#

shape {average | peak} average-bit-rate [Bc] [Be]

It is recommended that you omit the Bc and Be to let Cisco IOS software select the optimal values for these variables.
router(config-pmap-c)#

shape {average | peak} percent [Bc] [Be]

Specifies the bandwidth percentage. Valid range is a number from 1 to 100.


It is recommended that you omit the Bc and Be to let Cisco IOS software select the optimal values for these variables. The shape (percent) command cannot be configured for use in nested policy maps on 7500 routers or below.

Class-Based Shaping Example: Average Rate, Peak Rate


class-map Shape match protocol citrix ! policy-map ShapeAvg class Shape shape average 16000 ! policy-map ShapePeak class Shape shape peak 16000 ! interface Serial0/0 service-policy output ShapeAvg ! interface Serial0/1 service-policy output ShapePeak

Cisco IOS software calculated values: Bc=Be=8000 bits, Tc=500ms Peak Rate = AvgRate * (1+Be/Bc) = 16000 * (1+8000/8000) = 32000 bps

Class-Based Shaping Example: Class-Based Shaping with CBWFQ

Bandwidth statement provides a minimum bandwidth guarantee for the traffic class. Shape statement provides a maximum traffic rate for the traffic class, and exceed traffic is queued.

policy-map shape-cbwfq ! class cust1 shape average 384000 bandwidth 256 ! interface Serial 0/0 service-policy output shape-cbwfq

Class-Based Shaping Example: Class-Based Shaping Hierarchical Policy Maps

Monitoreando Class-Based Shaping


router>

show policy-map policy-map-name

Displays information about the indicated policy map, including the configuration of all classes for a specified service policy map
router>show policy-map shape-cbwfq Policy Map shape-cbwfq Class cust1 Traffic Shaping Average Rate Traffic Shaping CIR 384000 (bps) Max. Buffers Limit 1000 (Packets) Bandwidth 256 (kbps) Max Threshold 64 (packets)

Monitoreando Class-Based Shaping


router#show policy-map interface s0/0 Serial0/0 Service-policy output: shape-cbwfq Class-map: cust1 (match-all) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: access-group 101 Traffic Shaping Target/Average Byte Sustain Excess Interval Rate Limit bits/int bits/int (ms) 38400/38400 1968 7872 7872 207 Adapt Queue Packets Bytes Packets Bytes Active Depth Delayed Delayed 0 0 0 0 0 Queueing Output Queue: Conversation 266 Bandwidth 256 (kbps) Max Threshold 64 (packets) (pkts matched/bytes matched) 0/0 (depth/total drops/no-buffer drops) 0/0/0 Class-map: class-default (match-any) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any

Increment (bytes) 984 Shaping Active no

Mecanismos de Fragmentacin y Descarte

LFI Link Fragment and Interleaving

Fragmentacin e Insercin (LFI) Link Fragment and Interleaving

Llegada de un paquete IP a su cola de prioridad(estando esta vaca) mientras est saliendo de router en ese momento otro paquete perteneciente a otra clase retardo. El producido por un paquete con tamao de MTU de 1500 bytes en una lnea de 64 Kbps puede llegar: Retraso = ( 1500 bytes * 8 bits/byte) / 64.000 bps) = 187.5 ms

Problema:

Solucin: Troceamos los paquetes de datos en chunks de


10ms, es decir, que el tamao de un paquete ser igual al mximo flujo de informacin que se pueda enviar por la lnea en 10 ms. Los paquete de VoIP debern ser insertados entre estos paquetes, asegurando un retraso mucho menor. Los paquetes VoIP no deben fragmentarse !!

286

Ejemplo de uso de LFI


Antes

60-bytes Voz

1500-bytes Trama de datos


Retraso producido = 187.5 ms (Frame = 1500byte a 64 Kbps)

Usando LFI

Datos

Datos

Voz

Datos

287

Esquema grfico LFI

288

RED

RED

El algoritmo RED se tiene por objetivo evitar la congestin y de mantener el tamao medio de las colas en niveles bajos.
RED no necesita que los routers mantengan ninguna informacin del estado de las conexiones. RED fue diseado para trabajar en la colaboracin con un protocolo del control de la congestin de la capa de transporte (TCP, SCTP).

Deteccin aleatoria temprana (Random Early Detection, RED)

Notificacin es implcita
solo descarta el paquete (en TCP habr timeout) podra hacerse explcita marcando el paquete

Descarte aleatorio temprano

en lugar de esperar por que se llene la cola, descarta cada paquete de entrada con alguna probabilidad de descarte cada vez que la cola excede algn nivel de descarte

RED Perfiles

Sintona en RED

Probabilidad de descartar un flujo particular de paquetes es aproximadamente proporcional a parte del ancho de banda que el flujo est obteniendo
MaxP es tpicamente fijada en 0.02, es decir cuando el tamao promedio de la cola es la mitad entre los dos umbrales, el gateway descarta +o- uno de cada 50 paquetes.

Si el trfico es rafagoso, entonces MinThreshold debera ser suficientemente grande para permitir que la utilizacin del enlace sea mantenida a un nivel aceptablemente alto
Diferencia entre los dos umbrales debera ser ms grande que el incremento tpico en el largo de cola promedio calculado en un RTT; fijar MaxThreshold a dos veces MinThreshold es razonable para el trfico de hoy en Internet

Modos RED
RED has three modes: No drop: when the average queue size is between 0 and the minimum threshold Random drop: when the average queue size is between the minimum and the maximum threshold Full drop (tail drop): when the average queue size is at maximum threshold or above Random

drop should prevent congestion (prevent tail drops)

Configurando CB-WRED
router(config)#

class-map [match-any | match-all] class-name

1. Create Class Map: Used for matching packets to a specified class


router(config)#

policy-map policy-name

2. Create Policy Map (Service Policy): Specifies a traffic policy that can be attached to one or more interfaces
router(config-if)#

service-policy {input | output} policy-map-name

3. Attach Service Policy: Associates the policy map to an output interface or VC

Configurando CB-WRED (Cont.)


router(config-pmap-c)#

random-detect

Enables IP precedence-based WRED in the selected class within the service policy configuration mode. Default service profile is used.

Command can be used at the interface, per-VC (with random-detect-group), or the class level (service-policy). Precedence-based WRED is the default mode.
WRED treats non-IP traffic as precedence 0.

Configurando DSCP-Based CBWRED


router(config-pmap-c)#

random-detect dscp-based

Enables DSCP-based WRED.

Command can be used at the interface, per-VC (with random-detect-group), or the class level (service-policy). Default service profile is used.
The WRED random-detect command and the WFQ queuelimit command are mutually exclusive for class policy.

Monitoreando CB-WRED
router#

show policy-map interface interface-name

Displays the configuration of all classes configured for all service policies on the specified interface
router#show policy-map interface Ethernet 0/0 Ethernet0/0 Service-policy output: Policy1 Class-map: Mission-critical (match-all) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: ip precedence 2 Match: ip dscp 18 20 22 Weighted Fair Queueing Output Queue: Conversation 265 Bandwidth 30 (%) Bandwidth 3000 (kbps) (pkts matched/bytes matched) 0/0 (depth/total drops/no-buffer drops) 0/0/0 exponential weight: 9 mean queue depth: 0 Dscp Transmitted Random drop Tail drop Minimum Maximum Mark (Prec) pkts/bytes pkts/bytes pkts/bytes threshold threshold probability 0(0) 0/0 0/0 0/0 20 40 1/10 1 0/0 0/0 0/0 22 40 1/10 2 0/0 0/0 0/0 24 40 1/10 ...

Link Efficiency Mecanismos Overview


Link efficiency Mecanismos are often deployed on WAN links to increase the throughput and to decrease delay and jitter. Cisco IOS link efficiency Mecanismos include:

L2 payload compression (Stacker, Predictor, MPPC) Header compression (TCP, RTP, class-based TCP, and class-based RTP) LFI (MLP, FRF.12, and FRF.11.C)

Compression

L2 Payload Compression

L2 Payload Compression Results

Header Compression

Resultados Header Compression

Transporte de medios:
CODECS RTP (RTCP)
UDP IP

Cdecs
Se utilizan para transformar la seal analgica (voz) en una seal digital.

Aspectos a tener en cuenta por el cdec: Calidad de sonido. Ancho de banda requerido.

G.711 Cdec nativo de redes digitales modernas de telfonos, Ancho de banda de 64 kbps. Tiene el MOS de 4.1

Transporte de Medios: Requisitos


Identificacin

de carga til Qu codec? Cuantas tramas/paquete? Reconstruccin temporal Cuando reproducir cada paquete de un flujo Cmo sincronizar mltiples flujos (sincronizacin de labios,...) Secuenciamiento Cmo reproducir en orden correcto Cmo detectar prdidas.

RTP (Realtime Transport Protocol) IETF RFC 1889 ( 1996 )


Utiliza UDP - datagramas no confirmados Sin retransmisiones - demasiado lento Asignacin dinmica de puerto (mediante sealizacin) Cubre los requisitos de la transparencia anterior y adems permite: Difusin (multicast) Cifrado Mezcladores y Traductores de cdigo Realimentacin de QoS con RTCP

Cabecera RTP
V=2

P X

CC

Tipo de Carga Util

Nmero de Secuencia

Indicacin de Tiempo SSRC (32 bits) CSRC CSRC 1 ... CSRC n Dependiente del Perfil Datos 0 2 4 6 8 10 12 14 16 18 20 24 26 28 30 Tamao

0..32

Resumiendo:
Funciones del protocolo RTP Indicacin de la secuencia. Sincronismo entre los medios. Identificacin de la carga. Identificacin de la trama. Identificacin de la fuente.

RTCP
Protocolo

de control, proporciona informacin adicional a los participantes que permite adaptar las fuentes al estado de la red (p.ej. Congestin) En comunicaciones individuales (unicast) no es necesario pero es til.

RTCP
En

difusin, es imprescindible para conocer como reciben los distintos destinatarios y homogeneizar la calidad. Debe ser usado por todos los participantes y debe enviarse informacin peridicamente. El perodo se adapta al nmero de fuentes para evitar una avalancha de trfico de control.

RTCP. Funciones :
Realimentacin

de QoS. Los receptores informan a la fuente sobre su recepcin: prdidas, retardos, etc., de modo que la fuente puede adaptar su trfico a la congestin. Correlacin entre reloj global (NTP) y local. Identificacin: correo-e, n telefnico, etc. para identificar a los participantes Control de Sesiones Salir (Bye) Envo de notas entre participantes.

Prestaciones
RTP/RTCP,

etc. ayudan a compensar retardos Pero no pueden ocultar las insuficientes prestaciones de una red. La voz requiere calidad de servicio: poco retardo mnima fluctuacin baja prdida de paquetes Necesitamos otros mecanismos para asegurar QoS. (Seminario de protocolos de QoS)

MEJORES PRACTICAS DE QoS

Design Approach to Enabling QoS

Design Approach to Enabling QoS

Design Approach to Enabling QoS

QoS Traffic Requirements: Voice


Latency < 150 ms* Jitter < 30 ms* Loss < 1%* Requires guaranteed priority bandwidth per call 150 bps (+ Layer 2 overhead) guaranteed bandwidth for voicecontrol traffic per call

*one-way requirements

Provisioning for Voice: VoIP Bandwidth Reference Tables

QoS Traffic Requirements: Videoconferencing


Latency < 150 ms Jitter < 30 ms Loss < 1% Minimum priority bandwidth guarantee required is:

Video stream + 20% For example, a 384-kbps stream would require 460 kbps of bandwidth

*One-way

requirements

QoS Traffic Requirements: Data


Different applications have different traffic characteristics. Different versions of the same application can have different traffic characteristics.

Provisioning for Data: General Principles

Profile applications to their basic network requirements. Do not overengineer provisioning. Use no more than four to five traffic classes for data traffic:

Mission-Critical: Locally defined critical applications Transactional: ERP, SAP, Oracle Best-Effort: E-mail, unspecified Less-than-Best-Effort (Scavenger): Peer-to-peer applications

Do not assign more than three applications to mission-critical or transactional classes. Only group applications with common characteristics together into the same class. Most applications fall under best effort; make sure that adequate bandwidth is provisioned for this default class. Seek executive endorsement of relative ranking of application priority prior to rolling out QoS policies for data.

Requerimientos de QoS

Traffic Clasificacin and Scheduling


Identify the network traffic and its QoS requirements. 2. Classify the network traffic into the appropriate traffic classes and mark the network traffic as close to the source as possible. 3. Define the scheduling policy for each traffic class.
1.

Enterprise WAN Edge Bandwidth Allocation Example

The amount of maximum bandwidth to be allocated for the LLQ class depends on many factors such as the router platform, the traffic profiles, and QoS features enabled.

QoS Baseline Clasificacin Summary

QoS Baseline Clasificacin Summary

Principios Generales
Profile applications to their basic network requirements. Do not over-engineer provisioning. Use no more than 4 to 5 traffic classes for data traffic:

Mission-Critical: Locally defined critical applications Transactional: ERP, SAP, Oracle Best-Effort: E-mail, unspecified Less-than-best-effort (Scavenger): Point-to-point applications

Do not assign more than 3 applications to MissionCritical or Transactional classes. Use proactive policies before reactive (policing) policies. Seek executive endorsement of relative ranking of application priority prior to rolling out QoS policies for data.

Enterprise to Service Provider QoS Class Mapping Example

WAN Edge LLQ Configuration Example 2


Mapping enterprise service classes to service provider supported service classes

Service Provider SLA Example

This is just an example. The actual SLA offered by service providers may vary.

Desarollo de QoS End-to-End

Branch QoS is similar to Campus QoS

Desarollo de QoS End-to-End

Implementacin en el Campus

Lneas Guas Campus QoS General

Implementaciones en Acceso y distribucin Implementation

Implementacion en la WAN

Implementaciones en Service Provider

Service Provider Backbone

PE-to-P QoS PE Outbound

P-to-P QoS P Outbound

P-to-PE QoS P Outbound

PE-to-CE QoS for Frame Relay Access PE Outbound

PE-to-CE QoS for Frame Relay Access PE Outbound (Cont.)

Ing. Andres Almeida CCNP CCDP CCIP

Tienen alguna pregunta?

Ing. Andres Almeida CCNP CCDP CCIP

Fin

Muchas gracias!
Preguntas?

S-ar putea să vă placă și