Skip to contentSkip to conversation

Simple example of bandwidth management

LARTC Roberto Arcomano 2 participants 2 messages Mar 22, 2002 – Mar 23, 2002

lore
Share & tools
lore
#0 lore raw

Hi all,
I tried to configure a simple script like this:

*************************************************
#!/bin/bash

SORG.0.0.33
DEST.0.0.34

ipchains -F
ipchains -A output -s $SORG -d $DEST -j ACCEPT -m 1

tc qdisc del dev eth0 root handle 1:0 cbq bandwidth 33600bps avpkt 1000 tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 33600bps avpkt 1000

tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 33600bps rate 10000bps allot 1514 maxburst 20 avpkt 1000 prio 3

tc filter add dev eth0 protocol ip parent 1:0 prio 1 handle 1 fw classid 1:1
********************************************************

My problem is that I cannot see any bandwidth reduction, I download from 10.0.0.33 to 10.0.0.34 with same speed as before (normal ethernet speed). Maybe there exists some file under /proc fs to modify?

Some other debug info:

*******************************************************
[root@adsl bin]# tc -d qdisc show dev eth0
qdisc cbq 1: rate 33600bps cell 8b (bounded,isolated) prio no-transmit/8 weight 33600bps allot 1514b
level 1 ewma 5 avpkt 1000b maxidle 928us
[root@adsl bin]#
[root@adsl bin]#
[root@adsl bin]#
[root@adsl bin]# tc -d class show dev eth0
class cbq 1: root rate 33600bps cell 8b (bounded,isolated) prio no-transmit/8 weight 33600bps allot 1514b
level 1 ewma 5 avpkt 1000b maxidle 928us
class cbq 1:1 parent 1: rate 10000bps cell 8b prio 3/3 weight 10000bps allot 1514b
level 0 ewma 5 avpkt 1000b maxidle 62298us
[root@adsl bin]#
[root@adsl bin]#
[root@adsl bin]#
[root@adsl bin]#
[root@adsl bin]#
[root@adsl bin]# tc filter show dev eth0
filter parent 1: protocol ip pref 1 fw
filter parent 1: protocol ip pref 1 fw handle 0x1 classid 1:1
***************************************************************

My system is:
RedHat 7.2 with kernel 2.4.7-10 on Intel Celeron 300MHz - 128 MB ram Please let me know what I'm wronging...
Thank you for your great support.
Regards
Roberto Arcomano
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 1 line

tc qdisc del dev eth0 root handle 1:0 cbq bandwidth 33600bps avpkt 1000

tc qdisc del dev eth0 root will also work

Quoted 11 lines

tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 33600bps avpkt 1000

tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 33600bps rate 10000bps allot 1514 maxburst 20 avpkt 1000 prio 3

tc filter add dev eth0 protocol ip parent 1:0 prio 1 handle 1 fw classid 1:1 ********************************************************

My problem is that I cannot see any bandwidth reduction, I download from 10.0.0.33 to 10.0.0.34 with same speed as before (normal ethernet speed). Maybe there exists some file under /proc fs to modify?

Bandwidth in each command = ethernet bandwidth. And make the class bounded if you want to bound it :)

Stef

Signature · 7 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/