Traffic Control using tcng and HTB HOWTO:
Prev |  | Next

# 2. Requirements

There are a few requirements in order for the kernel to support HTB and DSMARK, tc to support HTB and DSMARK, and tcng itself.

Specifically, support for HTB in the kernel and tc is absolutely required in order for this tutorial to be remotely useful (refer to the title if htere is any doubt in your mind). DSMARK support is, strictly speaking, optional, although some examples (class selection path, in particular, but maybe others) may not operate without dsmark support.

## 2.1. kernel requirements

The kernel requirements are very easy to meet. Kernel 2.4.20 and newer include support for HTB and dsmark, so simply be certain that these options are turned on in the QoS/Fair Queuing portion of your kernel configuration. For a brief summary of the options to select in kernel configuration, visit the DiffServ project kernel configuration notes.

For kernels older than 2.4.20, the following tarball containing a patch should be applied to your 2.4.17 or newer kernel tree.

## 2.2. tc requirements

The tc command is a part of the iproute2 utility suite. For general documentation on iproute2, see http://linux-ip.net/ and the iproute2 manual. The software itself is available directly from Alexey Kuznetsov'z FTP archive but commonly also via packages supplied with your linux distribution. If your distribution can make use of RPMS, you can download this SRPM and compile it on your own system.

If you need to compile iproute2 yourself, use the patch to tc from this tarball at Martin Devera's HTB site in order to provide support for HTB in tc.

Your tc will also need to support dsmark, the diffserv marking mechanism. Fortunately, this is a simple change to the `Config` file from the iproute2 source package. Simply change `TC_CONFIG_DIFFSERV=n` to `TC_CONFIG_DIFFSERV=y` and recompile.

The SRPM creates a tc binary with support for dsmark and for HTB, both of which are required for this example.

## 2.3. tcng requirements

Support for tcng is the easiest part of the process. Simply untar the tcng source and run `./configure --no-tcsim` before compiling.

If you are on an RPM-based system, you can use the SPEC file in `tcng/build/tcng.spec` to build for your distribution, or you can download and compile this SRPM. The SRPM produces two packages, tcc and tcc-devel. You need only tcc to create configurations.

In order to run the tcc parser, you will also need to have the cpp package installed. tcc uses cpp.

Prev | Home | Next
Introduction |  | Configuration examples