Page MenuHomeVyOS Platform

QoS - traffic-class-map services
Open, NormalPublicFEATURE REQUEST

Description

i was thinking that we can move the logic tc-filter to a new xml , where we can use class-map or class-of-services (logic based on Cisco/junos ).

where we can classify services by dscp ,tos ,fw and other classes allowed by tc-filter :

https://man7.org/linux/man-pages/man8/tc-u32.8.html

cisco eg:

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/qos_mqc/configuration/xe-16-12/qos-mqc-xe-16-12-book/qos-intro.html

Create class-maps - Classify your traffic (applications) into classes that you will work on.

class-map voice
  match dscp ef
class-map video
  match dscp AF41 AF42

VyOS :

set traffic-class-map VOICE ip match dscp EF
set traffic-class-map RT ip match dscp AF41
set traffic-class-map RT ip macht dscp AF42

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

fernando renamed this task from Qos - traffic-class-map services to QoS - traffic-class-map services .Jun 21 2023, 11:09 PM

Could you explain the use case?
Can you archive it with the class?

vyos@r14# set qos policy limiter test class video match 1 ip dscp 
Possible completions:
   <0-63>               Differentiated Services Codepoint (DSCP) value
   default              match DSCP (000000)
   reliability          match DSCP (000001)
   throughput           match DSCP (000010)
   lowdelay             match DSCP (000100)
   priority             match DSCP (001000)
   immediate            match DSCP (010000)
   flash                match DSCP (011000)
   flash-override       match DSCP (100000)
   critical             match DSCP (101000)
   internet             match DSCP (110000)
   network              match DSCP (111000)
   AF11                 High-throughput data
   AF12                 High-throughput data
   AF13                 High-throughput data
   AF21                 Low-latency data
   AF22                 Low-latency data
   AF23                 Low-latency data
   AF31                 Multimedia streaming
   AF32                 Multimedia streaming
   AF33                 Multimedia streaming
   AF41                 Multimedia conferencing
   AF42                 Multimedia conferencing
   AF43                 Multimedia conferencing
   CS1                  Low-priority data
   CS2                  OAM
   CS3                  Broadcast video
   CS4                  Real-time interactive
   CS5                  Signaling
   CS6                  Network control
   CS7                  None
   EF                   Expedited Forwarding

this task is a re-definition from a traffic class , I think it could be more clear if we separate tc-filter in a class-map , so we can define different profiles in our cli based on services :

set traffic-class-map VOICE ip match dscp EF
set traffic-class-map RT ip match dscp AF41
set traffic-class-map RT ip macht dscp AF42

this example is clearer : https://packetwhisperer.net/2017/09/14/juniper-class-of-service-cos/

may helps to understand how it looks like .

So, do you want to add a new syntax to archive the same behavior that we have for qos policy ?

exactly , i'll give an example of what is the improving (or new cli) , we have a policy where we can mach different DSCPs associate with REAL TIME or VIOCE . Current in our cli , it would be something like this :

set qos policy shaper VyOS-HTB bandwidth '100mbit'
set qos policy shaper VyOS-HTB class 10 bandwidth '40%'
set qos policy shaper VyOS-HTB class 10 description 'REAL_TIME'
set qos policy shaper VyOS-HTB class 10 match AF11 ip dscp 'AF11'
set qos policy shaper VyOS-HTB class 10 match AF41 ip dscp 'AF41'
set qos policy shaper VyOS-HTB class 10 match AF43 ip dscp 'AF43'
set qos policy shaper VyOS-HTB class 10 match CS4 ip dscp 'CS4'
set qos policy shaper VyOS-HTB class 10 priority '1'
set qos policy shaper VyOS-HTB class 10 queue-type 'fair-queue'
set qos policy shaper VyOS-HTB class 20 bandwidth '30%'
set qos policy shaper VyOS-HTB class 20 description 'VOICE'
set qos policy shaper VyOS-HTB class 20 match EF ip dscp 'EF'
set qos policy shaper VyOS-HTB class 20 match CS5 ip dscp 'CS5'
set qos policy shaper VyOS-HTB class 20 priority '2'
set qos policy shaper VyOS-HTB class 20 queue-type 'fair-queue'
set qos policy shaper VyOS-HTB default bandwidth '20%'
set qos policy shaper VyOS-HTB default queue-type 'fq-codel'

based on the example we can do something like this :

set traffic-class-map VOICE ip match dscp EF
set traffic-class-map VOICE ip match dscp CS5

set traffic-class-map REAL_TIME ip match dscp AF41
set traffic-class-map REAL_TIME ip match dscp AF42
set traffic-class-map REAL_TIME ip match dscp AF43
set traffic-class-map REAL_TIME ip match dscp AF11
set traffic-class-map REAL_TIME ip match dscp CS4 

set qos policy shaper VyOS-HTB bandwidth '100mbit'
set qos policy shaper VyOS-HTB class 10 bandwidth '40%'
set qos policy shaper VyOS-HTB class 10 match c-map  REAL_TIME
set qos policy shaper VyOS-HTB class 10 priority '1'
set qos policy shaper VyOS-HTB class 10 queue-type 'fair-queue'
set qos policy shaper VyOS-HTB class 20 bandwidth '30%'
set qos policy shaper VyOS-HTB class 20 description 'voice shaper'
set qos policy shaper VyOS-HTB class 20  match c-map  VOICE
set qos policy shaper VyOS-HTB class 20 priority '2'
set qos policy shaper VyOS-HTB class 20 queue-type 'fair-queue'
set qos policy shaper VyOS-HTB default bandwidth '20%'
set qos policy shaper VyOS-HTB default queue-type 'fq-codel'

of course , it's just an example but it can introduce any other parameter from tc-filter

dmbaturin triaged this task as Normal priority.Jan 11 2024, 11:35 AM