Hierarchical QoS allows you to specify QoS behavior at multiple policy levels, which provides a high degree of granularity
in traffic management.
For HQoS, WRED is allowed only on the child policy and not on the parent policy. You can have the shaping configured on the
parent policy and WRED on the child.
The following example configures the parent policy pwred-parent with traffic shaped on the basis of 10 percent of the bandwidth, that applies to its child, pwred-child configured for DSCP-based WRED.
policy-map PWRED-CHILD
class CWRED
bandwidth percent 10
random-detect dscp-based
random-detect dscp 1 percent 10 20
random-detect dscp 10 percent 20 30
policy-map PWRED-PARENT
class class-default
shape average percent 10
service-policy PWRED-CHILD
The following are WRED and HQoS WRED sample configuration for the Cisco Catalyst 9600 Series Supervisor 2 Module (C9600X-SUP-2):
Device(config)# policy-map type queueing wred
Device(config-pmap)# class tc7
Device(config-pmap-c)# shape average percent 40
Device(config-pmap-c)# class tc6
Device(config-pmap-c)# shape average percent 20
Device(config-pmap-c)# random-detect discard-class-based
Device(config-pmap-c)# random-detect discard-class 0 percent 20 80 1
Device(config-pmap-c)# random-detect discard-class 1 percent 15 70 1
Device(config)# policy-map type queueing hqos_wred
Device(config-pmap)# class class-default
Device(config-pmap-c)# shape average percent 80
Device(config-pmap-c)# service-policy wred
Device(config-pmap-c)# end
The following show commands for the HQoS WRED and WRED configuration is for the Cisco Catalyst 9600 Series Supervisor 2 Module (C9600X-SUP-2):
Device# show policy-map type queueing hqos_wred
Policy Map type queueing hqos_wred
Class class-default
Average Rate Traffic Shaping
cir 80%
service-policy wred
Device# show policy-map type queueing wred
Policy Map type queueing wred
Class tc7
Average Rate Traffic Shaping
cir 40%
Class tc6
Average Rate Traffic Shaping
cir 20%
percent-based wred, exponential weight 1
discard-class min-threshold max-threshold mark-probablity
----------------------------------------------------------
0 20 80 1/1
1 15 70 1/1
2 - - 1/1
3 - - 1/1
4 - - 1/1
5 - - 1/1
6 - - 1/1
7 - - 1/1