76
# Create class 1 to match traffic of VLAN 10. Create behavior 1 and use aggregate CAR action
aggcar-1 in the behavior.
[Switch] traffic classifier 1
[Switch-classifier-1] if-match customer-vlan-id 10
[Switch-classifier-1] quit
[Switch] traffic behavior 1
[Switch-behavior-1] car name aggcar-1
[Switch-behavior-1] quit
# Create class 2 to match traffic of VLAN 100. Create behavior 2 and use aggregate CAR action
aggcar-1 in the behavior.
[Switch] traffic classifier 2
[Switch-classifier-2] if-match customer-vlan-id 100
[Switch-classifier-2] quit
[Switch] traffic behavior 2
[Switch-behavior-2] car name aggcar-1
[Switch-behavior-2] quit
# Create a QoS policy named car, associate class 1 with behavior 1, and associate class 2 with
behavior 2.
[Switch] qos policy car
[Switch-qospolicy-car] classifier 1 behavior 1
[Switch-qospolicy-car] classifier 2 behavior 2
[Switch-qospolicy-car] quit
# Apply QoS policy car to the incoming traffic of GigabitEthernet 1/0/1.
[Switch] interface gigabitethernet 1/0/1
[Switch-GigabitEthernet1/0/1]qos apply policy car inbound
Hierarchical CAR configuration examples
AND-mode hierarchical CAR configuration example
Network requirements
As shown in Figure 23:
• Configure rate limiting for HTTP traffic received on GigabitEthernet 1/0/1 and GigabitEthernet
1/0/2 to limit the rate of HTTP traffic received on each port to 240 kbps.
• Configure hierarchical CAR to limit the rate of HTTP traffic received on the two ports to 320 kbps
and drop the exceeding packets.