OcNOS-SP : Quality of Service Guide : Quality of Service Configuration Guide : Hierarchical Traffic Policing : Configuring Hierarchical Traffic Policing
Configuring Hierarchical Traffic Policing
Command to configure policing on a class remains same as explained in Chapter 3, Traffic Policing.
In addition to the commands explained in Chapter 1, Quality of Service and Chapter 2, Configuring a QoS Policy-map, binding a child policy-map to a parent class is done using the following command:
service-policy NAME
Notice that NAME represents the name of the child qos policy-map. This command is configurable on the class mode as shown in the example below:
(config)#policy-map Pmap-Parent-1
(config-pmap-qos)#class Cmap-Parent-1
(config-pmap-c-qos)#service-policy Pmap-Child-1
(config-pmap-c-qos)#exit
An example of creating parent and child class-maps and policy-maps, and configuring them for hierarchical policing is shown below:
Note: the qos-policer TCAM group must be enabled before binding a parent policy-map to an interface. For more information about the hardware filter groups, see the hardware-profile filter and show hardware-profile filters commands in the System Management Guide.
In the following example, traffic streams on VLAN ID 10, where one stream with CoS value 1 and another stream with CoS value 2 (received on interface xe1) are policed to a total of 40 mbps with 10 mbps of traffic being marked green for stream1 at 20 mbps, and traffic marked green for stream2. The remaining 10 mbps of traffic from stream1 and stream2 is marked yellow. Any remaining traffic will be dropped at ingress.
(config)#qos enable
(config)#class-map CUST-10
(config-cmap-qos)#match vlan 10
(config-cmap-qos)#exit
(config)#class-map CUST-10-C1
(config-cmap-qos)#match cos 1
(config-cmap-qos)#exit
(config)#class-map CUST-10-C2
(config-cmap-qos)#match cos 2
(config-cmap-qos)#exit
(config)#policy-map PC-CUST-10
(config-pmap-qos)#class CUST-10-C1
(config-pmap-c-qos)#police cir 10 mbps eir 30 mbps
(config-pmap-c-qos)#exit
(config-pmap-qos)#class CUST-10-C2
(config-pmap-c-qos)#police cir 20 mbps eir 20 mbps
(config-pmap-c-qos)#exit
(config-pmap-qos)#class class-default
(config-pmap-c-qos)#police cir 10 mbps eir 30 mbps
(config-pmap-c-qos)#exit
(config-pmap-qos)#exit
(config)#policy-map P-CUST-10
(config-pmap-qos)#class CUST-10
(config-pmap-c-qos)#police cir 40 mbps
(config-pmap-c-qos)#service-policy PC-CUST-10
(config-pmap-c-qos)#exit
(config-pmap-qos)#exit
(config)#hardware-profile filter qos-policer enable
(config)#interface xe1
(config-if)#service-policy type qos input P-CUST-10
(config-if)#exit
Last modified date: 10/20/2023