40
Figure 12 Network diagram
Configuration procedure
1. Configure Switch A:
# Configure ACL 2001 and ACL 2002 to match traffic from the server and Host A, respectively.
<SwitchA> system-view
[SwitchA] acl number 2001
[SwitchA-acl-basic-2001] rule permit source 1.1.1.1 0
[SwitchA-acl-basic-2001] quit
[SwitchA] acl number 2002
[SwitchA-acl-basic-2002] rule permit source 1.1.1.2 0
[SwitchA-acl-basic-2002] quit
# Create a class named server and use ACL 2001 as the match criterion. Create a class named
host and use ACL 2002 as the match criterion.
[SwitchA] traffic classifier server
[SwitchA-classifier-server] if-match acl 2001
[SwitchA-classifier-server] quit
[SwitchA] traffic classifier host
[SwitchA-classifier-host] if-match acl 2002
[SwitchA-classifier-host] quit
# Create a behavior named server and configure the CAR action for the behavior as follows:
Set the CIR to 102400 kbps, and mark the excess packets (red packets) with DSCP value 0 and
transmit them.
[SwitchA] traffic behavior server
[SwitchA-behavior-server] car cir 102400 red remark-dscp-pass 0
[SwitchA-behavior-server] quit
# Create a behavior named host and configure the CAR action for the behavior as follows: Set
the CIR to 25600 kbps.
[SwitchA] traffic behavior host
[SwitchA-behavior-host] car cir 25600
[SwitchA-behavior-host] quit
# Create a QoS policy named car and associate class server with behavior server and class
host with behavior host.
[SwitchA] qos policy car
[SwitchA-qospolicy-car] classifier server behavior server
[SwitchA-qospolicy-car] classifier host behavior host
[SwitchA-qospolicy-car] quit
# Apply QoS policy car to the incoming traffic of GigabitEthernet 1/0/1.
Internet
1.1.1.1/8 1.1.1.2/8
GE1/0/3
GE1/0/1
GE1/0/2
GE1/0/2
GE1/0/1
Host A
Switch A
Switch B
Server
Ethernet
Host B