Re: htbinit and redhat-9.0

Linux Advanced Routing and Traffic Control

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

 



Stef Coene wrote:

On Friday 23 January 2004 18:38, Mohammad Reza wrote:


dear All,
I'm a new student and my job is too shapping bandwith for our campus
faculty network. I want to implement htb with Redhat-9.0 distro.
does this distro kernel support htb and tc good ? or i should apply some
patch or upgrade kernel ?


Patch the kernel yourself so you are sure you have the latest htb.

Stef



Hi All..

i'm already start to build shapping with RH-9.0 and htb (htb.init-v0.8.4..actually), tc is support htb
my topology like this
ISP---eth1-----eth0---LAN
512kbps output from tc.
-------------------


#/sbin/htb.init-v0.8.4 compile
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1 htb default 0 r2q 2

tc class add dev eth0 parent 1: classid 1:10 htb rate 512kbps

tc class add dev eth0 parent 1:10 classid 1:20 htb rate 256kbps ceil 512kbps
tc qdisc add dev eth0 parent 1:20 handle 20 sfq perturb 10 quantum 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 172.16.0.228/32 classid 1:20


tc class add dev eth0 parent 1:10 classid 1:30 htb rate 128kbps ceil 512kbps
tc qdisc add dev eth0 parent 1:30 handle 30 sfq perturb 10 quantum 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 172.16.0.22/32 classid 1:30


tc class add dev eth0 parent 1:10 classid 1:40 htb rate 128kbps ceil 512kbps
tc qdisc add dev eth0 parent 1:40 handle 40 sfq perturb 10 quantum 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 172.16.0.20/32 classid 1:40
#/sbin/htb.init-v0.8.4 stats
### eth0: queueing disciplines


qdisc sfq 40: quantum 1500b perturb 10sec
Sent 95338 bytes 529 pkts (dropped 0, overlimits 0)

qdisc sfq 30: quantum 1500b perturb 10sec
Sent 86915 bytes 136 pkts (dropped 0, overlimits 0)

qdisc sfq 20: quantum 1500b perturb 10sec
Sent 5835201 bytes 78341 pkts (dropped 0, overlimits 0)

qdisc htb 1: r2q 2 default 0 direct_packets_stat 45
Sent 6019344 bytes 79051 pkts (dropped 0, overlimits 0)


### eth0: traffic classes


class htb 1:10 root rate 4Mbit ceil 4Mbit burst 6841b cburst 6841b
Sent 6019972 bytes 79025 pkts (dropped 0, overlimits 0)
rate 23bps
lended: 0 borrowed: 0 giants: 0
tokens: 10317 ctokens: 10317

class htb 1:20 parent 1:10 leaf 20: prio 0 rate 2Mbit ceil 4Mbit burst 4220b cburst 6841b
Sent 5837719 bytes 78360 pkts (dropped 0, overlimits 0)
lended: 78360 borrowed: 0 giants: 0
tokens: 12441 ctokens: 10317


class htb 1:30 parent 1:10 leaf 30: prio 0 rate 1Mbit ceil 4Mbit burst 2909b cburst 6841b
Sent 86915 bytes 136 pkts (dropped 0, overlimits 0)
lended: 136 borrowed: 0 giants: 0
tokens: 8888 ctokens: 8366


class htb 1:40 parent 1:10 leaf 40: prio 0 rate 1Mbit ceil 4Mbit burst 2909b cburst 6841b
Sent 95338 bytes 529 pkts (dropped 0, overlimits 0)
rate 15bps
lended: 529 borrowed: 0 giants: 0
tokens: 16688 ctokens: 10316



### eth0: filtering rules


filter parent 1: protocol ip pref 100 u32
filter parent 1: protocol ip pref 100 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 100 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:20
match ac1000e4/ffffffff at 16
filter parent 1: protocol ip pref 100 u32 fh 800::801 order 2049 key ht 800 bkt 0 flowid 1:30
match ac100016/ffffffff at 16
filter parent 1: protocol ip pref 100 u32 fh 800::802 order 2050 key ht 800 bkt 0 flowid 1:40
match ac100014/ffffffff at 16


When i tried to check with iperf from 172.16.0.228 (classid 10:20 with 256kbps rate).

$ ./iperf -c 172.16.0.232
------------------------------------------------------------
Client connecting to 172.16.0.232, TCP port 5001
TCP window size: 32.5 KByte (default)
------------------------------------------------------------
[  5] local 172.16.0.228 port 49385 connected with 172.16.0.232 port 5001
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0-10.0 sec   112 MBytes  93.9 Mbits/sec

I didnt see bandwith rate that i expected..is there something wrong with my config..
please help me....




_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux