OcNOS DC : Quality of Service Guide : Quality of Service Configuration : Weights for Queues Configuration
Weights for Queues Configuration
This chapter contains a complete sample of configuring WRR weights for queues.
Topology
Simple configuration of QoS
Configuring WRR Weights for Queues
Do the following to configure WRR weights for queues.
Note: This configuration is supported on supported on the Trident II and Trident II + hardware.
 
#configure terminal
Enter configure mode.
(config)#qos enable
Enable QoS globally.
(config)#qos statistics
Enable QoS statistics.
(config)#class-map cmap1
Enter class-map mode
(config-cmap-qos)#match cos 2
Configure match criteria as cos 2
(config-cmap-qos)#exit
Exit out of class-map mode
(config)#class-map cmap2
Enter class-map mode
(config-cmap-qos)#match cos 3
Configure match criteria as cos 3
(config-cmap-qos)#exit
Exit out of class-map mode
(config)#policy-map pmap1
Enter policy-map mode.
(config-pmap-qos)#class cmap1
Assign class cmap1.
(config-pmap-c-qos)#set qos-group 1
Remark matched traffic to qos-group 1
(config-pmap-c-qos)#exit
Exit out of pmap-c mode
(config-pmap-qos)#exit
Exit pmap mode.
(config)#policy-map pmap1
Enter policy-map mode.
(config-pmap-qos)#class cmap2
Assign class cmap2.
(config-pmap-c-qos)#set qos-group 2
Remark matched traffic to qos-group 2
(config-pmap-c-qos)#exit
Exit out of pmap-c mode
(config-pmap-qos)#exit
Exit pmap mode.
(config)#class-map type queuing cq1
Configure class-map of type queuing with name cq1, and enter into class-map mode
(config-cmap-que)#match qos-group 1
Configure match criteria as qos-group 1
(config-cmap-que)#exit
Exit out of class-map mode.
(config)#class-map type queuing cq2
Configure class-map of type queuing with name cq2, and enter into class-map mode.
(config-cmap-que)#match qos-group 2
Configure match criteria as qos-group 2.
(config-cmap-que)#exit
Exit out of class-map mode.
(config)#policy-map type queuing pq1
Configure policy-map of type queuing with name pq1, and enter into policy-map mode.
(config-pmap-que)#class cq1
Attach class cq1 to Policy-map pq1.
(config-pmap-c-que)#wrr-queue weight 2
Configure WRR Weight of 2.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que)#class cq2
Assign class (queue) cq2 to pq1.
(config-pmap-c-que)#wrr-queue weight 4
Configure WRR weight of 4.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que)#exit
Exit from pmap mode.
(config)#interface xe2
Enter into interface xe2.
(config-if)#service-policy type queuing output pq1
Assign service policy pq1 of type queueing on out direction.
(config-if)#exit
Exit interface mode
(config)#exit
Exit configure mode.
(config)#bridge 1 protocol rstp vlan-bridge
Specify VLAN for bridge 1.
(config)#vlan database
Enter the VLAN configuration mode.
(config-vlan)#vlan 2-3 bridge 1 state enable
Enable VLAN (2-3) on bridge 1. Specifying the enable state.
(config-vlan)#exit
Exit the VLAN configuration mode.
(config)#interface vlan1.2
Enter interface mode.
(config-if)# ip address 10.1.1.1/24
Configure the IP address.
(config-if)#exit
Exit the interface mode.
(config)#interface xe2
Enter interface mode.
(config-if)#switchport
Configure xe2 as a Layer 2 port.
(config-if)#bridge-group 1
Associate the interface with bridge group 1.
(config-if)#switchport mode trunk
Configure port as a trunk.
(config-if)#switchport trunk allowed vlan all
Allow all the VLANs on the xe3 interface.
(config-if)#exit
Exit the interface mode.
(config)#interface xe3
Enter interface mode.
(config-if)#switchport
Configure xe3 as a Layer 2 port.
(config-if)#bridge-group 1
Associate the interface with bridge group 1.
(config-if)#switchport mode trunk
Configure port as a trunk.
(config-if)#switchport trunk allowed vlan all
Allow all the VLANs on the xe3 interface.
(config-if)# service-policy type qos input pmap1
Assign service-policy to interface on in-direction
(config-if)#exit
Exit the interface mode.
Validation
Enter the commands listed in the sections below to confirm the configurations.
#show running-config qos
qos enable
!
qos statistics
!
class-map cmap1
match cos 2
!
class-map cmap2
match cos 3
!
class-map type queuing match-any cq1
match qos-group 1
!
class-map type queuing match-any cq2
match qos-group 2
!
policy-map pmap1
class cmap1
set qos-group 1
exit
class cmap2
set qos-group 2
exit
!
!
policy-map type queuing pq1
class type queuing cq1
wrr-queue weight 2
exit
class type queuing cq2
wrr-queue weight 4
exit
!
!
interface xe2
service-policy type queuing output pq1
!
interface xe3
service-policy type qos input pmap1
!
 
 
#show policy-map
 
