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.
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>
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>
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:
- Create VLANs and configure VLAN members on each interface to enable the users to access the network through the Switch.
- Configure classifier to classify services on different inbound interfaces and queue mapping of outbound interface for different services.
- Configure queue schedulers for the physical interface egress queue.
- Configure queue-based rate limiting to limit the bandwidth of User1, User2, and User3 services.
Step1 Configure VLANs.
Step2 Configure classifier to classify services on different inbound interfaces.
Step3 Configuring the queue scheduling algorithm.
Step4 Configure the guaranteed rate and maximum rate of the interface egress queue.
Step5 Configure the scheduler-profile and queue mapping of egress interface.
Step6 Apply scheduler-profile to egress interface Ge-1/1/4.