Linux Traffic Shaping

Michael Torrie torriem at
Mon Mar 18 09:06:43 MDT 2013

On 03/18/2013 12:05 AM, Dan Egli wrote:
> For example, let's suppose I have a 10Mbps link to the 'net (that's what
> I'm expecting anyway). I want mail (imap(s) and (s)smtp) to take priority
> #1 and use up to 8Mbps. Then I want web traffic (http(s)) to be priority
> #2, using up to 9Mbps of the ten. Then ssh, vnc, rdesktop and X11 traffic
> to take priority #3, and use up to 3Mbps (they don't need much), and the
> last priority would be anything else (i.e. file sharing, bittorrent,
> etc...) using up to 5Mbps.
> Is this even possible using the Linux traffic shaping tools? And if so,
> how do I set something like that up? I've never seen any books on it, and
> the last couple of web references I read left me scratching my head saying
> "Huh?". They seem to assume that you already have a basic understanding of
> some kind of network mechanic that I either don't have or am not
> understanding a link to.

Sure it's possible, and you can probably do it with a stock dd-wrt or
tomato router firmware, right from the GUI.

However, except for throttling Bittorrent, I really don't see the point
of throttling your other traffic items, unless you plan to live with
unruly roommates.  Traffic shaping doesn't make sense unless your link
is saturated 100% of the time, which I cannot see your home network ever
doing.  Short of a college apartment, I don't know of anyone who uses or
needs shaping on their home internet connections.  I think you'll find
your ISP already does shaping to protect their own upstream pipe.

Also, throttling ssh would seem to be a mistake to me.  Do you really
want to artificially restrict the download speeds for rsync or scp?

Bittorrent is best shaped by simply telling your bittorrent peer program
(say, rtorrent) to throttle itself.

More information about the PLUG mailing list