Type qos policy-maps
====================
 
policy-map pmap1
class cmap1
set qos-group 1
exit
class cmap2
set qos-group 2
exit
 
 
Type queuing policy-maps
========================
 
policy-map type queuing default default-out-policy
class type queuing default q0
priority level 1
exit
class type queuing default q1
priority level 1
exit
class type queuing default q2
priority level 1
exit
class type queuing default q3
priority level 1
exit
class type queuing default q4
priority level 1
exit
class type queuing default q5
priority level 1
exit
class type queuing default q6
priority level 1
exit
class type queuing default q7
priority level 1
exit
 
policy-map type queuing pq1
class type queuing cq1
wrr-queue weight 2
exit
class type queuing cq2
wrr-queue weight 4
exit
 
 
#show class-map
 
Type qos class-maps
===================
class-map type qos match-any class-default
 
class-map cmap1
match cos 2
 
class-map cmap2
match cos 3
 
 
Type queuing class-maps
=======================
class-map type queuing match-any cq1
match qos-group 1
 
class-map type queuing match-any cq2
match qos-group 2
 
class-map match-any q0
 
class-map match-any q1
 
class-map match-any q2
 
class-map match-any q3
 
class-map match-any q4
 
class-map match-any q5
 
class-map match-any q6
 
class-map match-any q7
 
 
Type Vlan-Queuing class-maps
============================
 
#show policy-map interface xe2
Interface xe2
Global statistics status : enabled
 
Service-policy (queuing) output: pq1
-----------------------------------
Class-map (queuing): cq1
match qos-group 1
wrr-queue weight 2
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): cq2
match qos-group 2
wrr-queue weight 4
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Service-policy (queuing) output: default-out-policy
-----------------------------------
Class-map (queuing): q0
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q1
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q2
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q3
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q4
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q5
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q6
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q7
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q0
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q2
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q3
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q4
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q5
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q6
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q7
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Wred Drop Statistics :
----------------------
green : 0 packets
yellow : 0 packets
red : 0 packets
 
#show policy-map interface xe3
 
Interface xe3
Global statistics status : enabled
 
Service-policy (qos) input : pmap1
--------------------------------
Class-map (qos): cmap1 (match all)
match cos 2
set qos-group 1
matched : 209681694 packets, 15097081968 bytes
transmitted : 209681694 packets, 15097081968 bytes
 
Class-map (qos): cmap2 (match all)
match cos 3
set qos-group 2
matched : 0 packets, 0 bytes
transmitted : 0 packets, 0 bytes
 
 
Service-policy (queuing) output: default-out-policy
-----------------------------------
Class-map (queuing): q0
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q1
priority level 1
output : 11789 packets, 754820 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q2
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q3
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q4
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q5
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q6
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q7
priority level 1
output : 1460 packets, 93914 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q0
output : 39311112 packets, 2830400048 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q2
output : 78930334 packets, 5051541376 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q3
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q4
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q5
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q6
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q7
output : 21 packets, 1428 bytes
dropped : 0 packets, 0 bytes
 
Wred Drop Statistics :
----------------------
green : 0 packets
yellow : 0 packets
red : 0 packets
 
Configuring WRR Weights for Queues
Do the following to configure WRR weights for queues.
Note: This configuration is supported on the TD III and TD IV hardware.
 
 
 
#configure terminal
Enter configure mode.
(config)#qos enable
Enable QoS globally.
(config)#qos statistics
Enable QoS statistics.
(config)#policy-map type queuing default qmap
Configure QoS Policy-map
(config-pmap-que-def)#class type queuing default q0
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 10
Configure WRR Weight of 10.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q1
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 15
Configure WRR Weight of 15.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q2
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 20
Configure WRR Weight of 20.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q3
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 25
Configure WRR Weight of 25.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q4
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 30
Configure WRR Weight of 30.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q5
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 35
Configure WRR Weight of 35.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q6
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 40
Configure WRR Weight of 40.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q7
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 45
Configure WRR Weight of 45.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que)#exit
Exit from pmap mode.
(config)#interface xe2
Enter into interface xe2.
(config-if)#service-policy type queuing output qmap
Assign service policy pq1 of type queueing on out direction.
(config-if)#shape rate 300 mbps burst 100
Configure QoS egress traffic shape
(config-if)#exit
Exit interface mode
(config)#exit
Exit configure mode.
 
