Bering-uClibc 7.x - User Guide - IPv4 Networking - Configure Traffic Management
IPv4 Networking - Configure Traffic Management | ||
---|---|---|
Prev | Bering-uClibc 7.x - User Guide | Next |
Contents
Introduction
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 7.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.
Schedulers
A scheduler determines how packets are moved from Input to Output within a queue.
Schedulers are implemented by kernel Modules named sch_*.ko.gz
(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.
Classifiers
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.gz
.
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.
Packages
tc.lrp
The tc.lrp
Package is not installed as standard on Bering-uClibc 7.x but it is essential for any network traffic management, including that performed by Shorewall. This Package provides the /sbin/tc
program.
shorwall.lrp
While not absolutely essential, the shorwall.lrp
Package (which is installed as standard) greatly simplifies the configuration of traffic management on Bering-uClibc 7.x and is highly recommended.
Modules
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.gz
-
sch_hfsc.ko.gz
-
sch_ingress.ko.gz
-
sch_sfq.ko.gz
-
sch_tbf.ko.gz
-
cls_flow.ko.gz
-
cls_fw.ko.gz
-
cls_u32.ko.gz
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.gz
. 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 7.x.
Configuring Shorewall for Traffic Management
Simple Traffic Shaping/Control
See http://www.shorewall.net/simple_traffic_shaping.html
Complex Traffic Shaping/Control
See http://www.shorewall.net/traffic_shaping.htm
To be continued... Davidmbrooke 20:30, 4 June 2011 (UTC)
Prev | Up | Next |