R0106-HP MSR Router Series ACL and QoS Configuration Guide(V7)
41
Traffic policing and GTS configuration example
Network requirements
As shown in Figure 11:
• The server, Host A, and Host B can access the Internet through Router A and Router B.
• The server, Host A, and GigabitEthernet 2/1/0 of Router A are in the same network segment.
• Host B and GigabitEthernet 2/1/1 of Router A are in the same network segment.
Perform traffic control for the packets GigabitEthernet 2/1/0 of Router A receives from the server and
Host A, as follows:
• Limit the rate of packets from the 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.
Perform traffic control on GigabitEthernet 2/1/0 and GigabitEthernet 2/1/1 of Router B, as follows:
• Limit the incoming traffic rate on GigabitEthernet 2/1/0 to 500 kbps, and the excess packets are
dropped.
• Limit the outgoing traffic rate on GigabitEthernet 2/1/1 to 1000 kbps, and the excess packets are
dropped.
Figure 11 Network diagram
Configuration procedure
1. Configure Router A:
# Configure GTS on GigabitEthernet 2/1/2, shaping the packets when the sending rate exceeds
500 kbps to decrease the packet loss rate of GigabitEthernet 2/1/0 of Router B.
<RouterA> system-view
[RouterA] interface gigabitethernet 2/1/2
[RouterA-GigabitEthernet2/1/2] qos gts any cir 500
[RouterA-GigabitEthernet2/1/2] quit
# Configure ACLs to permit the packets from the server and Host A.
[RouterA] acl number 2001
[RouterA-acl-basic-2001] rule permit source 1.1.1.1 0
Internet
1.1.1.1/8 1.1.1.2/8
GE2/1/2
GE1/1/0
GE2/1/1
GE2/1/1
GE2/1/0
Host A
Router A
Router B
Server
Ethernet
Host B