Bering-uClibc 4.x - User Guide - IPv4 Networking - Configure Traffic Management

From bering-uClibc
Jump to: navigation, search
IPv4 Networking - Configure Traffic Management
Prev Bering-uClibc 4.x - User Guide Next


The Linux kernel includes very powerful capabilities for network traffic control / shaping / prioritization / QoS, here referred to generically as "traffic management". These capabilities can be used to ensure that time sensitive traffic (such as streaming audio packets) are given priority over less urgent traffic (such as email).

This page is not intended to be a comprehensive tutorial on traffic management but instead provides a set of references to other relevant sources of information and clarifies which traffic management facilities are available on Bering-uClibc 4.x, either as standard or via the installation of optional Packages.

Fundamental Concepts

The rest of this page assumes an understanding of the following concepts so read the referenced documents if you need further information.


A scheduler determines how packets are moved from Input to Output within a queue.

Schedulers are implemented by kernel Modules named sch_*.ko (except for the default scheduler "pfifo_fast" which is built into the kernel and therefore not a Module).

Schedulers are also known as Queueing Disciplines or, in terms of arguments to the "tc" command, qdiscs.


A classifier provides as way of matching a packet based on specified criteria so that it can be placed in a particular queue.

Classifiers are implemented by kernel Modules named cls_*.ko.

Classifiers are also known as Filters or, in terms of arguments to the "tc" command, filters.

See Linux Advanced Routing & Traffic Control HOWTO and Traffic Control HOWTO for further information.



The tc.lrp Package is not installed as standard on Bering-uClibc 4.x but it is essential for any network traffic management, including that performed by Shorewall. This Package provides the /sbin/tc program.


While not absolutely essential, the shorwall.lrp Package (which is installed as standard) greatly simplifies the configuration of traffic management on Bering-uClibc 4.x and is highly recommended.


Kernel Modules are used to implement the various Scheduler (sch_*) and Classifier (cls_*) capabilities. Some of these are included as standard in the default moddb.lrp and specified in the standard /etc/modules file. As a result, no special action is necessary for the following:

  • sch_htb.ko
  • sch_hfsc.ko
  • sch_ingress.ko
  • sch_sfq.ko
  • sch_tbf.ko
  • cls_flow.ko
  • cls_fw.ko
  • cls_u32.ko

If any other, less common Schedulers or Classifiers are required the relevant Modules will need to be copied to the /lib/modules/ directory.

CHECK: Do these need to be listed in /etc/modules or are they loaded automatically?

One other Module worthy of special mention is ifb.ko. This implements the Intermediate Functional Block device, which is a virtual network interface of particular relevance for traffic management. The ifb.ko Module is loaded at boot time because it is listed in the /etc/modules file and as a result network devices "ifb0" and "ifb1" are present as standard on Bering-uClibc 4.x.

Configuring Shorewall for Traffic Management

Simple Traffic Shaping/Control


Complex Traffic Shaping/Control


To be continued... Davidmbrooke 20:30, 4 June 2011 (UTC)

Prev Up Next