Configuration Using Legacy CoS Syntax
The Cisco 12000 Series legacy Class of Service (CoS) syntax uses a cos-queue-group template to define a set of CoS definitions. You then apply the template to ToFab and FrFab queues on inbound or outbound interfaces, respectively.
Step 1: Define a cos-queue-group
The cos-queue-group command creates a named template of MDRR and WRED parameters. Available configuration parameters at the CLI are shown below:
Router(config)#cos-queue-group oc12
Router(config-cos-que)#?
Static cos queue commands:
default Set a command to its defaults
dscp Set per DSCP parameters, Engine 3 only
exit Exit from COS queue group configuration mode
exponential-weighting-constant Set group's RED exponential weight constant.
(Not used by engine 0, 1 or 2 line cards)
no Negate a command or set its defaults
precedence Set per precedence parameters
queue Set individual queue parmeters
random-detect-label Set RED drop criteria
traffic-shape Enable Traffic Shaping on a COS queue group
With MDRR, you can map the IP precedence to MDRR queues and configure the special low latency queue. This is done using the precedence parameter under the cos-queue-group command:
You can map a particular IP precedence to a regular MDRR queue (queue 0to 6) or you can map it to the priority queue. The above command allowsyou to map several IP precedences to the same queue.
Note: It is recommended to use precedence 5 for the low latencyqueue. Precedence 6 is used for routing updates.
Each MDRR queue can be given a relative weight, with one of the queues in the group defined as a priority queue. This is done using the queue command under the cos-queue-group:
queue <0-6> <1-2048>
queue low-latency [alternate-priority | strict-priority] <1-2048>
!--- The weight option is not available with strict priority
Use the cos-queue-group command to define any WRED parameters:
random-detect-label <label> <minimum-threshold> <maximum-threshold>
<mark-probability denominator>
The following table provides an example of a cos-queue-group named oc12. It defines three traffic classes: queue 0, 1, and low-latency. It maps IP precedence values 0 - 3 to queue 0, precedence values 4, 6, and 7 to queue 1, and precedence 5 to the low-latency queue. Queue 1 is assigned more bandwidth.
cos-queue-group oc12 !-- Creation of cos-queue-group called "oc12" precedence 0 queue 0 !-- Map precedence 0 to queue 0 precedence 0 random-detect-label 0 !-- Use RED profile 0 on queue 0 precedence 1 queue 0 precedence 1 random-detect-label 0 precedence 2 queue 0 precedence 2 random-detect-label 0 precedence 3 queue 0 precedence 3 random-detect-label 0 !-- Precedence 1, 2 and 3 also go into queue 0 precedence 4 queue 1 precedence 4 random-detect-label 1 precedence 6 queue 1 precedence 6 random-detect-label 1 precedence 7 queue 1 precedence 7 random-detect-label 1 precedence 5 queue low-latency !-- Map precedence 5 to special low latency queue !-- We do not want to drop any traffic from the LLQ. We have an SLA Random-detect-label 0 375 2423 1 !-- Min. threshold 375 packets, max. threshold 2423 packets. random-detect-label 1 375 2423 1 queue 1 20 !-- Queue 1 gets MDRR weight of 20, thus gets more BW queue low-latency strict-priority !-- Low latency queue runs in strict priority mode. |
Step 2 - Create a slot-table-cos for ToFab queues
To avoid head of line blocking, inbound interfaces on the Cisco 12000 Series maintain a virtual output queue per destination slot. Go to a line card using the attach command and execute the execute-on show controller tofab queue command (or directly enter the execute-on slot 0 show controllers tofab queue command) to view these virtual output queues. Sample output captured directly from the LC console is provided below. See How To Read the Output of the show controller frfab | tofab queue Commands on a Cisco 12000 Series Internet Router.
LC-Slot1#show controllers tofab queues
Carve information for ToFab buffers
SDRAM size: 33554432 bytes, address: 30000000, carve base: 30029100
33386240 bytes carve size, 4 SDRAM bank(s), 8192 bytes SDRAM pagesize, 2 carve(s)
max buffer data size 9248 bytes, min buffer data size 80 bytes
40606/40606 buffers specified/carved
33249088/33249088 bytes sum buffer sizes specified/carvedQnum Head Tail #Qelem LenThresh
---- ---- ---- ------ ---------5 non-IPC free queues:
20254/20254 (buffers specified/carved), 49.87%, 80 byte data size
1 17297 17296 20254 6553512152/12152 (buffers specified/carved), 29.92%, 608 byte data size
2 20548 20547 12152 655356076/6076 (buffers specified/carved), 14.96%, 1568 byte data size
3 32507 38582 6076 655351215/1215 (buffers specified/carved), 2.99%, 4544 byte data size
4 38583 39797 1215 65535809/809 (buffers specified/carved), 1.99%, 9248 byte data size
5 39798 40606 809 65535IPC Queue:100/100 (buffers specified/carved), 0.24%, 4112 byte data size
30 72 71 100 65535Raw Queue:31 0 17302 0 65535ToFab Queues:DestSlot0 0 0 0 65535
1 0 0 0 65535
2 0 0 0 65535
3 0 0 0 65535
4 0 0 0 65535
5 0 17282 0 65535
6 0 0 0 65535
7 0 75 0 65535
8 0 0 0 65535
9 0 0 0 65535
10 0 0 0 65535
11 0 0 0 65535
12 0 0 0 65535
13 0 0 0 65535
14 0 0 0 65535
15 0 0 0 65535
Multicast 0 0 0 65535
LC-Slot1#
Use the slot-table-cos command to map a named cos-queue-group to a destination virtual output queue. You can configure a unique cos-queue-group template per output queue.
Router(config)#slot-table-cos table1
Router(config-slot-cos)#destination-slot ?
<0-15> Destination slot number
all Configure for all destination slots
Router(config-slot-cos)#destination-slot 0 oc48
Router(config-slot-cos)#destination-slot 1 oc48
Router(config-slot-cos)#destination-slot 2 oc48
Router(config-slot-cos)#destination-slot 3 oc48
Router(config-slot-cos)#destination-slot 4 oc12
Router(config-slot-cos)#destination-slot 5 oc48
Router(config-slot-cos)#destination-slot 6 oc48
Router(config-slot-cos)#destination-slot 9 oc3
Router(config-slot-cos)#destination-slot 15 oc48
Note: The above configuration uses three templates, named oc48, oc12, and oc3. The configuration for the cos-queue-group named oc12 is as shown in Step1. Similarly, configure oc3 and oc48. We recommend applying a unique template to a set of interfaces based on the bandwidth and application.
Step 3 - Apply a slot-table-cos to an inbound interface.
Use the rx-cos-slot command to apply a slot-table-cos to an LC.
Router(config)#rx-cos-slot 0 ?
WORD Name of slot-table-cos
Router(config)#rx-cos-slot 0 table1
Router(config)#rx-cos-slot 2 table1
Step 4 - Apply a cos-queue-group to an outbound interface.
The Cisco 12000 Series maintains a separate queue per outbound interface. To view these queues, attach to the line card CLI using the attach command and then execute the show controller frfab queue command, as illustrated below:
LC-Slot1#show controller frfab queue
========= Line Card (Slot 2) =======Carve information for FrFab buffers
SDRAM size: 16777216 bytes, address: 20000000, carve base: 2002D100
16592640 bytes carve size, 0 SDRAM bank(s), 0 bytes SDRAM pagesize, 2 carve(s)
max buffer data size 9248 bytes, min buffer data size 80 bytes
20052/20052 buffers specified/carved
16581552/16581552 bytes sum buffer sizes specified/carvedQnum Head Tail #Qelem LenThresh
---- ---- ---- ------ ---------5 non-IPC free queues:9977/9977 (buffers specified/carved), 49.75%, 80 byte data size
1 101 10077 9977 655355986/5986 (buffers specified/carved), 29.85%, 608 byte data size
2 10078 16063 5986 655352993/2993 (buffers specified/carved), 14.92%, 1568 byte data size
3 16064 19056 2993 65535598/598 (buffers specified/carved), 2.98%, 4544 byte data size
4 19057 19654 598 65535398/398 (buffers specified/carved), 1.98%, 9248 byte data size
5 19655 20052 398 65535IPC Queue:100/100 (buffers specified/carved), 0.49%, 4112 byte data size
30 77 76 100 65535Raw Queue:31 0 82 0 65535Interface Queues:0 0 0 0 65535
1 0 0 0 65535
2 0 0 0 65535
3 0 0 0 65535
Use the tx-cos command to apply a cos-queue-group template to an interface queue. As shown below, you apply the parameter set directly to the interface; there are no tables needed. In the following example, pos48 is the name of a parameter set.
Router(config)#interface POS 4/0
Router(config-if)#tx-cos ?
WORD Name of cos-queue-group
Router(config-if)#tx-cos pos48
Use the show cos command to confirm your configuration:
Router#show cos
!--- Only some of the fields might be visible if MDRR is configured on
!--- Inbound or Outbound interfaces only
Interface Queue cos Group
Gi4/0 eng2-frfab
! -- TX-cos has been applied.
Rx Slot Slot Table
4 table1
! -- rx-cos-slot has been applied.
Slot Table Name - table1
1 eng0-tofab
3 eng0-tofab
! -- slot-table-cos has been defined.
cos Queue Group - eng2-tofab
! -- cos-queue-group has been defined.
Prec Red Label [min, max, prob] Drr Queue [deficit]
0 0 [6000, 15000, 1/1] 0 [10]
1 1 [10000, 20000, 1/1] 1 [40]
2 1 [10000, 20000, 1/1] 1 [40]
3 1 [10000, 20000, 1/1] 0 [10]
4 2 [15000, 25000, 1/1] 2 [80]
5 2 [15000, 25000, 1/1] 2 [80]
6 no drop low latency
7 no drop low latency
Note: The legacy CLI also uses the precedence syntax for Multiprotocol Label Switching (MPLS) traffic. The router treats the MPLS bits as though they are IP Type of Service (ToS) bits and puts the appropriate packets into the correct queues. This is not at all true for MQC. MPLS QoS is outside the scope of this document.