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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2004-07-07 at 14:42, Rodolfo J. Paiz wrote:
> Hi!
> 
> Can anyone point me to a simple HOWTO on shapecfg or CBQ/HTB or any other 
> tool which does the same thing? I've been trying to do something very 
> simple on a system with 4 100Mbps Ethernet ports:
> 
>   * Limit eth1 to 128 Kbps.
>   * Limit eth2 to 256 Kbps.
>   * Limit eth3 to 128 Kbps.
>   * Limit eth4 to 320 Kbps.

Hmm.. I seem to remember there being a discussion on this (or you asking
anyway) and I take it there was no resolution.
> 
> This is total speed in any direction (say, 128 in and 128 out), no 
> prioritization whatsoever... just a simple speed limit. I've read the LARTC 
> in its entirety, read Ow Mun Heng's HOWTO, and read the README docs on my 
> system re shapecfg. Still no dice... must just be dense of my part. I see 
> lots of theory, but little 1-2-3 cookbook style instructions.

Usually when you try to do a incoming bandwidth limit, you're usually at
a loss because you can't (technically or theoretically) limit incoming
traffic without losing a lot of bandwidth. Refer to the discussion here
for the 'alternate' opinion.
http://my-opensource.org/lists/myoss/2004-07/msg00051.html
http://my-opensource.org/lists/myoss/2004-06/msg00167.html


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.

	ISP
	  |
	eth0
	  |
  ______________
  |       |        |       |
eth1  eth2  eth3  eth4

I assume your incoming interface (from ISP is eth0)

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

(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)

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

> 
> Any clues how to get this done?
> 
> 
> -- 
> Rodolfo J. Paiz
> rpaiz@xxxxxxxxxxxxxx
> http://www.simpaticus.com

-- 
Ow Mun Heng
Fedora GNU/Linux Core 2 (Tettnang) on D600 1.4Ghz CPU kernel
2.6.7-2.jul1-interactive 
Neuromancer 18:27:11 up 4:49, 3 users, load average: 0.18, 0.60, 0.77 



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux