Anda di halaman 1dari 16

Class of Service

2010 Juniper Networks, Inc. All rights reserved. | www.juniper.net

Que es Class of Service?


CoS proporciona mecanismos para clasificar
el trfico y el cumplimiento de los requisitos
de rendimiento dentro de una red:
Voice
Packet A

Packet A Packet B Packet C

Video
Packet B

Data
Packet C

Note: CoS no hace a la red ms rpido o reducen la


congestin!!
2010 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 2

Cumplir los requisitos de rendimiento


CoS cumple con los requisitos de rendimiento de
una red:
Priorizar el trfico sensible a la latencia como VoIP.
El control de la congestin para garantizar el nivel
acordado.
La asignacin de ancho de banda para diferentes
Voic
Voic
clases de trfico.
e

VoIP

VoIP

Data

Data

Data

Data

Los dispositivos deben tratar el trfico constantemente a lo largo de

2010 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 3

Clases de reenvio: (Forwarding Classes)


Forwarding classes:
Identificar el trfico que debe recibir tratamiento
comn
Se utiliza para asignar el trfico
a colas
Output Queue
Forwarding
Class de salida
Voice
Packet A

Packet A Packet B Packet C

Video
Packet B
Data
Packet C

2010 Juniper Networks, Inc. All rights reserved.

Queue 2

Queue 1

Queue 0

www.juniper.net | 4

Prioridad de perdida drop- (loss priority)


Loss priority:
Identifica la prioridad que el Sistema da a los
paquetes
Usa la prioridad para descartar paquetes en ese
orden en caso de congestion.
If congestion exists
Drop
last
VoIP

Voice

Data
Drop first

2010 Juniper Networks, Inc. All rights reserved.

Data

www.juniper.net | 5

Cola (Queuing)
Dat
a

Default queue and forwarding


class:
0: best-effort
1: expedited-forwarding
2: assured-forwarding

Dat
a

Forwarding classes map de


colas:

Queue 0 Queue 1 Queue 2 Queue 3


(NC)
(EF)
(AF)
(BE)

Scheduler Map

3: network-control

2010 Juniper Networks, Inc. All rights reserved.

Queue
0
1
2
3

Dat
a

user@router> show class-of-service forwarding-class


Forwarding class
ID
best-effort
0
expedited-forwarding
1
assured-forwarding
2
network-control
3

Dat
a

Displays current queue and forwarding class mappings

www.juniper.net | 6

Defining Forwarding Classes


Configure forwarding classes en:
[edit class-of-service forwarding-class]:
[edit class-of-service]
user@router# set forwarding-classes queue 0 general-traffic
[edit class-of-service]
user@router# set forwarding-classes queue 1 important-traffic
[edit class-of-service]
user@router# set forwarding-classes queue 2 critical-traffic
[edit class-of-service]
user@router# commit
commit complete
[edit class-of-service]
user@router# run show class-of-service forwarding-class
Forwarding class
ID
general-traffic
0
important-traffic
1
critical-traffic
2
network-control
3
2010 Juniper Networks, Inc. All rights reserved.

Queue
0
1
2
3
www.juniper.net | 7

Descripcin Programacin

Dat
a

Defines the order


Priority
in which packets
Transmission ratetransmit
Defines the
Buffer size
storage and
RED configurationdropping of

Dat
a

Components of scheduling:

packets
Queue 0 Queue 1 Queue 2 Queue 3

Scheduler Map

Dat
a
Dat
a

2010 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 8

Prioridad de la cola
Colas recibirn servicio de acuerdo a su
prioridad:
Queue 3
(H)
6 4

Dat
a

Queue 2
(MH)
2
Queue 1
(ML)
3
Queue 0
(L)
5 1

2010 Juniper Networks, Inc. All rights reserved.

Serviced first
Scheduler Map

High
Medium high
Medium low
Low

5 1 3 2 6 4

Serviced last

www.juniper.net | 9

Definir planificadores (Schedulers)


Configure schedulers en
edit class-of-service schedulers]
[edit class-of-service schedulers]
user@router# set sched-best-effort transmit-rate percent 40
[edit class-of-service schedulers]
user@router# set sched-best-effort buffer-size percent 40
[edit class-of-service schedulers]
user@router# set sched-best-effort priority low
[edit class-of-service schedulers]
user@router# show
sched-best-effort {
transmit-rate percent 40;
buffer-size percent 40;
priority low;
}

2010 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 10

