41
[SwitchA] interface GigabitEthernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] qos apply policy car inbound
2. Configure Switch B:
# Configure advanced ACL 3001 to match HTTP traffic.
<SwitchB> system-view
[SwitchB] acl number 3001
[SwitchB-acl-adv-3001] rule permit tcp destination-port eq 80
[SwitchB-acl-adv-3001] quit
# Create a class named http and use ACL 3001 as the match criterion.
[SwitchB] traffic classifier http
[SwitchB-classifier-http] if-match acl 3001
[SwitchB-classifier-http] quit
# Create a class named class and configure the class to match all packets.
[SwitchB] traffic classifier class
[SwitchB-classifier-class] if-match any
[SwitchB-classifier-class] quit
# Create a behavior named car_inbound and configure the CAR action for the behavior as
follows: Set the CIR to 204800 kbps.
[SwitchB] traffic behavior car_inbound
[SwitchB-behavior-car_inbound] car cir 204800
[SwitchB-behavior-car_inbound] quit
# Create a behavior named car_outbound and configure a CAR action for the behavior as
follows: Set the CIR to 102400 kbps.
[SwitchB] traffic behavior car_outbound
[SwitchB-behavior-car_outbound] car cir 102400
[SwitchB-behavior-car_outbound] quit
# Create a QoS policy named car_inbound and associate class class with traffic behavior
car_inbound in the QoS policy.
[SwitchB] qos policy car_inbound
[SwitchB-qospolicy-car_inbound] classifier class behavior car_inbound
[SwitchB-qospolicy-car_inbound] quit
# Create a QoS policy named car_outbound and associate class http with traffic behavior
car_outbound in the QoS policy.
[SwitchB] qos policy car_outbound
[SwitchB-qospolicy-car_outbound] classifier http behavior car_outbound
[SwitchB-qospolicy-car_outbound] quit
# Apply QoS policy car_inbound to the incoming traffic of GigabitEthernet 1/0/1.
[SwitchB] interface GigabitEthernet 1/0/1
[SwitchB-GigabitEthernet1/0/1] qos apply policy car_inbound inbound
# Apply QoS policy car_outbound to the outgoing traffic of GigabitEthernet 1/0/2.
[SwitchB] interface GigabitEthernet 1/0/2
[SwitchB-GigabitEthernet1/0/2] qos apply policy car_outbound outbound