Before You Begin
Some critical points to note before you begin:
-
Before you proceed any further, ensure that you delete your existing hw-module profile qos hqos-enable configuration and restart your system. Only then can you enable egress traffic management at the port level. H-QoS profiles
and egress traffic management configurations can’t coexist.
-
The egress traffic management mode is configured on a per-port mode. This ensures that the core-facing ports continue using
the current ingress-based VOQ model, while the access ports use the egress traffic management model. Such an approach reduces
the consumption of the recycle bandwidth. See the following table for details.
Table 2. Global H-QoS versus Per Port Configuration
Global H-QoS with
hw-module profile qos hqos-enable
|
Per Port Egress Traffic Management (ETM) without
hw-module profile qos hqos-enable
|
All Ports
|
ETM ports with controller optics mode etm configured
|
Non-ETM ports
|
Main interface
|
Subinterface
|
Main interface
|
Subinterface
|
Main interface
|
Subinterface
|
H-QoS and flat policies
|
H-QoS and flat policies
|
H-QoS and flat policies
|
H-QoS and flat policies
|
H-QoS and flat policies
|
No policies, inherit from main |
-
The configuration is implemented at the controller level. This means that when you commit the egress traffic management configuration,
all existing configurations are deleted. All existing features and subinterface configurations are deleted and you must reconfigure
all of them.
Configuration Example for Policy Map with Class Match on traffic-class
To configure an egress traffic management queueing policy and reconfigure policies in etm mode for traffic class:
-
Delete the existing hw-module profile qos hqos-enable configuration and restart your system.
-
Configure NPU native mode by using the hw-module profile npu native-mode-enable command.
-
In the admin mode, reload the router by using the hw-module reload location all command.
-
Enable egress traffic management (etm ) on an interface using the controller optics command in the optics controller configuration mode. For 10 GbE interfaces, configure etm on the breakout port. After this configuration is enabled, it deletes all subinterfaces under the main interface.
-
Configure the subinterfaces. For policy maps with match-all specified for traffic-class , run hw-module profile qos ipv6 short-etm to truncate IPv6 fields. This configuration frees TCAM space for packet header marking for VOQ lookup in the second pass.
Reload the line card.
-
Create the class maps.
-
Specify the match criteria, which can be: match on traffic class, DSCP, CoS, or any combination of these criteria.
-
Set the traffic classes for each class in the policy map.
Note
|
The class-default need not have a set-traffic class value.
|
-
Specify the traffic class actions.
-
Attach the policy map to the subinterface.
/*Delete existing h-qos configuration*/
Router#configure terminal
Router(config)#no hw-module profile qos hqos-enable
In order to activate this new qos profile, you must manually reload the chassis/all line cards
Router(config)#commit
Router(config)#exit
Router#reload
/* Configure NPU native mode*/
Router#(config)#hw-module profile npu native-mode-enable
In order to activate this new npu profile, you must manually reload the chassis
Router#(config)#commit
Router#(config)#exit
Router#admin
sysadmin-router#hw-module location all reload
Reloading the module will be traffic impacting if not properly drained. Continue to Reload hardware module ? [no,yes] yes
/*Enable etm on an interface*/
Router#configure terminal
Router(config)#controller optics 0/5/0/16
Router(config-Optics)#mode etm
Router(config-Optics)#commit
Router(config-Optics)#exit
/*To enable etm for breakout ports, as for 10 GbE*/
Router#configure terminal
Router(config)#controller optics 0/5/0/27/1
Router(config-Optics)#mode etm
Router(config-Optics)#commit
Router(config-Optics)#exit
/*Match on traffic-class on ETM-enabled interfaces requires running the following hw-module command to truncate IPv6 fields, thus freeing TCAM space for packet header marking for VOQ lookup in the second pass.*/
Router(config)#hw-module profile qos ipv6 short-etm
In order to activate this profile, you must manually reload the chassis/all line cards
Router(config)#commit
Router(config)#exit
Router#reload
/*Configure etm policies on subinterfaces
Configure class map. Specify the match criteria*/
Router(config)#class-map match-any MAIN_OUT_CMAP_1
Router(config-cmap)#match traffic-class 1
Router(config-cmap)#end-class-map
Router(config-cmap)#exit
Router(config)#class-map match-any MAIN_OUT_CMAP_2
Router(config-cmap)#match traffic-class 2
Router(config-cmap)#end-class-map
Router(config-cmap)#exit
Router(config)#class-map match-any MAIN_OUT_CMAP_3
Router(config-cmap)#match traffic-class 3
Router(config-cmap)#end-class-map
Router(config-cmap)#exit
Router(config)#class-map match-any MAIN_OUT_CMAP_4
Router(config-cmap)#match traffic-class 4
Router(config-cmap)#end-class-map
Router(config-cmap)#exit
Router(config)#class-map match-any MAIN_OUT_CMAP_5
Router(config-cmap)#match traffic-class 5
Router(config-cmap)#end-class-map
Router(config-cmap)#exit
Router(config)#class-map match-any MAIN_OUT_CMAP_6
Router(config-cmap)# match traffic-class 6
Router(config-cmap)#end-class-map
Router(config-cmap)#exit
Router(config)#class-map match-any MAIN_OUT_CMAP_7
Router(config-cmap)#match traffic-class 7
Router(config-cmap)#end-class-map
Router(config-cmap)#exit
/*Create a policy map*/
Router(config)#policy-map MAIN_OUT_PMAP5_PHY_SUB
/*Associate the traffic class with the policy map*/
Router(config-pmap)#class MAIN_OUT_CMAP_1
/*Specify the traffic class actions ('bandwidth remaining ratio, in this example)*/
Router(config-pmap-c)#bandwidth remaining ratio 20
Router(config-pmap-c)#set traffic-class 1
Router(config-cmap-c)#commit
/*Repeat for other classes*/
Router(config-pmap-c)#class MAIN_OUT_CMAP_2
Router(config-pmap-c)#bandwidth remaining ratio 30
Router(config-pmap-c)#set traffic-class 2
Router(config-pmap-c)#exit
Router(config-pmap-c)#class MAIN_OUT_CMAP_3
Router(config-pmap-c)#bandwidth remaining ratio 40
Router(config-pmap-c)#set traffic-class 3
Router(config-pmap-c)#exit
Router(config-pmap-c)#class MAIN_OUT_CMAP_4
Router(config-pmap-c)#bandwidth remaining ratio 50
Router(config-pmap-c)#set traffic-class 4
Router(config-pmap-c)#exit
Router(config-pmap-c)#class MAIN_OUT_CMAP_5
Router(config-pmap-c)#bandwidth remaining ratio 60
Router(config-pmap-c)#set traffic-class 5
Router(config-pmap-c)#exit
Router(config-pmap-c)#class MAIN_OUT_CMAP_6
Router(config-pmap-c)#bandwidth remaining ratio 60
Router(config-pmap-c)#set traffic-class 6
Router(config-pmap-c)#exit
Router(config-pmap-c)#class MAIN_OUT_CMAP_7
Router(config-pmap-c)#set traffic-class 7
Router(config-pmap-c)#priority level 1
Router(config-pmap-c)#exit
Router(config-pmap-c)#class class-default
Router(config-pmap-c)#bandwidth remaining ratio 10
Router(config-pmap-c)#exit
Router(config-pmap-c)#end-policy-map
Router(config)#exit
Router(config)#policy-map PARENT_MAIN_OUT_PHY_SUB
Router(config-pmap)#class class-default
Router(config-pmap-c)#service-policy MAIN_OUT_PMAP5_PHY_SUB
Router(config-pmap-c)#shape average 55 mbps
Router(config-pmap-c)#exit
Router(config-pmap-c)#end-policy-map
Router(config)#commit
/*Attach the policy map to the subinterface.*/
Router#configure
Router(config)#interface HundredGigE 0/5/0/16.1
Router(config-subif)#service-policy output PARENT_MAIN_OUT_PHY_SUB
Router(config-subif)#commit
You have enabled etm mode and configured policies in this mode. You are now ready to experience existing QoS features with enhanced egress classification
for queueing policy and scale egress queueing policies.
Running Configuration
controller Optics 0/5/0/16
mode etm
!
class-map match-any MAIN_OUT_CMAP_1
match traffic-class 1
end-class-map
!
class-map match-any MAIN_OUT_CMAP_2
match traffic-class 2
end-class-map
!
class-map match-any MAIN_OUT_CMAP_3
match traffic-class 3
end-class-map
!
class-map match-any MAIN_OUT_CMAP_4
match traffic-class 4
end-class-map
!
class-map match-any MAIN_OUT_CMAP_5
match traffic-class 5
end-class-map
!
class-map match-any MAIN_OUT_CMAP_6
match traffic-class 6
end-class-map
!
class-map match-any MAIN_OUT_CMAP_7
match traffic-class 7
end-class-map
!
policy-map MAIN_OUT_PMAP5_PHY_SUB
class MAIN_OUT_CMAP_1
bandwidth remaining ratio 20
set traffic-class 1
!
class MAIN_OUT_CMAP_2
bandwidth remaining ratio 30
set traffic-class 2
!
class MAIN_OUT_CMAP_3
bandwidth remaining ratio 40
set traffic-class 3
!
class MAIN_OUT_CMAP_4
bandwidth remaining ratio 50
set traffic-class 4
!
class MAIN_OUT_CMAP_5
bandwidth remaining ratio 60
set traffic-class 5
!
class MAIN_OUT_CMAP_6
bandwidth remaining ratio 60
set traffic-class 6
!
class MAIN_OUT_CMAP_7
set traffic-class 7
priority level 1
!
class class-default
bandwidth remaining ratio 10
!
end-policy-map
!
policy-map PARENT_MAIN_OUT_PHY_SUB
class class-default
service-policy MAIN_OUT_PMAP5_PHY_SUB
shape average 55 mbps
!
end-policy-map
Verification
To check if interface is in etm mode:Router#show controllers npu voq-usage interface all instance all l$
-------------------------------------------------------------------
Node ID: 0/0/CPU0
Intf Intf NPU NPU PP Sys VOQ Flow VOQ Port
name handle # core Port Port base base port speed
(hex) type
----------------------------------------------------------------------
Hu0/0/0/0 8 0 0 1 24577 38400 6912 local 100G
Hu0/0/0/0 8 0 0 154 1 1536 22272 local 100G ------>2nd Entry points to Recycle Port Mapping
To verify the output for policy map with class match on traffic class:Router#show qos interface HundredGigE 0/5/0/16.1 output
NOTE:- Configured values are displayed within parentheses
Interface HundredGigE0/5/0/16.1 ifh 0xa008002 -- output policy
NPU Id: 1
Total number of classes: 9
Interface Bandwidth: 100000000 kbps
Policy Name: PARENT_MAIN_OUT_PHY_SUB
SPI Id: 0x0
VOQ Base: 13328
Accounting Type: Layer1 (Include Layer 1 encapsulation and above)
------------------------------------------------------------------------------
Level1 Class = class-default
Queue Max. BW. = 70311 kbps (55 mbits/sec)
Queue Min. BW. = 58593 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Level2 Class = MAIN_OUT_CMAP_1
New traffic class = 1
Egressq Queue ID = 13329 (LP queue)
Queue Max. BW. = no max (default)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 32 / (20)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1280 bytes / 19 ms (default)
WRED not configured for this class
Level2 Class = MAIN_OUT_CMAP_2
New traffic class = 2
Egressq Queue ID = 13330 (LP queue)
Queue Max. BW. = no max (default)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 21 / (30)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1280 bytes / 19 ms (default)
WRED not configured for this class
Level2 Class = MAIN_OUT_CMAP_3
New traffic class = 3
Egressq Queue ID = 13331 (LP queue)
Queue Max. BW. = no max (default)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 16 / (40)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1280 bytes / 19 ms (default)
WRED not configured for this class
Level2 Class = MAIN_OUT_CMAP_4
New traffic class = 4
Egressq Queue ID = 13332 (LP queue)
Queue Max. BW. = no max (default)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 12 / (50)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1280 bytes / 19 ms (default)
WRED not configured for this class
Level2 Class = MAIN_OUT_CMAP_5
New traffic class = 5
Egressq Queue ID = 13333 (LP queue)
Queue Max. BW. = no max (default)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 10 / (60)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1280 bytes / 19 ms (default)
WRED not configured for this class
Level2 Class = MAIN_OUT_CMAP_6
New traffic class = 6
Egressq Queue ID = 13334 (LP queue)
Queue Max. BW. = no max (default)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 10 / (60)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1280 bytes / 19 ms (default)
WRED not configured for this class
Level2 Class (HP1) = MAIN_OUT_CMAP_7
New traffic class = 7
Egressq Queue ID = 13335 (HP1 queue)
Queue Max. BW. = no max (default)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 68608 bytes / 10 ms (default)
WRED not configured for this class
Level2 Class = class-default
Egressq Queue ID = 13328 (Default LP queue)
Queue Max. BW. = no max (default)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 64 / (10)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1280 bytes / 19 ms (default)
Configuration Example for Policy Map with Class Match on DSCP
Router(config)#class-map match-any MATCH_DSCP_CONTROL
Router(config-cmap)#description "Customer Control Traffic"
Router(config-cmap)#match dscp 48-58
Router(config-cmap)#end-class-map
Router(config)#class-map match-any MATCH_DSCP_COS1_RT
Router(config-cmap)#description "Real Time Traffic"
Router(config-cmap)#match dscp 40 46
Router(config-cmap)#end-class-map
Router(config)#class-map match-any MATCH_DSCP_COS2_IC
Router(config-cmap)#description "Bursty High In Contract Traffic
Router(config-cmap)#match dscp 24 26
Router(config-cmap)#end-class-map
Router(config)#class-map match-any MATCH_DSCP_COS2_OC
Router(config-cmap)#description "Bursty High Out of Contract Traffic"
Router(config-cmap)#match dscp 25 27 28 29 30 31
Router(config-cmap)#end-class-map
Router(config)#class-map match-any MATCH_DSCP_COS3_IC
Router(config-cmap)#description "Bursty Low In Contract Traffic"
Router(config-cmap)#match dscp 16 18
Router(config-cmap)#end-class-map
Router(config)#class-map match-any MATCH_DSCP_COS3_OC
Router(config-cmap)#description "Bursty Low Out of Contract Traffic
Router(config-cmap)#match dscp 17 19 20 21 22 23
Router(config-cmap)#end-class-map
Router(config)#commit
Router(config)#policy-map M4_Ex_1G_Child_80:40:30:30_out_ss
Router(config-pmap)#class MATCH_DSCP_CONTROL
Router(config-pmap-c)#shape average percent 5
Router(config-pmap-c)#set traffic-class 7
Router(config-pmap-c)#priority level 2
Router(config-pmap-c)#class MATCH_DSCP_COS1_RT
Router(config-pmap-c)#shape average percent 80
Router(config-pmap-c)#set traffic-class 5
Router(config-pmap-c)#priority level 1
Router(config-pmap-c)#class MATCH_DSCP_COS2_IC
Router(config-pmap-c)#set traffic-class 2
Router(config-pmap-c)#bandwidth remaining percent 40
Router(config-pmap-c)#queue-limit 4096 packets
Router(config-pmap-c)#class MATCH_DSCP_COS3_IC
Router(config-pmap-c)#bandwidth remaining percent 30
Router(config-pmap-c)#set traffic-class 3
Router(config-pmap-c)#queue-limit 3072 packets
Router(config-pmap-c)#class class-default
Router(config-pmap-c)#bandwidth remaining percent 30
Router(config-pmap-c)#set traffic-class 0
Router(config-pmap-c)#queue-limit 3072 packets
Router(config-pmap-c)#end-policy-map
Router(config)#policy-map M4_Ex_1G_80:40:30:30_out_ss
Router(config-pmap)#class class-default
Router(config-pmap-c)#service-policy M4_Ex_1G_Child_80:40:30:30_out_ss
Router(config-pmap-c)#shape average 100 mbps
Router(config-pmap-c)#commit
Router(config-pmap-c)#exit
Router(config-pmap)#exit
Router(config)#interface HundredGigE 0/5/0/16.1
Router(config-subif)#service-policy output M4_Ex_1G_80:40:30:30_$
Router(config-subif)#commit
Running Configuration
class-map match-any MATCH_DSCP_CONTROL
description "Customer Control Traffic"
match dscp 48-58
end-class-map
!
class-map match-any MATCH_DSCP_COS1_RT
description "Real Time Traffic"
match dscp 40 46
end-class-map
!
class-map match-any MATCH_DSCP_COS2_IC
description "Bursty High In Contract Traffic"
match dscp 24 26
end-class-map
!
class-map match-any MATCH_DSCP_COS3_IC
description "Bursty Low In Contract Traffic"
match dscp 16 18
end-class-map
!
policy-map M4_Ex_1G_Child_80:40:30:30_out_ss
class MATCH_DSCP_CONTROL
shape average percent 5
set traffic-class 7
priority level 2
!
class MATCH_DSCP_COS1_RT
shape average percent 80
set traffic-class 5
priority level 1
!
class MATCH_DSCP_COS2_IC
set traffic-class 2
bandwidth remaining percent 40
queue-limit 4096 packets
!
class MATCH_DSCP_COS3_IC
bandwidth remaining percent 30
set traffic-class 3
queue-limit 3072 packets
!
class class-default
bandwidth remaining percent 30
set traffic-class 0
queue-limit 3072 packets
!
end-policy-map
!
policy-map M4_Ex_1G_80:40:30:30_out_ss
class class-default
service-policy M4_Ex_1G_Child_80:40:30:30_out_ss
shape average 100 mbps
!
end-policy-map
Verify the Output for Policy Map with Class Match on DSCP
Router#show qos interface HundredGigE 0/5/0/16.1 output
NOTE:- Configured values are displayed within parentheses
Interface HundredGigE0/5/0/16.1 ifh 0xa008002 -- output policy
NPU Id: 1
Total number of classes: 6
Interface Bandwidth: 100000000 kbps
Policy Name: M4_Ex_1G_80:40:30:30_out_ss
SPI Id: 0x0
VOQ Base: 13328
Accounting Type: Layer1 (Include Layer 1 encapsulation and above)
------------------------------------------------------------------------------
Level1 Class = class-default
Queue Max. BW. = 113282 kbps (100 mbits/sec)
Queue Min. BW. = 101564 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Level2 Class (HP2) = MATCH_DSCP_CONTROL
New traffic class = 7
Egressq Queue ID = 13335 (HP2 queue)
Queue Max. BW. = 7812 kbps (5 %)
Guaranteed service rate = 5000 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 6144 bytes / 10 ms (default)
WRED not configured for this class
Level2 Class (HP1) = MATCH_DSCP_COS1_RT
New traffic class = 5
Egressq Queue ID = 13333 (HP1 queue)
Queue Max. BW. = 82031 kbps (80 %)
Guaranteed service rate = 80000 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 99840 bytes / 10 ms (default)
WRED not configured for this class
Level2 Class = MATCH_DSCP_COS2_IC
New traffic class = 2
Egressq Queue ID = 13330 (LP queue)
Queue Max. BW. = no max (default)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 2 / (40%)
Guaranteed service rate = 6000 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1048576 bytes / 1398 ms (4096 packets)
WRED not configured for this class
Level2 Class = MATCH_DSCP_COS3_IC
New traffic class = 3
Egressq Queue ID = 13331 (LP queue)
Queue Max. BW. = no max (default)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 2 / (30%)
Guaranteed service rate = 4500 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 786432 bytes / 1398 ms (3072 packets)
WRED not configured for this class
Level2 Class = class-default
New traffic class = 0
Egressq Queue ID = 13328 (Default LP queue)
Queue Max. BW. = no max (default)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 2 / (30%)
Guaranteed service rate = 4500 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 786432 bytes / 1398 ms (3072 packets)
WRED not configured for this class
Configuration Example for Policy Map with Class Match on COS
Router(config)#class-map match-any cos2
Router(config-cmap)#match cos 2
Router(config-cmap)#end-class-map
Router(config)#class-map match-all cos3
Router(config-cmap)#match cos 3
Router(config-cmap)#end-class-map
Router(config)#class-map match-all cos4
Router(config-cmap)#match cos 4
Router(config-cmap)#end-class-map
Router(config)#class-map match-all cos5
Router(config-cmap)#match cos 5
Router(config-cmap)#end-class-map
Router(config)#class-map match-all cos6
Router(config-cmap)#match cos 6
Router(config-cmap)#end-class-map
Router(config)#class-map match-all cos7
Router(config-cmap)#match cos 7
Router(config-cmap)#end-class-map
Router(config)#class-map match-all cos1
Router(config-cmap)#match cos 1
Router(config-cmap)#end-class-map
Router(config)#policy-map L2VPN-OUT
Router(config-pmap)#class cos2
Router(config-pmap-c)#set traffic-class 2
Router(config-pmap-c)#shape average 45 mbps
Router(config-pmap-c)#class cos3
Router(config-pmap-c)#set traffic-class 3
Router(config-pmap-c)#shape average 50 mbps
Router(config-pmap-c)#class cos4
Router(config-pmap-c)#set traffic-class 4
Router(config-pmap-c)#shape average 50 mbps
Router(config-pmap-c)#class cos5
Router(config-pmap-c)#set traffic-class 5
Router(config-pmap-c)#shape average 50 mbps
Router(config-pmap-c)#class cos6
Router(config-pmap-c)#set traffic-class 6
Router(config-pmap-c)#shape average 50 mbps
Router(config-pmap-c)#class cos7
Router(config-pmap-c)#set traffic-class 7
Router(config-pmap-c)#shape average 50 mbps
Router(config-pmap-c)#class cos1
Router(config-pmap-c)#set traffic-class 1
Router(config-pmap-c)#shape average 50 mbps
Router(config-pmap-c)#class class-default
Router(config-pmap-c)#shape average 50 mbps
Router(config-pmap-c)#end-policy-map
Router(config)#commit
Router(config)#exit
Router(config)#interface HundredGigE 0/5/0/16.1
Router(config-subif)#no service-policy output
Router(config-subif)#commit
Router(config-subif)#service-policy output L2VPN-OUT
Router(config-subif)#commit
Router(config-subif)#end
Running Configuration
class-map match-any cos2
match cos 2
end-class-map
!
class-map match-all cos3
match cos 3
end-class-map
!
class-map match-all cos4
match cos 4
end-class-map
!
class-map match-all cos5
match cos 5
end-class-map
!
class-map match-all cos6
match cos 6
end-class-map
!
class-map match-all cos7
match cos 7
end-class-map
!
class-map match-all cos1
match cos 1
end-class-map
!
class-map match-any class-default
end-class-map
!
policy-map L2VPN-OUT
class cos2
set traffic-class 2
shape average 45 mbps
!
class cos3
set traffic-class 3
shape average 50 mbps
!
class cos4
set traffic-class 4
shape average 50 mbps
!
class cos5
set traffic-class 5
shape average 50 mbps
!
class cos6
set traffic-class 6
shape average 50 mbps
!
class cos7
set traffic-class 7
shape average 50 mbps
!
class cos1
set traffic-class 1
shape average 50 mbps
!
class class-default
shape average 50 mbps
!
end-policy-map
Verify the Output for Policy Map with Class Match on COS
Router#show qos interface HundredGigE 0/5/0/16.1 output
NOTE:- Configured values are displayed within parentheses
Interface HundredGigE0/5/0/16.1 ifh 0xa008002 -- output policy
NPU Id: 1
Total number of classes: 8
Interface Bandwidth: 100000000 kbps
Policy Name: L2VPN-OUT
SPI Id: 0x0
VOQ Base: 13328
Accounting Type: Layer1 (Include Layer 1 encapsulation and above)
------------------------------------------------------------------------------
Level1 Class = cos2
New traffic class = 2
Egressq Queue ID = 13330 (LP queue)
Queue Max. BW. = 46875 kbps (45 mbits/sec)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Guaranteed service rate = 45000 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 56064 bytes / 10 ms (default)
WRED not configured for this class
Level1 Class = cos3
New traffic class = 3
Egressq Queue ID = 13331 (LP queue)
Queue Max. BW. = 50781 kbps (50 mbits/sec)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Guaranteed service rate = 50000 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 62464 bytes / 10 ms (default)
WRED not configured for this class
Level1 Class = cos4
New traffic class = 4
Egressq Queue ID = 13332 (LP queue)
Queue Max. BW. = 50781 kbps (50 mbits/sec)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Guaranteed service rate = 50000 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 62464 bytes / 10 ms (default)
WRED not configured for this class
Level1 Class = cos5
New traffic class = 5
Egressq Queue ID = 13333 (LP queue)
Queue Max. BW. = 50781 kbps (50 mbits/sec)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Guaranteed service rate = 50000 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 62464 bytes / 10 ms (default)
WRED not configured for this class
Level1 Class = cos6
New traffic class = 6
Egressq Queue ID = 13334 (LP queue)
Queue Max. BW. = 50781 kbps (50 mbits/sec)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Guaranteed service rate = 50000 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 62464 bytes / 10 ms (default)
WRED not configured for this class
Level1 Class = cos7
New traffic class = 7
Egressq Queue ID = 13335 (LP queue)
Queue Max. BW. = 50781 kbps (50 mbits/sec)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Guaranteed service rate = 50000 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 62464 bytes / 10 ms (default)
WRED not configured for this class
Level1 Class = cos1
New traffic class = 1
Egressq Queue ID = 13329 (LP queue)
Queue Max. BW. = 50781 kbps (50 mbits/sec)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Guaranteed service rate = 50000 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 62464 bytes / 10 ms (default)
WRED not configured for this class
Level1 Class = class-default
Egressq Queue ID = 13328 (Default LP queue)
Queue Max. BW. = 50781 kbps (50 mbits/sec)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Guaranteed service rate = 50000 kbps
Peak burst = 36864 bytes (default)
TailDrop Threshold = 62464 bytes / 10 ms (default)
WRED not configured for this class
Configuration Example for Policy Map with Class Match on Traffic Class and DSCP
Router(config)#class-map match-any cm-dscp-cs1
Router(config-cmap)#match dscp cs1
Router(config-cmap)#class-map match-any cm-dscp-cs2
Router(config-cmap)#match dscp cs2
Router(config-cmap)#class-map match-any cm-dscp-af11
Router(config-cmap)#match dscp af11
Router(config-cmap)#class-map match-any cm-tc-5
Router(config-cmap)#match traffic-class 5
Router(config-cmap)#class-map match-all cm-tc-6-and-dscp-cs3
Router(config-cmap)#match traffic-class 6
Router(config-cmap)#match dscp cs3
Router(config-cmap)#policy-map pm-out-etm-queueing
Router(config-pmap)#class cm-dscp-cs1
Router(config-pmap-c)#set traffic-class 1
Router(config-pmap-c)#shape average percent 45
Router(config-pmap-c)#class cm-dscp-cs2
Router(config-pmap-c)#set traffic-class 1
Router(config-pmap-c)#shape average percent 45
Router(config-pmap-c)#class cm-dscp-af11
Router(config-pmap-c)#set traffic-class 2
Router(config-pmap-c)#shape average percent 10
Router(config-pmap-c)#class cm-tc-5
Router(config-pmap-c)#shape average percent 5
Router(config-pmap-c)#set traffic-class 3
Router(config-pmap-c)#class cm-tc-6-and-dscp-cs3
Router(config-pmap-c)#set traffic-class 7
Router(config-pmap-c)#priority
Router(config-pmap-c)#commit
Router(config-pmap-c)#exit
Router(config-pmap)#exit
Router(config)#interface HundredGigE 0/5/0/16.1
Router(config-subif)#service-policy output pm-out-etm-queueing
Router(config-subif)#commit
Router(config-subif)#end
Running Configuration
class-map match-any cm-dscp-cs1
match dscp cs1
end-class-map
!
class-map match-any cm-dscp-cs2
match dscp cs2
end-class-map
!
class-map match-any cm-dscp-af11
match dscp af11
end-class-map
!
class-map match-any cm-tc-5
match traffic-class 5
end-class-map
!
class-map match-all cm-tc-6-and-dscp-cs3
match traffic-class 6
match dscp af22 cs3
end-class-map
!
policy-map pm-out-etm-queueing
class cm-dscp-cs1
set traffic-class 1
shape average percent 45
!
class cm-dscp-cs2
set traffic-class 1
shape average percent 45
!
class cm-dscp-af11
set traffic-class 2
shape average percent 10
!
class cm-tc-5
shape average percent 5
set traffic-class 3
!
class cm-tc-6-and-dscp-cs3
set traffic-class 7
priority level 1
!
class class-default
!
end-policy-map
Notes on the Configuration Example
-
Both the traffic classes cm-dscp-cs1 and cm-dscp-cs2 have the same action for set traffic-class in the EM mode, which is set traffic-class 1 . This means that both these classes have matching traffic going to the same VOQ, and hence their statistics refer to the
statistics for VOQ=1.
-
The traffic class cm-dscp-af11 has the action set traffic-class 2 at the recycle pass in the ETM mode. Hence, its matching traffic and statistics are from
VOQ=2.
-
The traffic class cm-tc-6-and-dscp-cs3 is an example of remarking traffic-class. This class has traffic-class=6 configured at the ingress, and matches all traffic
that has incoming traffic-class=6 AND incoming DSCP=CS3. However, at egress, the traffic-class is remarked to 7. Hence, matching
traffic goes to VOQ=7, and the statistics for this class are taken from VOQ=7.
Verify the Output for Policy Map with Class Match on Traffic Class and DSCPRouter#show qos interface HundredGigE 0/5/0/16.1 output
NOTE:- Configured values are displayed within parentheses
Interface HundredGigE0/5/0/16.1 ifh 0xa008002 -- output policy
NPU Id: 1
Total number of classes: 6
Interface Bandwidth: 100000000 kbps
Policy Name: pm-out-etm-queueing
SPI Id: 0x0
VOQ Base: 13328
Accounting Type: Layer1 (Include Layer 1 encapsulation and above)
------------------------------------------------------------------------------
Level1 Class = cm-dscp-cs1
New traffic class = 1
Egressq Queue ID = 13329 (LP queue)
Queue Max. BW. = 45003261 kbps (45 %)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1249792 bytes / 10 ms (default)
WRED not configured for this class
Level1 Class = cm-dscp-cs2
New traffic class = 1
Egressq Queue ID = 13329 (LP queue)
Queue Max. BW. = 45003261 kbps (45 %)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1249792 bytes / 10 ms (default)
WRED not configured for this class
Level1 Class = cm-dscp-af11
New traffic class = 2
Egressq Queue ID = 13330 (LP queue)
Queue Max. BW. = 10000152 kbps (10 %)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1249792 bytes / 10 ms (default)
WRED not configured for this class
Level1 Class = cm-tc-5
New traffic class = 3
Egressq Queue ID = 13331 (LP queue)
Queue Max. BW. = 5000076 kbps (5 %)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1249792 bytes / 10 ms (default)
WRED not configured for this class
Level1 Class (HP1) = cm-tc-6-and-dscp-cs3
New traffic class = 7
Egressq Queue ID = 13335 (HP1 queue)
Queue Max. BW. = no max (default)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 124999936 bytes / 10 ms (default)
WRED not configured for this class
Level1 Class = class-default
Egressq Queue ID = 13328 (Default LP queue)
Queue Max. BW. = no max (default)
Queue Min. BW. = 0 kbps (default)
Inverse Weight / Weight = 1 / (BWR not configured)
Peak burst = 36864 bytes (default)
TailDrop Threshold = 1249792 bytes / 10 ms (default)
WRED not configured for this class
Associated Commands
controller optics