From: Scott Baker Date: Tue, 27 Jan 2004 23:24:21 +0000 Subject: [LARTC] tncg and bandwidth limiting Message-Id: <5.2.0.9.0.20040127150331.00ac7bd0@mail.web-ster.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org I'm trying to do some very simple rate-shaping on an interface. I want to limit my 100baseT interface to 7 megs both ingress and egress of the interface. I've been hacking my way through the documentation and some examples and I've come up with the following configuration for tcng that seems to do what I want. I'm curious if some of the other experts out there wouldn't have a "better" way to do what I'm doing. I'd like to do HTB ingress as well, but it complains that the the ingress qdisc doesn't allow inside classes or something like that. I think this will work for me, I just want to make sure this is the best way to do things. ---------------------------- dev INTERFACE { egress { class ( <$all> ) if 1; htb () { class ( rate 100Mbps, ceil 100Mbps ) ; $all = class ( rate 7Mbps, ceil 7Mbps ) ; } $o = bucket(rate 7Mbps, burst 200kB, mpu 200B); class (2) if (conform $o && count $o) || drop; } } /* tcng syntax English equivalent tc syntax ----------- -------------------- --------- bps bits per second bit Bps bytes per second bps (!) kbps kilobits per second kbit kBps kilobytes per second kbps Mbps megabits per second ??? */ Scott Baker - Network Engineer - RHCE bakers @ web-ster . com - 503.266.8253 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/