Validation
Enter the commands listed in the sections below to confirm the configurations.
OcNOS#sh interface counters queue-stats
E - Egress, I - Ingress, Q-Size is in bytes
* indicates monitor is active
+-------------+--------------------+--------+-----------------+-------------------+-----------------+-------------------+
| Interface | Queue/Class-map | Q-Size | Tx pkts | Tx bytes | Dropped pkts | Dropped bytes |
+-------------+--------------------+--------+-----------------+-------------------+-----------------+-------------------+
cpu best-effort (E) 0 17 2746 0 0
cpu ipmc-miss (E) 0 7 1274 0 0
cpu ospf (E) 0 64 10508 0 0
cpu nd (E) 0 209 36326 0 0
cpu arp (E) 0 11 1540 0 0
cpu igmp (E) 0 4 560 0 0
cpu bpdu (E) 0 206 44163 0 0
cd1 q0 (E) 296926 193020 289530000 175171343 262757014500
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd1 q1 (E) 295148 289520 434280000 175074412 262611618000
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd1 q2 (E) 296926 386020 579030000 174977481 262466221500
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd1 q3 (E) 295148 482521 723781500 174880552 262320828000
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd1 q4 (E) 300482 579021 868531500 174783622 262175433000
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd1 q5 (E) 295148 675521 1013281500 174686692 262030038000
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd1 q6 (E) 296926 771972 1157958000 174589811 261884716500
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd1 q7 (E) 293370 868516 1302761198 174492848 261739272000
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd1 mc-q3 (E) 0 88 7704 0 0
cd3 q7 (E) 0 2 180 0 0
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd3 mc-q3 (E) 0 18 1676 0 0
cd22 mc-q0 (E) 0 4 560 0 0
cd22 mc-q1 (E) 0 206 44163 0 0
cd30/1 q0 (E) 0 1191525716 1787288574000 0 0
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd30/1 mc-q0 (E) 0 113674337 170511505500 0 0
cd30/2 q7 (E) 0 1 82 0 0
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd30/2 mc-q3 (E) 0 25 2498 0 0
cd30/3 q7 (E) 0 1 82 0 0
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd30/3 mc-q3 (E) 0 26 2580 0 0
cd30/4 q7 (E) 0 1 82 0 0
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd30/4 mc-q3 (E) 0 26 2580 0 0
cd30/5 q7 (E) 0 1 82 0 0
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd30/5 mc-q3 (E) 0 26 2580 0 0
cd30/6 q7 (E) 0 1 82 0 0
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd30/6 mc-q3 (E) 0 26 2580 0 0
cd30/7 q7 (E) 0 1 82 0 0
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd30/7 mc-q3 (E) 0 26 2580 0 0
cd30/8 q7 (E) 0 1 82 0 0
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd30/8 mc-q3 (E) 0 26 2580 0 0
cd31/1 q7 (E) 0 5 320 0 0
Green drop -- 0
Yellow drop -- 0
Red drop -- 0
Non-Red drop -- 0
cd31/1 mc-q3 (E) 0 90 7588 0 0
cd31/1 pg-q0 (I) 296418 NA NA NA NA
cd31/1 pg-q1 (I) 295148 NA NA NA NA
cd31/1 pg-q2 (I) 298450 NA NA NA NA
cd31/1 pg-q3 (I) 302006 NA NA NA NA
cd31/1 pg-q4 (I) 293370 NA NA NA NA
cd31/1 pg-q5 (I) 300482 NA NA NA NA
cd31/1 pg-q6 (I) 299466 NA NA NA NA
cd31/1 pg-q7 (I) 295148 NA NA NA NA
 
OcNOS#sh policy-map interface cd31/1
 
Interface cd31/1
 
Type Queuing policy-map : default-out-policy
 
Class-map (queuing): q0
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q1
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q2
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q3
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q4
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q5
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q6
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q7
priority
output : 5 packets, 320 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q0
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q2
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q3
output : 92 packets, 7752 bytes
dropped : 0 packets, 0 bytes
 
Wred/Tail Drop Statistics :
----------------------
green : 0 packets
yellow : 0 packets
red : 0 packets
 
 
OcNOS#sh policy-map interface cd1
 
Interface cd1
 
Type Queuing policy-map : qmap
 
Class-map (queuing): q0
wrr-queue weight 10
output : 221421 packets, 332131500 bytes
dropped : 200845495 packets, 301268242500 bytes
 
Class-map (queuing): q1
wrr-queue weight 15
output : 332131 packets, 498196500 bytes
dropped : 200734354 packets, 301101531000 bytes
 
