Bookmark and Share

Quality of Service QoS

What is Quality of Service (QoS) and how should I configure it?

QoS is a mean to control different traffic flows. With the Link LB you can configure two types of QoS, "DiffServ Marking" and "Hierarchical Token Bucket". Configuring QoS in the Link LB starts with one or many QoS "buckets" or "definitions", in each definition you will be able to specify how QoS should be applied to traffic chosen. The actual traffic selection is made using ACLs. At the end of each ACL you can put the qos:ID1,ID2,ID3,… where each IDx stands for a QoS definition.

With any Qos methods you need to start QoS definitions with the parameters below:

[id]: A numeral identifier that can be used in other parts of the configuration to refer to this QoS definition. QoS markers can be used in ACL entries. 

[dsmark|tc_htb] [reserved bandwidth (kb/s) in]/[reserved bandwidth (kb/s) out],[max bandwidth (kb/s) in]/[max bandwidth (kb/s) out]: Two QoS methods are available, "differentiated services" or DiffServ or Traffic control - Hierarchical Token Bucket.

DiffServ marking

With DiffServ, 2 major traffic classes exist, Expedited Forwarding (EF) and Assured Forwarding (AF). EF traffic usually has strict priority queuing above other traffic classes. EF traffic selection should be limited. Assured forwarding allows the operator to provide assurance of delivery as long as the traffic does not exceed some subscribed rate. AF Traffic that exceeds the subscription rate faces a higher probability of being dropped if congestion occurs.

 

To select Expedited Forwading simply choose "ef" as the dsmark option.

To select Assured Forwarding please consult the following table:

Assured Forwarding (AF) Behavior Group

  Class 1 Class 2 Class 3 Class 4
Low Drop af11 af21 af31 af41
Med Drop af12 af22 af32 af42
High Drop af13 af23 af33 af43

 

NOTE: The Link LB is considered as a "classifier" according to section 2.3.1 of RFC 2475. Classifiers are used to "steer" packets matching some specified rule to an element of a traffic conditioner for further processing. In other words, the Link LB role is limited to marking the packets with the correct DSCP value and will not police are shape traffic actively based on these criteria. If you wish to do QoS using the Link LB as the sole QoS device please use tc_htb instead.

 

Hierarchical Token Bucket

HTB is very useful to limit download/upload rates or to guarantee a set amount of bandwidth to a chosen traffic flow. 

For each definition you can select how you want traffic assigned to this QoS definition to be shaped.

[reserved bandwidth (kb/s) in]/[reserved bandwidth (kb/s) out],[max bandwidth (kb/s) in]/[max bandwidth (kb/s) out]

The reserved bandwidth is a soft reservation since the reserved bandwitdh can be dynamically reallocated to other traffic flows should the specified traffic flow not need the bandwidth a the present time.

The max bandwidth value are enforced at all time.

[gmac:id]: The GMAC id on which the definition will apply. It is also possible to choose the "any" keyword.

[description]: Text identifier for identification purposes.

 

dsmark Examples:

qos 1 dsmark ef gmac:any VIP_traffic

qos 21 dsmark ef gmac:1 Very_High_Precedence

qos 22 dsmark af11 gmac:1 High_Precedence

qos 23 dsmark af12 gmac:1 Less_Precedence

qos 24 dsmark af13 gmac:1 Low_Precedence

qos 24 dsmark none gmac:1 No_Precedence

tc_htb Examples:

qos 1 tc_htb gmac:1 1/1,512/512 traffic_cap_at_512kbps

qos 2 tc_htb gmac:2 1/1,512/512 traffic_cap_at_512kbps

qos 3 tc_htb gmac:1 1024/1024,10000/10000 1024kbps_traffic_reservation

qos 4 tc_htb gmac:2 1024/1024,10000/10000 1024kbps_traffic_reservation