The DSCP priority (0-lowest) is inverse to the priority of classes in HTB policing (0-highest). Therefore if you need to mark packages for external platforms, you need to set class_order=1 and use the following table to get the correspondence between DSCP values and traffic classes in HTB. If you do not need to mark packages, then it is more convenient to use intuitive correspondence: dscp cs0↔htb class0 (at setting class_order=0 by default).
DSCP Name | Binary Value | Decimal Value | Priority | Policing Class | Policing class at setting class_order=1 |
---|---|---|---|---|---|
CS0 | 000 000 | 0 | 0 | 0 | 7 |
CS1 | 001 000 | 8 | 1 | 1 | 6 |
AF11 | 001 010 | 10 | 1 | 1 | 6 |
AF12 | 001 100 | 12 | 1 | 1 | 6 |
AF13 | 001 110 | 14 | 1 | 1 | 6 |
CS2 | 010 000 | 16 | 2 | 2 | 5 |
AF21 | 010 010 | 18 | 2 | 2 | 5 |
AF22 | 010 100 | 20 | 2 | 2 | 5 |
AF23 | 010 110 | 22 | 2 | 2 | 5 |
CS3 | 011 000 | 24 | 3 | 3 | 4 |
AF31 | 011 010 | 26 | 3 | 3 | 4 |
AF32 | 011 100 | 28 | 3 | 3 | 4 |
AF33 | 011 110 | 30 | 3 | 3 | 4 |
CS4 | 100 000 | 32 | 4 | 4 | 3 |
AF41 | 100 010 | 34 | 4 | 4 | 3 |
AF42 | 100 100 | 36 | 4 | 4 | 3 |
AF43 | 100 110 | 38 | 4 | 4 | 3 |
CS5 | 101 000 | 40 | 5 | 5 | 2 |
EF | 101 110 | 46 | 5 | 5 | 2 |
CS6 | 110 000 | 48 | 6 | 6 | 1 |
CS7 | 111 000 | 56 | 7 | 7 | 0 |
Priority is a subset of the DSCP field in the IP header. In cases of VLAn/QinQ and MPLS it is a separate field in a range of values 0..7. The settings indicate the full DSCP value, which is used in case of marking up IP traffic, and in other cases only priority is used.