How to configure traffic shaping on an AR


For example,Users in the enterprise are located on two network segments and access the server on through Router. The rate of packets from enterprise devices on to the server needs to be limited to 64 kbit/s.
The configuration are as follows:
vlan batch 10 20
acl number 3001 //Configure ACL 3001.
rule 5 permit ip source //Configure rule 5 to allow packets on to pass through.
rule 10 permit ip source //Configure rule 10 to allow packets on to pass through.
acl number 3002 //Configure ACL 3002.
rule 5 permit ip source //Configure rule 5 to allow packets on to pass through.
qos queue-profile limit //Create a queue profile named limit.
queue 3 gts cir 64 cbs 1600 //Set the CIR of queue 3 to 64 kbit/s.
traffic classifier c1 operator or
if-match acl 3002 //Configure a traffic classifier named c1 to match ACL 3002.
traffic behavior b1
remark local-precedence af3 //Configure traffic behavior b1: Re-mark packets matching the traffic classifier with AF3. When permit or deny is not specified, the permit action is taken by default.
traffic policy p1
classifier c1 behavior b1 //Configure a traffic policy named p1, and bind traffic classifier c1 to traffic behavior b1 in the traffic policy.
interface Vlanif10
ip address
interface Vlanif20
ip address
interface Ethernet2/0/0
port link-type trunk //Configure the link type of the interface as trunk.
port trunk allow-pass vlan 10 20 //Add the interface to VLAN 10 and VLAN 20.
traffic-policy p1 inbound //Apply the traffic policy p1 to the inbound direction on the interface.
interface GigabitEthernet3/0/0
ip address
qos queue-profile limit //Apply the queue profile limit to the interface.
nat outbound 3001 //Perform NAT for packets matching ACL 3001.
ip route-static

Other related questions:
What does shaping active in the Enqueue field mean
If Shaping Active is in the Enqueue field, traffic shaping is configured in the traffic policy.
  • -The value Shaping Active:NO indicates that traffic does not exceed the traffic shaping threshold. Traffic shaping is not performed.
  • -The value Shaping Active:YES indicates that traffic has exceeded the traffic shaping threshold. Traffic shaping has been performed.

What are causes of inaccurate traffic policing or traffic shaping result on an AR
Traffic policing and traffic shaping may be performed on the SRU or interface card depending on the traffic type. When traffic policing or traffic shaping is performed on the interface card, the accuracy depends on the granularity of rate limiting. If different links are used, there is the problem of protocol encapsulation compensation.

Can traffic policing and traffic shaping be configured on an interface in the outbound direction
Traffic policing (qos car) affects traffic shaping (qos gts). It is recommended that the two commands should be not configured on an interface simultaneously.

Differences between traffic policing and traffic shaping for S series switches
Traffic policing monitors the rate of traffic entering a network, and discards excess traffic to limit the traffic within a specified range and to protect network resources as well as user benefits. Traffic shaping proactively adjusts the rate of outgoing traffic to reduce traffic bursts, so that outgoing traffic can be transmitted at a stable rate, preventing traffic congestion on downstream devices. In most cases, traffic policing is applied to the inbound direction of a device, while traffic shaping is applied to the outbound direction of a device.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top