On Monday 13 October 2003 13:38, Muhammad Reza wrote: > hi All. > this my script for shapping with htb, to shapping my network subnet > > ISP--eth--eth1---lan with 4 subnet > > cat /etc/shorewall/tcstart > #!/bin/bash > /sbin/tc qdisc add dev eth1 root handle 1: htb default 20 > /sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 2mbit ceil 2mbit > /sbin/tc class add dev eth1 parent 1:1 classid 1:10 htb rate 512kbps > ceil 2mbit > /sbin/tc class add dev eth1 parent 1:1 classid 1:11 htb rate 512kbps > ceil 2mbit > /sbin/tc class add dev eth1 parent 1:1 classid 1:12 htb rate 512kbps > ceil 2mbit > /sbin/tc class add dev eth1 parent 1:1 classid 1:13 htb rate 512kbps > ceil 2mbit > /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip > dst 172.16.0.0/24 flowid 1:10 > /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip > dst 172.16.32.0/24 flowid 1:11 > /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip > dst 172.16.64.0/24 flowid 1:12 > /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip > dst 172.16.128.0/24 flowid 1:13 > > > /sbin/tc qdisc sh > qdisc htb 1: dev eth1 r2q 10 default 20 direct_packets_stat 0 > > when i test with iperf from 172.16.0.227 /usr/local/bin/iperf -c > 172.16.0.226 > ------------------------------------------------------------ > Client connecting to 172.16.0.226, TCP port 5001 > TCP window size: 32.5 KByte (default) > ------------------------------------------------------------ > [ 5] local 172.16.0.228 port 49192 connected with 172.16.0.226 port 5001 > [ ID] Interval Transfer Bandwidth > [ 5] 0.0-10.0 sec 111 MBytes 92.8 Mbits/sec > > i dont see bandwith limited that i excpected... > did my step correct..or i did something stupid..(again) You are mixing bytes and bites. 512kbps is 512kiobyte/s and 2mbit is 2megabit/s. So 512kbps = 512 * 8 = 4mbit/s. It's still not 92.8 Mbit/sec. Can you also post the output of tc -s -d class show dev eth0 For more info about htb and the tests I did, see www.docum.org. Stef -- stef.coene@xxxxxxxxx "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/