Queue-based Rate Limiting


The queue-based rate limiting controls the rate of the physical interface egress queue to adjust the traffic rates to enable traffic to be transmitted at an even rate, thus preventing congestion on the downstream device. When the transmit rate of packets exceeds the queue-based rate limit, the packets will be discarded.

Configuring Queue-based Rate Limiting

When packets arrive, the system classifies packets and places them into different egress queues. The device can provide differentiated services for queues of different priorities using different rate limiting parameter settings for these queues.

Procedure

Step1         Configure scheduling algorithm for queue scheduling.

                   set class-of-service scheduler <scheduler-name> mode <SP | WRR | WFQ>

Step2         Configure guaranteed rate and the maximum rate for the interface queue.

                   set class-of-service scheduler <scheduler-name> guaranteed-rate <value>

                   set class-of-service scheduler <scheduler-name> max-rate <value>  

NOTE:

If both queue-based rate limiting and interface-based rate limiting (configured by the command set interface gigabit-ethernet <port> rate-limiting <ingress | egress> kilobits <kilobits-ps>) are configured on the interface, the smaller value of the two will be used for rate limiting.

Step3         Configure scheduler profile associated with the configured scheduler and forwarding class.

                   set class-of-service scheduler-profile <scheduler-profile-name> forwarding-class <forwarding-class-name> scheduler <scheduler-name>

Step4         Configure mapping between forwarding class and local priority.

                   set class-of-service forwarding-class <forwarding-class-name> local-priority <int>

Step5         Apply the scheduler profile to an egress interface.

                   set class-of-service interface <interface-name> scheduler-profile <scheduler-profile-name>

Configuration Example

Network Requirements

As shown in Figure 1, User1, User2, and User3 are three different types of user devices in the network. They are respectively connected to the interfaces Ge-1/1/1, Ge-1/1/2, and Ge-1/1/3 of the Switch. The Switch is connected to the Router through interface Ge-1/1/4.

On the Switch, configure service classification for different users and queue mapping of egress interface for different services. Set different guaranteed rate and maximum rate for the physical interface egress queues for different services to reduce network congestion and ensure the bandwidth requirements of each service.

Figure 1. Queue-based Rate Limiting Configuration Example

The configuration process is as follows:

  1. Create VLANs and configure VLAN members on each interface to enable the users to access the network through the Switch.
  2. Configure classifier to classify services on different inbound interfaces and queue mapping of outbound interface for different services.
  3. Configure queue schedulers for the physical interface egress queue.
  4. Configure queue-based rate limiting to limit the bandwidth of User1, User2, and User3 services.

Procedure

Step1         Configure VLANs. 

admin@XorPlus# set vlans vlan-id 199
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching port-mode trunk
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching vlan members 199
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching port-mode trunk
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching vlan members 199
admin@XorPlus# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching port-mode trunk
admin@XorPlus# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching vlan members 199
admin@XorPlus# set interface gigabit-ethernet ge-1/1/4 family ethernet-switching port-mode trunk
admin@XorPlus# set interface gigabit-ethernet ge-1/1/4 family ethernet-switching vlan members 199

Step2         Configure classifier to classify services on different inbound interfaces. 

admin@XorPlus# set class-of-service classifier c1 trust-mode ieee-802.1
admin@XorPlus# set class-of-service classifier c2 trust-mode inet-precedence
admin@XorPlus# set class-of-service classifier c3 trust-mode dscp
admin@XorPlus# set class-of-service interface ge-1/1/1 classifier c1
admin@XorPlus# set class-of-service interface ge-1/1/2 classifier c2
admin@XorPlus# set class-of-service interface ge-1/1/3 classifier c3

Step3         Configuring the queue scheduling algorithm. 

admin@XorPlus# set class-of-service scheduler s1 mode SP
admin@XorPlus# set class-of-service scheduler s2 mode SP
admin@XorPlus# set class-of-service scheduler s3 mode SP

Step4         Configure the guaranteed rate and maximum rate of the interface egress queue. 

admin@XorPlus# set class-of-service scheduler s1 guaranteed-rate 5000 
admin@XorPlus# set class-of-service scheduler s2 guaranteed-rate 15000
admin@XorPlus# set class-of-service scheduler s3 guaranteed-rate 20000
admin@XorPlus# set class-of-service scheduler s1 max-rate 30000
admin@XorPlus# set class-of-service scheduler s2 max-rate 30000
admin@XorPlus# set class-of-service scheduler s3 max-rate 30000


Step5         Configure the scheduler-profile and queue mapping of egress interface. 

admin@XorPlus# set class-of-service forwarding-class f0 local-priority 0
admin@XorPlus# set class-of-service forwarding-class f3 local-priority 3
admin@XorPlus# set class-of-service forwarding-class f7 local-priority 7
admin@XorPlus# set class-of-service scheduler-profile p1 forwarding-class f0 scheduler s1
admin@XorPlus# set class-of-service scheduler-profile p1 forwarding-class f3 scheduler s2
admin@XorPlus# set class-of-service scheduler-profile p1 forwarding-class f7 scheduler s3

Step6         Apply scheduler-profile to egress interface Ge-1/1/4.

admin@XorPlus# set class-of-service interface ge-1/1/4 scheduler-profile p1

Copyright © 2024 Pica8 Inc. All Rights Reserved.