old-www/HOWTO/Traffic-Control-HOWTO/index.html

741 lines
9.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Traffic Control HOWTO</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="NEXT"
TITLE="Introduction to Linux Traffic Control"
HREF="intro.html"></HEAD
><BODY
CLASS="article"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="ARTICLE"
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
><A
NAME="AEN2"
></A
>Traffic Control HOWTO</H1
><H2
CLASS="subtitle"
>Version 1.0.2</H2
><H3
CLASS="author"
><A
NAME="AEN5"
>Martin A. Brown</A
></H3
><DIV
CLASS="affiliation"
><SPAN
CLASS="orgname"
>&#13; <A
HREF="http://linux-ip.net/"
TARGET="_top"
>linux-ip.net</A
>
<BR></SPAN
><DIV
CLASS="address"
><P
CLASS="address"
><TT
CLASS="email"
>&#60;<A
HREF="mailto:martin@linux-ip.net"
>martin@linux-ip.net</A
>&#62;</TT
></P
></DIV
></DIV
><P
CLASS="pubdate"
>"Oct 2006"
<BR></P
><DIV
CLASS="revhistory"
><TABLE
WIDTH="100%"
BORDER="0"
><TR
><TH
ALIGN="LEFT"
VALIGN="TOP"
COLSPAN="3"
><B
>Revision History</B
></TH
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.0.2</TD
><TD
ALIGN="LEFT"
>2006-10-28</TD
><TD
ALIGN="LEFT"
>Revised by: MAB</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Add references to HFSC, alter author email addresses</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.0.1</TD
><TD
ALIGN="LEFT"
>2003-11-17</TD
><TD
ALIGN="LEFT"
>Revised by: MAB</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Added link to Leonardo Balliache's documentation</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.0</TD
><TD
ALIGN="LEFT"
>2003-09-24</TD
><TD
ALIGN="LEFT"
>Revised by: MAB</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>reviewed and approved by TLDP</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 0.7</TD
><TD
ALIGN="LEFT"
>2003-09-14</TD
><TD
ALIGN="LEFT"
>Revised by: MAB</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>incremental revisions, proofreading, ready for TLDP</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 0.6</TD
><TD
ALIGN="LEFT"
>2003-09-09</TD
><TD
ALIGN="LEFT"
>Revised by: MAB</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>minor editing, corrections from Stef Coene</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 0.5</TD
><TD
ALIGN="LEFT"
>2003-09-01</TD
><TD
ALIGN="LEFT"
>Revised by: MAB</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>HTB section mostly complete, more diagrams, LARTC pre-release</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 0.4</TD
><TD
ALIGN="LEFT"
>2003-08-30</TD
><TD
ALIGN="LEFT"
>Revised by: MAB</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>added diagram</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 0.3</TD
><TD
ALIGN="LEFT"
>2003-08-29</TD
><TD
ALIGN="LEFT"
>Revised by: MAB</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>substantial completion of classless, software, rules,
elements and components sections</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 0.2</TD
><TD
ALIGN="LEFT"
>2003-08-23</TD
><TD
ALIGN="LEFT"
>Revised by: MAB</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>major work on overview, elements, components and
software sections</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 0.1</TD
><TD
ALIGN="LEFT"
>2003-08-15</TD
><TD
ALIGN="LEFT"
>Revised by: MAB</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>initial revision (outline complete)</TD
></TR
></TABLE
></DIV
><DIV
><DIV
CLASS="abstract"
><A
NAME="AEN71"
></A
><P
></P
><P
>&#13; Traffic control encompasses the sets of mechanisms and operations by
which packets are queued for transmission/reception on a network
interface. The operations include enqueuing, policing, classifying,
scheduling, shaping and dropping. This HOWTO provides an introduction
and overview of the capabilities and implementation of traffic control
under Linux.
</P
><P
></P
></DIV
></DIV
><A
HREF="legalnotice.html"
>Legal Notice</A
><HR></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>1. <A
HREF="intro.html"
>Introduction to Linux Traffic Control</A
></DT
><DD
><DL
><DT
>1.1. <A
HREF="intro.html#i-assumptions"
>Target audience and assumptions about the reader</A
></DT
><DT
>1.2. <A
HREF="intro.html#i-conventions"
>Conventions</A
></DT
><DT
>1.3. <A
HREF="intro.html#i-recommendation"
>Recommended approach</A
></DT
><DT
>1.4. <A
HREF="intro.html#i-missing"
>Missing content, corrections and feedback</A
></DT
></DL
></DD
><DT
>2. <A
HREF="overview.html"
>Overview of Concepts</A
></DT
><DD
><DL
><DT
>2.1. <A
HREF="overview.html#o-what-is"
>What is it?</A
></DT
><DT
>2.2. <A
HREF="overview.html#o-why-use"
>Why use it?</A
></DT
><DT
>2.3. <A
HREF="overview.html#o-advantages"
>Advantages</A
></DT
><DT
>2.4. <A
HREF="overview.html#o-disadvantages"
>Disdvantages</A
></DT
><DT
>2.5. <A
HREF="overview.html#o-queues"
>Queues</A
></DT
><DT
>2.6. <A
HREF="overview.html#o-flows"
>Flows</A
></DT
><DT
>2.7. <A
HREF="overview.html#o-tokens"
>Tokens and buckets</A
></DT
><DT
>2.8. <A
HREF="overview.html#o-packets"
>Packets and frames</A
></DT
></DL
></DD
><DT
>3. <A
HREF="elements.html"
>Traditional Elements of Traffic Control</A
></DT
><DD
><DL
><DT
>3.1. <A
HREF="elements.html#e-shaping"
>Shaping</A
></DT
><DT
>3.2. <A
HREF="elements.html#e-scheduling"
>Scheduling</A
></DT
><DT
>3.3. <A
HREF="elements.html#e-classifying"
>Classifying</A
></DT
><DT
>3.4. <A
HREF="elements.html#e-policing"
>Policing</A
></DT
><DT
>3.5. <A
HREF="elements.html#e-dropping"
>Dropping</A
></DT
><DT
>3.6. <A
HREF="elements.html#e-marking"
>Marking</A
></DT
></DL
></DD
><DT
>4. <A
HREF="components.html"
>Components of Linux Traffic Control</A
></DT
><DD
><DL
><DT
>4.1. <A
HREF="components.html#c-qdisc"
><TT
CLASS="constant"
>qdisc</TT
></A
></DT
><DT
>4.2. <A
HREF="components.html#c-class"
><TT
CLASS="constant"
>class</TT
></A
></DT
><DT
>4.3. <A
HREF="components.html#c-filter"
><TT
CLASS="constant"
>filter</TT
></A
></DT
><DT
>4.4. <A
HREF="components.html#c-classifier"
>classifier</A
></DT
><DT
>4.5. <A
HREF="components.html#c-police"
>policer</A
></DT
><DT
>4.6. <A
HREF="components.html#c-drop"
><TT
CLASS="constant"
>drop</TT
></A
></DT
><DT
>4.7. <A
HREF="components.html#c-handle"
><TT
CLASS="constant"
>handle</TT
></A
></DT
></DL
></DD
><DT
>5. <A
HREF="software.html"
>Software and Tools</A
></DT
><DD
><DL
><DT
>5.1. <A
HREF="software.html#s-kernel"
>Kernel requirements</A
></DT
><DT
>5.2. <A
HREF="software.html#s-iproute2"
><B
CLASS="command"
>iproute2</B
> tools (<B
CLASS="command"
>tc</B
>)</A
></DT
><DT
>5.3. <A
HREF="software.html#s-tcng"
><B
CLASS="command"
>tcng</B
>, Traffic Control Next Generation</A
></DT
><DT
>5.4. <A
HREF="software.html#s-imq"
>IMQ, Intermediate Queuing device</A
></DT
></DL
></DD
><DT
>6. <A
HREF="classless-qdiscs.html"
>Classless Queuing Disciplines (<A
HREF="components.html#c-qdisc"
><TT
CLASS="constant"
>qdisc</TT
></A
>s)</A
></DT
><DD
><DL
><DT
>6.1. <A
HREF="classless-qdiscs.html#qs-fifo"
>FIFO, First-In First-Out (<TT
CLASS="constant"
>pfifo</TT
> and <TT
CLASS="constant"
>bfifo</TT
>)</A
></DT
><DT
>6.2. <A
HREF="classless-qdiscs.html#qs-pfifo_fast"
><TT
CLASS="constant"
>pfifo_fast</TT
>, the default Linux qdisc</A
></DT
><DT
>6.3. <A
HREF="classless-qdiscs.html#qs-sfq"
>SFQ, Stochastic Fair Queuing</A
></DT
><DT
>6.4. <A
HREF="classless-qdiscs.html#qs-esfq"
>ESFQ, Extended Stochastic Fair Queuing</A
></DT
><DT
>6.5. <A
HREF="classless-qdiscs.html#qs-gred"
>GRED, Generic Random Early Drop</A
></DT
><DT
>6.6. <A
HREF="classless-qdiscs.html#qs-tbf"
>TBF, Token Bucket Filter</A
></DT
></DL
></DD
><DT
>7. <A
HREF="classful-qdiscs.html"
>Classful Queuing Disciplines (<A
HREF="components.html#c-qdisc"
><TT
CLASS="constant"
>qdisc</TT
></A
>s)</A
></DT
><DD
><DL
><DT
>7.1. <A
HREF="classful-qdiscs.html#qc-htb"
>HTB, Hierarchical Token Bucket</A
></DT
><DT
>7.2. <A
HREF="classful-qdiscs.html#qc-hfsc"
>HFSC, Hierarchical Fair Service Curve</A
></DT
><DT
>7.3. <A
HREF="classful-qdiscs.html#qc-prio"
>PRIO, priority scheduler</A
></DT
><DT
>7.4. <A
HREF="classful-qdiscs.html#qc-cbq"
>CBQ, Class Based Queuing</A
></DT
></DL
></DD
><DT
>8. <A
HREF="rules.html"
>Rules, Guidelines and Approaches</A
></DT
><DD
><DL
><DT
>8.1. <A
HREF="rules.html#r-general"
>General Rules of Linux Traffic Control</A
></DT
><DT
>8.2. <A
HREF="rules.html#r-known-bandwidth"
>Handling a link with a known bandwidth</A
></DT
><DT
>8.3. <A
HREF="rules.html#r-unknown-bandwidth"
>Handling a link with a variable (or unknown) bandwidth</A
></DT
><DT
>8.4. <A
HREF="rules.html#r-sharing-flows"
>Sharing/splitting bandwidth based on flows</A
></DT
><DT
>8.5. <A
HREF="rules.html#r-sharing-ips"
>Sharing/splitting bandwidth based on IP</A
></DT
></DL
></DD
><DT
>9. <A
HREF="scripts.html"
>Scripts for use with QoS/Traffic Control</A
></DT
><DD
><DL
><DT
>9.1. <A
HREF="scripts.html#sc-wondershaper"
>wondershaper</A
></DT
><DT
>9.2. <A
HREF="scripts.html#sc-myshaper"
>ADSL Bandwidth HOWTO script (<TT
CLASS="filename"
>myshaper</TT
>)</A
></DT
><DT
>9.3. <A
HREF="scripts.html#sc-htb.init"
><TT
CLASS="filename"
>htb.init</TT
></A
></DT
><DT
>9.4. <A
HREF="scripts.html#sc-tcng.init"
><TT
CLASS="filename"
>tcng.init</TT
></A
></DT
><DT
>9.5. <A
HREF="scripts.html#sc-cbq.init"
><TT
CLASS="filename"
>cbq.init</TT
></A
></DT
></DL
></DD
><DT
>10. <A
HREF="diagram.html"
>Diagram</A
></DT
><DD
><DL
><DT
>10.1. <A
HREF="diagram.html#d-general"
>General diagram</A
></DT
></DL
></DD
><DT
>11. <A
HREF="links.html"
>Annotated Traffic Control Links</A
></DT
></DL
></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"
>&nbsp;</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="intro.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Introduction to Linux Traffic Control</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>