40
Perform traffic control for packets received on GigabitEthernet 1/0/1 of Router A from Server and
Host A, respectively, as follows:
•
Limit the rate of packets from Server to 54 kbps. When the traffic rate is below 54 kbps, the
traffic is forwarded. When the traffic rate exceeds 54 kbps, the excess packets are marked with
IP precedence 0 and then forwarded.
•
Limit the rate of packets from Host A to 8 kbps. When the traffic rate is below 8 kbps, the traffic
is forwarded. When the traffic rate exceeds 8 kbps, the excess packets are dropped.
Traffic control for packets forwarded by GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 of Router B
is as follows:
•
Limit the receiving rate on GigabitEthernet 1/0/1 of Router B to 500 kbps, and the excess
packets are dropped.
•
Limit the sending rate on GigabitEthernet 1/0/2 of Router B to 1000 kbps, and the excess
packets are dropped.
Figure 13 Network diagram
Configuration procedure
1.
Configure Router A:
# Configure GTS on GigabitEthernet 1/0/3, shaping the packets when the sending rate exceeds
500 kbps to decrease the packet loss rate of GigabitEthernet 1/0/1 of Router B.
<RouterA> system-view
[RouterA] interface gigabitethernet 1/0/3
[RouterA-GigabitEthernet1/0/3] qos gts any cir 500
[RouterA-GigabitEthernet1/0/3] quit
# Configure ACLs to permit the packets from Server and Host A.
[RouterA] acl number 2001
[RouterA-acl-basic-2001] rule permit source 1.1.1.1 0
[RouterA-acl-basic-2001] quit
[RouterA] acl number 2002
[RouterA-acl-basic-2002] rule permit source 1.1.1.2 0
[RouterA-acl-basic-2002] quit
# Configure CAR policies for different flows received on GigabitEthernet 1/0/1.
[RouterA] interface gigabitethernet 1/0/1
[RouterA-GigabitEthernet1/0/1] qos car inbound acl 2001 cir 54 cbs 4000 ebs 0 green
pass red remark-prec-pass 0