Traffic Control - Next Generation
Hosted by
SourceForge Logo
tcng tcsim Download Mailing list Documentation Links

The goal of this project is to revise the network traffic control infrastructure of Linux to overcome shortcomings of the existing architecture, and to make it more extensible.

In particular, we try to address the following issues:

  • Create a more user-friendly configuration language
  • Provide interfaces for straightforward interaction with network management
  • Allow seamless integration of hardware accelerators

The code consists of two major components, the traffic control compiler tcng and the traffic control simulator tcsim. Both are described in some more detail below. Since tcng and tcsim share many support files (e.g. the whole regression test system), they are both contained in a single package, called tcng.

This site contains the source code and information directly related to tcng. Pointers to sites with information on traffic control in general can be found in the links section below.
This project started at the beginning of 2001 at EPFL ICA, continued until mid-2002 at Bivio Networks (tm), and has now become one of my spare time activities.

 tcng
tcng translates configuration scripts into a multitude of output formats used to configure traffic control subsystems. The main goals are:
  • Create a compact and clean configuration language
  • Allow for the addition of input languages more suitable for use by programs, e.g. XML
  • Implement traffic control not only using the existing kernel code, but possibly also using custom-made modules, or even hardware accelerators

  tcng takes its input from a script or program, invokes the appropriate input parser to translate the configuration data into a common internal data structure, and then invokes one or more output generators to issue commands to the corresponding output processor(s).

Output processors translate the output from tcng into actions understood by lower-level components, e.g. tc sends configuration messages over the netlink interface, while gcc builds a customized loadable kernel module, a tc module, plus the tc commands necessary to activate the kernel module.

Currently, the "tcng" input parser, and the output generators "tc", "C", and "external" (a generic interface designed for passing information to programs which set up hardware accelerators) are implemented. "C" and "external" are designed mainly around the "if" language construct and don't (yet) support other filters.
tcng currently only supports static configurations. Dynamic configuration will be studied in the future.

 tcsim
tcsim is used to simulate the behaviour of Linux Traffic Control at a very high level of detail. This is used mainly for the following purposes:
  • Validation of configurations generated by tcng
  • Development of configurations
  • Testing of traffic control components

tcsim directly supports configuration using the old configuration language, and it supports the new language by automatically invoking tcng, and integrating its output.

  tcsim combines the original traffic control code from the Linux kernel with the user-space code of the configuration utility tc, and adds the framework for communication among the two, plus an event-driven simulation engine.

The resulting program runs entirely in user space, but executes almost exactly the same code as a "real" system (it even mimics loadable kernel modules), giving much more accurate results than a more general simulator (e.g. ns-2) would.

tcsim processes a script defining the system configuration and the data to send, and generates a message trace, which can then be processed to obtain statistics or graphs. Interaction among individual traffic control components can be included in trace output.

The use of tcsim is strongly encouraged when developing new traffic control configurations, be it in the old or in the new language.

 Download
The current version is tcng-10b (507 kB), released 3-OCT-2004.

Changes since the previous version:

Older versions can be found here.

Very old versions can be found in the the old distribution directory.

 Mailing list
Most discussion related to Linux traffic control happens nowadays on the mailing list of the Linux Advanced Routing & Traffic Control project.

Until June 2002, discussion of tcng took place mainly on the mailing list of the diffserv project. That mailing list is archived at http://www.geocrawler.com/redir-sf.php3?list=diffserv-general

 Documentation
Overview:

Usage information:
The manual is contained in the tcng package, directory doc/

Implementation details:

 Links
tcng:

Linux Traffic Control:

Last update: 3-OCT-2004   Werner Almesberger