| This is a very simple implementation of the Expedited Forwarding (EF)
class using an htb queuing discipline. To begin with a dsmark queuing
discipline is configured. dsmark will be in charge of copying the DS field from
entering packets to the skb->tc_index
field. The dsmark's main filter reads this value and applies over it the bitwise operation
DS & 0xfc >> 2. This operation
returns back the class value 0x2e for packets marked as EF,
this means, having the DS field set to 0xb8 when entering the
discipline. This class id value is then copied back onto the
skb->tc_index field by the
dsmark queuing discipline. |
| |
| A htb queuing discipline is configured having as parent the
dsmark queuing discipline. The htb 2:0 queuing discipline is
configured with two classes (besides the 2:1 main class): the first class, class 2:10, is selected to place on it the
packets belonging to the DS EF class. Because these packets, having
the skb->tc_index field set to
0x2e are matched against the first classifier element (prio 1 handle
0x2e), the class id 2:10 is returned and the packets are finally
placed on it. |
| |
| In the htb class 2:10, a pfifo queuing discipline is configured.
The maximum
throughput for EF traffic is controlled through the htb class
2:10, up to a maximum of 1.5 Mbps, avoiding this way starvation
over low priority traffic (BE) going through class 2:20 (see
below). We need to limit as much as possible the length of this pfifo
queue to avoid long queue of EF packets that could increase latency
in case of congestion; the pfifo queue is configured with five
packets length. |
| |
|
Best effort (BE) packets are matched with the second classifier element (prio
2 handle 0), being then assigned to htb class 2:20. On this class
a red queuing discipline is configured. Red is the best
solution for BE traffic not subjugated to any kind of additional
preemptive queuing control. It avoids phase effects, allows moderate
bursting, doesn't impose any bias to well behaved flows and is as fair as is
possible when dropping packets is a necessity. Have a look to
Red queuing discipline for more information about
this. |
| |
| Some similar as the previous ef-prio scheme,
we are just implemeting a simple way for EF
packets to kick them out as soon as is possible from the router to
avoiding them to loss their time traveling through it. This scheme is
normally used for real-time traffic where any delay in the
transmission time affect the behavior quality. However the
ef-prio scheme works a little better than this,
being simpler and faster. |
| |
| Well, fellows!! We are ready with all the examples of the original
Linux Diffserv distribution; our next step in this study will be trying
to configure some testbed to check the theoretical part. Then, let's go on. |