Class-map (queuing): q2
wrr-queue weight 20
output : 442841 packets, 664261500 bytes
dropped : 200623215 packets, 300934822500 bytes
 
Class-map (queuing): q3
wrr-queue weight 25
output : 553551 packets, 830326500 bytes
dropped : 200512078 packets, 300768117000 bytes
 
Class-map (queuing): q4
wrr-queue weight 30
output : 664261 packets, 996391500 bytes
dropped : 200400951 packets, 300601426500 bytes
 
Class-map (queuing): q5
wrr-queue weight 35
output : 774971 packets, 1162456500 bytes
dropped : 200289817 packets, 300434725500 bytes
 
Class-map (queuing): q6
wrr-queue weight 40
output : 885630 packets, 1328445000 bytes
dropped : 200178738 packets, 300268107000 bytes
 
Class-map (queuing): q7
wrr-queue weight 45
output : 996387 packets, 1494567698 bytes
dropped : 200067573 packets, 300101359500 bytes
 
Class-map (queuing): mc-q0
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q2
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q3
output : 91 packets, 7962 bytes
dropped : 0 packets, 0 bytes
 
Wred/Tail Drop Statistics :
----------------------
green : 0 packets
yellow : 0 packets
red : 0 packets
 
 
 
OcNOS#sh policy-map
interface statistics type
OcNOS#sh policy-map statistics
Type qos class-map statistics:
+--------------------------------+-----------------+-----------------+-----------------+------------------+
| Class-map | Match pkts | Match bytes | Dropped pkts | Dropped Bytes |
+--------------------------------+-----------------+-----------------+-----------------+------------------+
 
Type queuing class-map statistics:
+--------------------------------+-----------------+-----------------+-----------------+------------------+
| Class-map | Total pkts | Total bytes | Dropped pkts | Dropped Bytes |
+--------------------------------+-----------------+-----------------+-----------------+------------------+
cd1
q0 248700 373050000 225492678 338239017000
q1 373050 559575000 225367899 338051848500
q2 497400 746100000 225243123 337864684500
q3 621750 932625000 225118353 337677529500
q4 746100 1119150000 224993584 337490376000
q5 870449 1305673500 224868812 337303218000
q6 994737 1492105500 224744099 337116148500
q7 1119122 1678670198 224619288 336928932000
cd3
q7 2 180 0 0
cd30/1
q0 1191525716 1787288574000 0 0
cd30/2
q7 1 82 0 0
cd30/3
q7 1 82 0 0
cd30/4
q7 1 82 0 0
cd30/5
q7 1 82 0 0
cd30/6
q7 1 82 0 0
cd30/7
q7 1 82 0 0
cd30/8
q7 1 82 0 0
cd31/1
q7 5 320 0 0
OcNOS#
 
 
Configuring WRR Weights for Queues
Do the following to configure WRR weights for queues.
Note: This configuration is supported on the TR III hardware.
 
 
 
#configure terminal
Enter configure mode.
(config)#qos enable
Enable QoS globally.
(config)#qos statistics
Enable QoS statistics.
(config)#policy-map type queuing default qmap
Configure QoS Policy-map
(config-pmap-que-def)#class type queuing default q0
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 10
Configure WRR Weight of 10.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q1
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 15
Configure WRR Weight of 15.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q2
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 20
Configure WRR Weight of 20.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q3
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 25
Configure WRR Weight of 25.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q4
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 30
Configure WRR Weight of 30.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q5
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 35
Configure WRR Weight of 35.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q6
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 40
Configure WRR Weight of 40.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que-def)#class type queuing default q7
Configure class type and specify the class-map type
(config-pmap-c-que-def)#wrr-queue weight 45
Configure WRR Weight of 45.
(config-pmap-c-que)#exit
Exit from pmap-c mode.
(config-pmap-que)#exit
Exit from pmap mode.
(config)#interface xe2
Enter into interface xe2.
(config-if)#service-policy type queuing output qmap
Assign service policy pq1 of type queueing on out direction.
(config-if)#shape rate 300 mbps burst 100
Configure QoS egress traffic shape
(config-if)#exit
Exit interface mode
(config)#exit
Exit configure mode.
 
Validation
Enter the commands listed in the sections below to confirm the configurations.
OcNOS#sh interface counters queue-stats
E - Egress, I - Ingress, Q-Size is in bytes
* indicates monitor is active
+-------------+--------------------+--------+-----------------+-------------------+-----------------+-------------------+
| Interface | Queue/Class-map | Q-Size | Tx pkts | Tx bytes | Dropped pkts | Dropped bytes