Traffic shaping... don't understand the instructions!

Rodolfo J. Paiz rpaiz at simpaticus.com
Thu Jul 8 15:49:49 UTC 2004


At 08:03 PM 7/7/2004, Ow Mun Heng wrote:
>Hmm.. I seem to remember there being a discussion on this (or you asking
>anyway) and I take it there was no resolution.

My original post dealt with quite a bit of issues and I've progressed quite 
well with solving most of them. Now the only real issue left is traffic 
shaping.

>Then again, since you're using diff interfaces for each link, maybe you
>can do this instead. (since we're technically able to only do shaping on
>outgoing interfaces.

Yes, I can shape the "outgoing" traffic on each client interface 
(eth1-eth4) and in fact it will be the same result as the client having a 
max download speed. I can then shape the outgoing traffic on eth0 
(Internet) from each customer interface or network (each interface uses a 
different subnet) to make the traffic shaping bidirectional. I just don't 
get *how* yet. <grin>

>what you can do is create classes that routes the traffic to each
>interface according to the limits you've set out.
>
>tc qdisc add dev eth0 root handle 1: htb rate 1mbit (eg)
>tc qdisc add dev eth1 root handle 1:10 htb rate 128kbit
>tc qdics add dev eth2 root handle 1:20 htb rate 256kbit
>tc qdics add dev eth3 root handle 1:30 htb rate 128kbit
>tc qdics add dev eth4 root handle 1:40 htb rate 320kbit

I know I can run these commands from the command line; but how do I make 
them permanent? Also, should I use your commands here as a guide or can I 
actually try them? Where can I find more docs (other than the LARTC guide) 
to go deeper into this? And is there any specific reason why you use 10, 
20, 30, and 40 there? Are those built-in? Or did you just pick them?

>(note: I didn't put a Ceil there cause by default the rate=ceil if you
>don't specify and since you don't allow borrowing from other classes etc..etc)
>
>For the above scenerio, excess bandwidth will not be shared. (it's like
>a Hard Cap)

Great... I'll start testing this and I would appreciate any further 
comments you can make. Can I also allow "borrowing" later? I understand 
that to mean that people are allowed to use additional bandwidth *if and 
only if* no one else is using it; is that correct? How would you set up 
borrowing?

>Hope that helps.. Please report your findings so that I can incorporate
>that into the Howto.

I'll provide lots more feedback when I understand the stuff; for now I 
would only suggest lots more explanatory text in the HOWTO and more theory 
so people can understand the commands being issued or the parameters being set.

Thanks in advance for any help on this,


-- 
Rodolfo J. Paiz
rpaiz at simpaticus.com
http://www.simpaticus.com





More information about the users mailing list