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.
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.
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.
Your tc will also need to support dsmark, the
diffserv marking mechanism. Fortunately, this is a simple change to
Config file from the
iproute2 source package. Simply change
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.
Support for tcng is the easiest part of the process.
Simply untar the tcng source and run
--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
The SRPM produces two packages, tcc and tcc-devel. You need only tcc to
In order to run the tcc parser, you will also need to have the cpp package installed. tcc uses cpp.