WRR Configuration Example



As shown in Fig 2, ge-1/1/1 and ge-1/1/2 are ingress ports. ge-1/1/3 is the egress port. Use WRR scheduling model: priority trust mode is IEEE 802.1.
                                             
                                                                                     Fig 2. Configure WRR


Configure Scheduler

Configure two schedulers: s1 and s2. Their modes are WRR. Configure scheduler s1's weight as 1 and s2's weight as 3.

admin@XorPlus# set class-of-service scheduler s1 mode WRR
admin@XorPlus# set class-of-service scheduler s2 mode WRR
admin@XorPlus# set class-of-service scheduler s1 weight 1
admin@XorPlus# set class-of-service scheduler s2 weight 3
admin@XorPlus# commit
Commit OK.
Save done.

Configure Two Forwarding-Classes

Configure forwarding-classes, f1, f2, and their local-priorities.

admin@XorPlus# set class-of-service forwarding-class f1 local-priority 3
admin@XorPlus# set class-of-service forwarding-class f2 local-priority 6
admin@XorPlus# commit 
Commit OK.
Save done.

Configuring Classifiers and Apply Classifiers to Ingress Ports

Configure classifier c1, c2, and the trust mode for each. Configure classifier relevant to the forwarding class. Both c1 and c2 are used as ingress ports, and they should contain code point, not scheduler.

admin@XorPlus# set class-of-service classifier c1 trust-mode ieee-802.1
admin@XorPlus# set class-of-service classifier c1 forwarding-class f1 code-point 5
admin@XorPlus# set class-of-service classifier c2 trust-mode ieee-802.1
admin@XorPlus# set class-of-service classifier c2 forwarding-class f2 code-point 7
admin@XorPlus# commit 
Commit OK.
Save done.
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# commit 
Commit OK.
Save done.
admin@XorPlus# run show class-of-service interface ge-1/1/1
Interface : ge-1/1/1
trust mode : ieee-802.1
Default ieee-802.1 : 0
Default dscp : 0
Default inet-precedence : 0
Local-priority   Queue-Schedule           		Code-points
--------------   --------------------------   ------------------------------
0                SP,0kbps                      0                        
1                SP,0kbps                      1                        
2                SP,0kbps                      2                        
3                SP,0kbps                      3,5                      
4                SP,0kbps                      4                        
5                SP,0kbps                                               
6                SP,0kbps                      6                        
7                SP,0kbps                      7         
admin@XorPlus# run show class-of-service interface ge-1/1/2
Interface : ge-1/1/2
trust mode : ieee-802.1
Default ieee-802.1 : 0
Default dscp : 0
Default inet-precedence : 0
Local-priority   Queue-Schedule           		Code-points
--------------   --------------------------   ------------------------------
0                SP,0kbps                      0                        
1                SP,0kbps                      1                        
2                SP,0kbps                      2                        
3                SP,0kbps                      3                        
4                SP,0kbps                      4                        
5                SP,0kbps                      5                        
6                SP,0kbps                      6,7                      
7                SP,0kbps                              

Configuring Scheduler Profile and Apply Scheduler Profile to Egress Ports

 Scheduler profile p1 is used for egress port ge-1/1/3 and should contain a scheduler not containing code point.

admin@XorPlus# set class-of-service scheduler-profile p1 forwarding-class f1 scheduler s1
admin@XorPlus# set class-of-service scheduler-profile p1 forwarding-class f2 scheduler s2
admin@XorPlus# commit 
Commit OK.
Save done.
admin@XorPlus# set class-of-service interface ge-1/1/3 scheduler-profile p1
admin@XorPlus# commit 
Commit OK.
Save done.
admin@XorPlus# run show class-of-service interface ge-1/1/3
Interface : ge-1/1/3
trust mode : no-trust
Default ieee-802.1 : 0
Default dscp : 0
Default inet-precedence : 0
Local-priority   Queue-Schedule                      Code-points
--------------   --------------------------   ------------------------------
0                SP,0kbps                                               
1                SP,0kbps                                               
2                SP,0kbps                                               
3                WRR,1,0kbps                                            
4                SP,0kbps                                               
5                SP,0kbps                                               
6                WRR,3,0kbps                                            
7                SP,0kbps                                           


Generate Traffic

PC1 and PC2 generate traffic that are matched with the corresponding classifier. PC1 and PC2 send 100% of traffic to PC3 at the same time.

The expected result is that PC3 can receive packets from PC1 and PC2, and their rate is 1:3, that is the weight proportion in the corresponding queue.

 

 

Copyright © 2024 Pica8 Inc. All Rights Reserved.