366 lines
6.4 KiB
HTML
366 lines
6.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Requirements</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="Traffic Control using tcng and HTB HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Introduction"
|
|
HREF="intro.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Configuration examples"
|
|
HREF="examples.html"></HEAD
|
|
><BODY
|
|
CLASS="section"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Traffic Control using tcng and HTB HOWTO: </TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="intro.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="examples.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="section"
|
|
><H1
|
|
CLASS="section"
|
|
><A
|
|
NAME="requirements"
|
|
></A
|
|
>2. Requirements</H1
|
|
><P
|
|
> There are a few requirements in order for the
|
|
<A
|
|
HREF="requirements.html#requirements-kernel"
|
|
>kernel to support HTB and
|
|
DSMARK</A
|
|
>,
|
|
<A
|
|
HREF="requirements.html#requirements-tc"
|
|
>tc to support HTB and DSMARK</A
|
|
>, and
|
|
<A
|
|
HREF="requirements.html#requirements-tcng"
|
|
>tcng itself</A
|
|
>.
|
|
</P
|
|
><P
|
|
> 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
|
|
<A
|
|
HREF="examples.html"
|
|
>examples</A
|
|
> (class selection path, in
|
|
particular, but maybe others) may not operate without dsmark support.
|
|
</P
|
|
><DIV
|
|
CLASS="section"
|
|
><H2
|
|
CLASS="section"
|
|
><A
|
|
NAME="requirements-kernel"
|
|
></A
|
|
>2.1. kernel requirements</H2
|
|
><P
|
|
> 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
|
|
<A
|
|
HREF="http://diffserv.sourceforge.net/#24"
|
|
TARGET="_top"
|
|
>the DiffServ project
|
|
kernel configuration notes</A
|
|
>.
|
|
</P
|
|
><P
|
|
> For kernels older than 2.4.20, the following
|
|
<A
|
|
HREF="http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz"
|
|
TARGET="_top"
|
|
>tarball
|
|
containing a patch</A
|
|
> should be applied to your 2.4.17 or newer
|
|
kernel tree.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="section"
|
|
><H2
|
|
CLASS="section"
|
|
><A
|
|
NAME="requirements-tc"
|
|
></A
|
|
>2.2. <B
|
|
CLASS="command"
|
|
>tc</B
|
|
> requirements</H2
|
|
><P
|
|
> The <B
|
|
CLASS="command"
|
|
>tc</B
|
|
> command is a part of the
|
|
<B
|
|
CLASS="command"
|
|
>iproute2</B
|
|
> utility suite. For general documentation on
|
|
<B
|
|
CLASS="command"
|
|
>iproute2</B
|
|
>, see
|
|
<A
|
|
HREF="http://linux-ip.net/"
|
|
TARGET="_top"
|
|
>http://linux-ip.net/</A
|
|
> and
|
|
<A
|
|
HREF="http://linux-ip.net/gl/ip-cref/"
|
|
TARGET="_top"
|
|
>the
|
|
<B
|
|
CLASS="command"
|
|
>iproute2</B
|
|
> manual</A
|
|
>. The software itself is
|
|
available directly from
|
|
<A
|
|
HREF="ftp://ftp.inr.ac.ru/ip-routing/"
|
|
TARGET="_top"
|
|
>Alexey Kuznetsov'z FTP
|
|
archive</A
|
|
> but commonly also via packages supplied with your
|
|
linux distribution. If your distribution can make use of RPMS, you can
|
|
download this
|
|
<A
|
|
HREF="http://linux-ip.net/traffic-control/iproute-2.4.7-7.src.rpm"
|
|
TARGET="_top"
|
|
>SRPM</A
|
|
>
|
|
and compile it on your own system.
|
|
</P
|
|
><P
|
|
> If you need to compile <B
|
|
CLASS="command"
|
|
>iproute2</B
|
|
> yourself, use the
|
|
<A
|
|
HREF="http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz"
|
|
TARGET="_top"
|
|
>patch
|
|
to <B
|
|
CLASS="command"
|
|
>tc</B
|
|
> from this tarball</A
|
|
> at
|
|
<A
|
|
HREF="http://luxik.cdi.cz/~devik/qos/htb/"
|
|
TARGET="_top"
|
|
>Martin Devera's HTB
|
|
site</A
|
|
> in order to provide support for HTB in
|
|
<B
|
|
CLASS="command"
|
|
>tc</B
|
|
>.
|
|
</P
|
|
><P
|
|
> Your <B
|
|
CLASS="command"
|
|
>tc</B
|
|
> will also need to support dsmark, the
|
|
diffserv marking mechanism. Fortunately, this is a simple change to
|
|
the <TT
|
|
CLASS="filename"
|
|
>Config</TT
|
|
> file from the
|
|
<B
|
|
CLASS="command"
|
|
>iproute2</B
|
|
> source package. Simply change
|
|
<TT
|
|
CLASS="computeroutput"
|
|
>TC_CONFIG_DIFFSERV=n</TT
|
|
> to
|
|
<TT
|
|
CLASS="computeroutput"
|
|
>TC_CONFIG_DIFFSERV=y</TT
|
|
> and recompile.
|
|
</P
|
|
><P
|
|
> The
|
|
<A
|
|
HREF="http://linux-ip.net/traffic-control/iproute-2.4.7-7.src.rpm"
|
|
TARGET="_top"
|
|
>SRPM</A
|
|
>
|
|
creates a <B
|
|
CLASS="command"
|
|
>tc</B
|
|
> binary with support for
|
|
dsmark and for HTB, both of which are required for this example.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="section"
|
|
><H2
|
|
CLASS="section"
|
|
><A
|
|
NAME="requirements-tcng"
|
|
></A
|
|
>2.3. <B
|
|
CLASS="command"
|
|
>tcng</B
|
|
> requirements</H2
|
|
><P
|
|
> Support for <B
|
|
CLASS="command"
|
|
>tcng</B
|
|
> is the easiest part of the process.
|
|
Simply untar the tcng source and run <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>./configure
|
|
--no-tcsim</B
|
|
></TT
|
|
> before compiling.
|
|
</P
|
|
><P
|
|
> If you are on an RPM-based system, you can use the SPEC file in
|
|
<TT
|
|
CLASS="filename"
|
|
>tcng/build/tcng.spec</TT
|
|
> to build for your
|
|
distribution, or you can download and compile this
|
|
<A
|
|
HREF="http://linux-ip.net/traffic-control/tcng-9d-1.src.rpm"
|
|
TARGET="_top"
|
|
>SRPM</A
|
|
>.
|
|
The SRPM produces two packages, tcc and tcc-devel. You need only tcc to
|
|
create configurations.
|
|
</P
|
|
><P
|
|
> In order to run the <B
|
|
CLASS="command"
|
|
>tcc</B
|
|
> parser, you will also need to
|
|
have the <B
|
|
CLASS="command"
|
|
>cpp</B
|
|
> package installed.
|
|
<B
|
|
CLASS="command"
|
|
>tcc</B
|
|
> uses cpp.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="intro.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="examples.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Introduction</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Configuration examples</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |