Linux Trafficshaping

From AdminWiki

(Difference between revisions)
Jump to: navigation, search
(initial commit)
(Queueing)
Line 18: Line 18:
= Queueing =
= Queueing =
 +
 +
The packet queuer does the actual ''work'' when shaping traffic. It's responsible for deciding which packets get delayed, dropped or sent instantly.
 +
 +
There are two kinds of queuers, [http://lartc.org/howto/lartc.qdisc.classful.html classful] and [http://lartc.org/howto/lartc.qdisc.classless.html classless]. With classful queueing algorithms you can construct trees which share common limits and a classless shaper OTOH only has one ''speedknob''. Describing this in detail here wouldn't make sense, since it's already documented on the lartc page.
 +
 +
The setups you're going to use nowadays is a combination of [http://lartc.org/howto/lartc.qdisc.classful.html#AEN1072 HTB] for prioritizing different kinds of traffic and [http://lartc.org/howto/lartc.qdisc.classless.html#LARTC.SFQ SFQ] to ensure every flow gets it's fair share of the available bandwidth.
 +
 +
The [http://luxik.cdi.cz/~devik/qos/htb/ HTB homepage] has a nice [http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm user guide] with much more detailed examples than on lartc.

Revision as of 02:09, 25 May 2006

Introduction

Trafficshaping under Linux is as easy and intuitive as changing the drive belt in your car. Fortunately there's the lartc homepage which should be your first stop when you want to learn about advanced networking under linux.

When we talk about traffic shaping we're talking about two things:

  • Packet classification
  • Packet queueing

Classification

When you want to shape traffic you usually want to give some packets and/or flows precedence over others. To classify packets you've got a few options under linux:

Probably the fastest option when you want to classify traffic. The syntax is extremely user-friendly and intuitive when you happen to know the TCP header specs by heart.
Much more comfortable than U32, probably noticeable slower when you're pushing large amounts of pps.

Queueing

The packet queuer does the actual work when shaping traffic. It's responsible for deciding which packets get delayed, dropped or sent instantly.

There are two kinds of queuers, classful and classless. With classful queueing algorithms you can construct trees which share common limits and a classless shaper OTOH only has one speedknob. Describing this in detail here wouldn't make sense, since it's already documented on the lartc page.

The setups you're going to use nowadays is a combination of HTB for prioritizing different kinds of traffic and SFQ to ensure every flow gets it's fair share of the available bandwidth.

The HTB homepage has a nice user guide with much more detailed examples than on lartc.

Personal tools