GTAC-Sophia Publish time 2023-6-26 10:59:36

How to configure QoS on Ruijie Switch?

1. Application scenario:
QoS policy-map can associate ACL with QoS policy-map to implement rate limiting based on specific packet flows (for example, limiting http traffic only for web pages or limiting traffic only for users on the XX network segment). The flexible configuration of ACLs enables customize rate limiting for different traffic. Of course, the configuration in this mode is relatively complicated. When the customer needs policy-map mode, it can be used to limit port limits.
It is similar to assigning a fixed bandwidth to a certain port. The control mode is simple, and the configuration is simple. If the customer has the above requirements, you can use the rate-limit mode to limit the traffic rate.

2. Networking requirements:
All branches of an organization connect to the cores witch through MSTP lines and share the unified network egress. Because branches have different scales, the administrator wants to set the uplink and download rates for the ports connected to each branch.
3. Networking topology:
data/attachment/forum/202306/26/105309l6mssxxlo2yooyxd.png

3. Configuration Points:
1)Usepolicy-map to limit the rate
(1) Use ACL to classify traffic
(2) Configure the class-map ACL
(3) Associate Policy-map with class-map and settraffic policies
(4) The interface invokes Policy-map
2)Userate-limit to limit speed
(1) Apply rate-limit directly to the interface
4.configuration steps
1) Use ACL to classify traffic

Ruijie>enRuijie#config terRuijie(config)#access-list 100 permit ip192.168.1.0 0.0.0.255 any ------> Define the data flows on network segmentcompany a. If you want to match all the traffic, you can set it to permit ipany anyRuijie(config)# class-map companyaRuijie(config-cmap)# match access-group 100Ruijie(config-cmap)#exitRuijie(config)# policy-map companyaRuijie(config-pmap)#class companyaRuijie(config-pmap-c)#police 10000 1024exceed-action dropRuijie(config-pmap-c)#exitRuijie(config-pmap)#exitRuijie(config)# interface gigabitEthernet 1/1Ruijie(config-if-GigabitEthernet1/1)#service-policy input companya
Note:
1. Run the rate-limit command to set the rate limit and burst traffic. How to set the burst value? Consider the following experience:

[*]The burst value is in the range of (2,4,8,16,32,64, * *1024, 2*1024,4*1024,16*1024).
[*]It is recommended that the buffer capacity of the token bucket be at least 200ms, that is, (CIR/8) x 200ms, that is, the minimum recommended value = Rate limit /40
[*]If unexpected services such as video and file transmission exist on the network, increase the token bucket capacity to improve QOS burst tolerance.
According to the above three principles, it is recommended to select the value of burst value (limit value/10) and select the value closest to the x power of 2.
2)Configurerate-limit to limit the rate of traffic on the port


Ruijie(config)#interface gigabitEthernet 1/1------> Enter the interfaceRuijie(config-if-GigabitEthernet 1/1)#rate-limitinput 10000 1024Ruijie(config-if-GigabitEthernet 1/1)#rate-limitoutput 10000 1024Ruijie(config)#interface gigabitEthernet 1/2------> Enter the interfaceRuijie(config-if-GigabitEthernet 1/2)#rate-limitinput8000 1024Ruijie(config-if-GigabitEthernet 1/2)#rate-limitoutput 8000 1024Ruijie(config)#interface gigabitEthernet 1/3------> Enter the interfaceRuijie(config-if-GigabitEthernet 1/3)#rate-limitoutput20000 2048Ruijie(config-if-GigabitEthernet 1/3)#rate-limitoutput20000 2048

Note:
1.Run the rate-limit command to set the rate limit and burst traffic. How to set the burst value? Consider the following experience:

[*]The burst value is in the range of(2,4,8,16,32,64, * *1024, 2*1024,4*1024,16*1024).
[*]It is recommended that the buffer capacity of the token bucket be at least 200ms, that is, (CIR/8) x 200ms, that is, the minimum recommended value = Rate limit /40
[*]If unexpected services such as video and file transmission exist on the network, increase the token bucket capacity to improve QOS burst tolerance.
According to the above three principles, it is recommended to select the value of burst value (limit value/10) and select the value closest to the x power of 2.
5. Command Interpretation:
rate-limit input|outputkbps burst-bytes
Input | output: the user wants to limit the flow of Input or output.
kbps: indicates the rate upper limit of the traffic that the user wants. The unit is kbps.
Burst-bytes: This refers to the size of the burst traffic (token bucket size) in kbytes.
6. Configuration verification
1)Runthe Ruijie#show policy-map interface gigabit Ethernet 1/1 command to view the QoS policies called by the interface
GigabitEthernet 1/1 input (tc policy): companya
Class companya
current token tbf: NULL
params: 10000 kbps, 1024 limit, 0 extended limit , 0 pir
conformed 0 packets, 0 bytes;action: drop 0
exceeded 0 packets, 0 bytes;action: none 0
violated 0 packets, 0 bytes;action: none 0
cbucket 0, cbs 0; ebucket 0 ebs 0
2)Runthe Ruijie#show mls qos rate-limit command to view the rate-limit policy of theinterface
Interface: GigabitEthernet 1/1
rate limit input Kbps = 10000 burst = 1024
rate limit output Kbps = 10000 burst = 1024
Interface: GigabitEthernet 1/2
rate limit input Kbps = 10000 burst = 1024
rate limit output Kbps = 10000 burst = 1024
Interface: GigabitEthernet 1/3
rate limit input Kbps = 10000 burst = 1024
rate limit output Kbps = 10000 burst = 1024
Pages: [1]
View full version: How to configure QoS on Ruijie Switch?