Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Diffserv bandwidth control

1 view
Skip to first unread message

Niroshan

unread,
Sep 24, 2001, 1:14:34 PM9/24/01
to
Hi,
I have implemented a diffserv router using Red Hat 7.1 kernel
recompiled.

However when I set it up and test it using netperf, it seems that my
interfaces run at a higher throughput, than my bounded cap. ie. If i
cap at 2Mbits/Sec, I will get around 2.4Mbits/sec consitently, IF i
drop this down to 1Mbit/Sec, then the actual is around 1.3Mbit/sec.

I have attached the script below... Any one with any ideas... your
help is appreciated.


========= Script ==============

#!/bin/sh

tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 10Mbit avpkt 1000

tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 10Mbit \
rate 2Mbit prio 1 avpkt 1000 allot 1514 weight 100kbit maxburst 10 \
bounded

tc class add dev eth1 parent 1:0 classid 1:2 cbq bandwidth 10Mbit \
rate 4Mbit prio 8 avpkt 1000 allot 1514 weight 100kbit maxburst 10 \
bounded

tc qdisc add dev eth1 parent 1:1 pfifo limit 2
tc qdisc add dev eth1 parent 1:2 pfifo limit 25

tc filter add dev eth1 parent 1:0 protocol ip pref 1 u32 match \
ip src 192.168.1.10 flowid 1:1

tc filter add dev eth1 parent 1:0 protocol ip pref 1 u32 match \
ip src 192.168.1.130 flowid 1:2


==== I run Netserver on 192.168.2.5 ====
netserver -p 5000

===== I run Netperf on 192.168.1.10 ====
netperf -H 192.168.2.5 -p 5000

What should I expect to see?

Thanks again for your help in advance
Niroshan

Manfred Bartz

unread,
Sep 24, 2001, 6:30:25 PM9/24/01
to
niro...@ains.net.au (Niroshan) writes:

> Hi,
> I have implemented a diffserv router using Red Hat 7.1 kernel
> recompiled.
>
> However when I set it up and test it using netperf, it seems that my
> interfaces run at a higher throughput, than my bounded cap. ie. If i
> cap at 2Mbits/Sec, I will get around 2.4Mbits/sec consitently, IF i
> drop this down to 1Mbit/Sec, then the actual is around 1.3Mbit/sec.

> tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 10Mbit \
> rate 2Mbit prio 1 avpkt 1000 allot 1514 weight 100kbit maxburst 10 \
> bounded

CBQ is not 100% accurate, but try setting the average packet size
to 1400. That would probably be more realistic for your traffic.

tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 10Mbit \

rate 2Mbit prio 1 avpkt 1400 allot 1514 weight 100kbit maxburst 10 \
bounded

--
Manfred
----------------------------------------------------------------
NetfilterLogAnalyzer, NetCalc, whois at: <http://logi.cc/linux/>

0 new messages