Definir mapa de Planificacion (scheduler


)
Programamos mapas asociados con las
clases y las colas de reenvo
[edit class-of-service scheduler-maps]
user@router# set sched-map-example forwarding-class best-effort scheduler sched-BE
[edit class-of-service scheduler-maps]
user@router# set sched-map-example forwarding-class expedited-forwarding scheduler sched-EF
[edit class-of-service scheduler-maps]
user@router# set sched-map-example forwarding-class assured-forwarding scheduler sched-AF
[edit class-of-service scheduler-maps]
user@router# set sched-map-example forwarding-class network-control scheduler sched-NC
[edit class-of-service scheduler-maps]
user@router# show
sched-map-example {
forwarding-class best-effort scheduler sched-BE;
forwarding-class expedited-forwarding scheduler sched-EF;
forwarding-class assured-forwarding scheduler sched-AF;
forwarding-class network-control scheduler sched-NC;
}

2010 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 11

Aplicamos los mapas programados


Aplicamos los mapas programados a la salida
del interface:
[edit class-of-service interfaces]
(Se permiten comodines para el nombre del interface)
[edit class-of-service interfaces]
user@router# set ge-0/0/0 scheduler-map sched-map-example
[edit class-of-service interfaces]
user@router# set fe-* scheduler-map sched-map-example
[edit class-of-service interfaces]
user@router# show
fe-* {
scheduler-map sched-map-example;
}
ge-0/0/0 {
scheduler-map sched-map-example;
}
2010 Juniper Networks, Inc. All rights reserved.

Applies a
scheduler map
to all Fast
Ethernet
interfaces

www.juniper.net | 12

Monitoring the Results (1 of 2)


user@R1> show class-of-service interface ge-0/0/3
Physical interface: ge-0/0/3, Index: 134
Queues supported: 8, Queues in use: 4
Scheduler map: professor-student-scheduler, Index: 15041
Logical interface: ge-0/0/3.0, Index: 68
Object
Name
Rewrite
ipprec-default
Classifier
ipprec-default

Displays CoS
setting for the
specified interface

Type
ip
ip

user@R1> show interfaces ge-0/0/3 detail | find "Egress queues"


Egress queues: 8 supported, 4 in use
Queue counters:
Queued packets Transmitted packets
0 best-effort
5105
5105
1 students
116136
116136
2 professors
79268
79268
3 network-cont
103
103

Index
31
12

Dropped packets
0
0
0
0

Displays queued(en cola), transmitted,


and dropped packets for each queue
associated with the specified interface

2010 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 13

Monitoring the Results (2 of 2)


user@R1> show interfaces queue ge-0/0/3
Physical interface: ge-0/0/3, Enabled, Physical link is Up
Interface index: 134, SNMP ifIndex: 115
Forwarding classes: 8 supported, 4 in use
Egress queues: 8 supported, 4 in use
Queue: 0, Forwarding classes: best-effort
Queued:
Packets
:
5818
Bytes
:
570108
Transmitted:
Packets
:
5818
Bytes
:
570108
Tail-dropped packets :
0
RED-dropped packets :
0
Low
:
0
Medium-low
:
0
Medium-high
:
0
High
:
0
RED-dropped bytes
:
0
Low
:
0
Medium-low
:
0
Medium-high
:
0
High
:
0
Queue: 1, Forwarding classes: students
Queued:
Packets
:
116136
Bytes
:
149350896

2010 Juniper Networks, Inc. All rights reserved.

Displays queue
statistics for the
specified
interface
0 pps
0 bps
0
0
0
0
0
0
0
0
0
0
0
0
0

pps
bps
pps
pps
pps
pps
pps
pps
bps
bps
bps
bps
bps

0 pps
0 bps

www.juniper.net | 14

Resumen
Configuramos forwarding classes:
[edit class-of-service]
user@router# set forwarding-classes queue 0 general-traffic
user@router# set forwarding-classes queue 1 important-traffic
user@router# set forwarding-classes queue 2 critical-traffic
Configuramos schedulers:
[edit class-of-service]
user@router# set schedulers sched-best-effort transmit-rate percent 40
user@router# set schedulers sched-best-effort buffer-size percent 40
user@router# set schedulers sched-best-effort priority low
Programamos mapas asociados con las clases y las colas de reenvo
[edit class-of-service]
router# set scheduler-maps sched-map-example forwarding-class best-effort scheduler
sched-BE
router# set scheduler-maps sched-map-example forwarding-class expedited-forwarding
scheduler sched-EF
router# set scheduler-maps sched-map-example forwarding-class assured-forwarding
scheduler sched-AF
router# set sched-map-example forwarding-class network-control scheduler sched-NC
Aplicamos los mapas programados a la salida del interface:
[edit class-of-service]
user@router# set interfaces ge-0/0/0 scheduler-map sched-map-example
2010 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 15