New Member
Posts: 25
Registered: ‎03-19-2017
Kudos: 1

QoS Priorities

I currently have a policy setup to limit upload and download bandwidth to my media server. I'd like to guarantee that all OTHER traffic gets top priority, however, when my media server is in use, everything else's latency suffers. How can I guarantee top priority (BW and latency) to all traffic that is NOT the media server?

 

Current config:

 

traffic-control {                                                                                                                                                                         
    advanced-queue {                                                                                                                                                                      
        branch {                                                                                                                                                                          
            queue 100 {                                                                                                                                                                   
                bandwidth 12mbit                                                                                                                                                          
                description upload                                                                                                                                                        
                parent 1                                                                                                                                                                  
            }                                                                                                                                                                             
            queue 200 {                                                                                                                                                                   
                bandwidth 65mbit                                                                                                                                                          
                description download                                                                                                                                                      
                parent 1                                                                                                                                                                  
            }                                                                                                                                                                             
        }                                                                                                                                                                                 
        filters {                                                                                                                                                                         
            match 101 {                                                                                                                                                                   
                attach-to 100                                                                                                                                                             
                description server                                                                                                                                                        
                ip {
                    source {                                                                                                                                                              
                        address 192.168.1.2/32                                                                                                                                            
                    }                                                                                                                                                                     
                }                                                                                                                                                                         
                target 101                                                                                                                                                                
            }                                                                                                                                                                             
            match 199 {                                                                                                                                                                   
                attach-to 100                                                                                                                                                             
                description default                                                                                                                                                       
                target 199                                                                                                                                                                
            }                                                                                                                                                                             
            match 201 {                                                                                                                                                                   
                attach-to 200                                                                                                                                                             
                description server                                                                                                                                                        
                ip {                                                                                                                                                                      
                    destination {                                                                                                                                                         
                        address 192.168.1.2/32                                                                                                                                            
                    }                                                                                                                                                                     
                }                                                                                                                                                                         
                target 201                                                                                                                                                                
            }                                                                                                                                                                             
            match 299 {                                                                                                                                                                   
                attach-to 200
                description default                                                                                                                                                       
                target 299                                                                                                                                                                
            }                                                                                                                                                                             
        }                                                                                                                                                                                 
        leaf {                                                                                                                                                                            
            queue 101 {                                                                                                                                                                   
                bandwidth 5mbit                                                                                                                                                           
                ceiling 12mbit                                                                                                                                                            
                description server                                                                                                                                                        
                parent 100                                                                                                                                                                
                priority 7                                                                                                                                                                
                queue-type fq_codel_up                                                                                                                                                    
            }                                                                                                                                                                             
            queue 199 {                                                                                                                                                                   
                bandwidth 12mbit                                                                                                                                                          
                description default                                                                                                                                                       
                parent 100                                                                                                                                                                
                priority 0                                                                                                                                                                
                queue-type fq_codel_up                                                                                                                                                    
            }                                                                                                                                                                             
            queue 201 {                                                                                                                                                                   
                bandwidth 8mbit                                                                                                                                                           
                ceiling 65mbit
                description server                                                                                                                                                        
                parent 200                                                                                                                                                                
                priority 7                                                                                                                                                                
                queue-type fq_codel_down                                                                                                                                                  
            }                                                                                                                                                                             
            queue 299 {                                                                                                                                                                   
                bandwidth 65mbit                                                                                                                                                          
                description default                                                                                                                                                       
                parent 200                                                                                                                                                                
                priority 0                                                                                                                                                                
                queue-type fq_codel_down                                                                                                                                                  
            }                                                                                                                                                                             
        }                                                                                                                                                                                 
        queue-type {                                                                                                                                                                      
            fq-codel fq_codel_down {                                                                                                                                                      
                ecn enable                                                                                                                                                                
            }                                                                                                                                                                             
            fq-codel fq_codel_up {                                                                                                                                                        
                ecn enable                                                                                                                                                                
            }                                                                                                                                                                             
        }                                                                                                                                                                                 
        root {                                                                                                                                                                            
            queue 1 {
                attach-to global                                                                                                                                                          
                bandwidth 77mbit                                                                                                                                                          
            }                                                                                                                                                                             
        }                                                                                                                                                                                 
    }                                                                                                                                                                                     
}     
Veteran Member
Posts: 8,108
Registered: ‎03-24-2016
Kudos: 2129
Solutions: 930

Re: QoS Priorities

Viewing code snippet....you're close.

 

You're missing filters, on root, that splits all traffic in seperate up- and download queue

 

set traffic-control advanced-queue filters match 100 attach-to 1
set traffic-control advanced-queue filters match 100 description 'WAN upload'
set traffic-control advanced-queue filters match 100 ip source address 192.168.1.0/24
set traffic-control advanced-queue filters match 100 target 100
set traffic-control advanced-queue filters match 200 attach-to 1
set traffic-control advanced-queue filters match 200 description 'WAN download'
set traffic-control advanced-queue filters match 200 ip destination address 192.168.1.0/24
set traffic-control advanced-queue filters match 200 target 200

 

Also, don't oversubscribe.  Use bandwidth to set reserved bandwidth (=guaranteed)  , use ceiling for max.

So, on queue 299, lower bandwidth, and set ceiling to 65

Highlighted
New Member
Posts: 25
Registered: ‎03-19-2017
Kudos: 1

Re: QoS Priorities

like so?

 

traffic-control {
    advanced-queue {
        branch {
            queue 100 {
                bandwidth 12mbit
                description upload
                parent 1
            }
            queue 200 {
                bandwidth 65mbit
                description download
                parent 1
            }
        }
        filters {
            match 100 {
                attach-to 1
                description upload
                ip {
                    source {
                        address 192.168.1.0/24
                    }
                }
                target 100
            }
            match 101 {
                attach-to 100
                description server
                ip {
                    source {
                        address 192.168.1.2/32
                    }
                }
                target 101
            }
            match 199 {
                attach-to 100
                description default
                target 199
            }
            match 200 {
                attach-to 1
                description download
                ip {
                    destination {
                        address 192.168.1.0/24
                    }
                }
                target 200
            }
            match 201 {
                attach-to 200
                description server
                ip {
                    destination {
                        address 192.168.1.2/32
                    }
                }
                target 201
            }
            match 299 {
                attach-to 200
                description default
                target 299
            }
        }
        leaf {
            queue 101 {
                bandwidth 5mbit
                ceiling 12mbit
                description server
                parent 100
                priority 7
                queue-type fq_codel_up
            }
            queue 199 {
                bandwidth 7mbit
                ceiling 12mbit
                description default
                parent 100
                priority 0
                queue-type fq_codel_up
            }
            queue 201 {
                bandwidth 8mbit
                ceiling 65mbit
                description server
                parent 200
                priority 7
                queue-type fq_codel_down
            }
            queue 299 {
                bandwidth 40mbit
                ceiling 65mbit
                description default
                parent 200
                priority 0
                queue-type fq_codel_down
            }
        }
        queue-type {
            fq-codel fq_codel_down {
                ecn enable
            }
            fq-codel fq_codel_up {
                ecn enable
            }
        }
        root {
            queue 1 {
                attach-to global
                bandwidth 77mbit
            }
        }
    }
}