WFQ Configuration Example

 

As shown in Fig 3, ge-1/1/1 and ge-1/1/2 are ingress ports. ge-1/1/3 is the egress port. Use the WFQ scheduling model. Priority trust model is IEEE 802.1. The bandwidth is 100Mbps.

Fig 3. Configure WFQ


Configure Scheduler

Configure two schedulers (s1 and s2) with guaranteed-rates and their modes WFQ. Configure scheduler s1 weighted at 1 and scheduler s2 weighted at 3. The guaranteed-rate of scheduler s1 is 10000, and the guaranteed-rate of scheduler s2 is 30000.

admin@XorPlus# set class-of-service scheduler s1 mode WFQ
admin@XorPlus# set class-of-service scheduler s2 mode WFQ
admin@XorPlus# set class-of-service scheduler s1 weight 1
admin@XorPlus# set class-of-service scheduler s1 guaranteed-rate 10000
admin@XorPlus# set class-of-service scheduler s2 weight 3
admin@XorPlus# set class-of-service scheduler s2 guaranteed-rate 30000
admin@XorPlus# commit
Commit OK.
Save done.


Configure Two Forwarding-Classes

Configure forwarding-class f1 and 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 Classifier and Apply Classifiers to Ingress Ports

Configure classifier c1, c2, and c3, as well as the trust mode. Configure classifiers relevant to the forwarding class. Classifiers c1 and c2 are used as the 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 Classifiers to Egress Ports

 Scheduler profile p1 is used to 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                WFQ,1,10000kbps                                        
4                SP,0kbps                                               
5                SP,0kbps                                               
6                WFQ,3,30000kbps                                        
7                SP,0kbps                                                                                      

Generate Traffic

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

The expected result is that PC3 can receive packets from PC1 and PC2, and their rate is about 1:3. That is, the weight proportion and the guaranteed-rate have corresponding queues.

 

 

Copyright © 2024 Pica8 Inc. All Rights Reserved.