From: "Lumir Unzeitig" <lumir.unzeitig@gatc.com>
To: lartc@vger.kernel.org
Subject: RE: [LARTC] htb2 with link sharing - the bandwidth dividing question
Date: Tue, 23 Jul 2002 09:26:18 +0000 [thread overview]
Message-ID: <marc-lartc-102741645724383@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102732759808222@msgid-missing>
On Monday 22 July 2002 10:44, Lumir Unzeitig wrote:
>> Hi
>> I have flat structure of traffic control - 8 children can borrow from a
>> parent.
>> Problem: The rest bandwidth is not divided to children how I expect.
>>I supposed "the rest of bandwidth is divided to the PCs in ratio of their
>>RATE values". But it isn't.
>But how is the bandwidth divided in your test ? Can be handy to know to
>find
>a solution/answer ...
>And can you post the used htb script?
>Stef
===========
1. Real measurement of bw (also in Calculation in previous mail)
In my test the downstream bw was divided:
class real bw
----------------------------------------
class 1:10-RATE=4kbit....... 12 kbit/s
class 1:40-RATE=4kbit....... 12 kbit/s
class 1:80-RATE\x15kbit...... 29.6 kbit/s
----------------------------------------
Used bw .................... 53.6 kbit/s
2. HTB script
----------------------
#!/bin/bash
# chkconfig: 2345 14 89
# description: sets up HTB traffic control and filters
#VLAN
##########
BANDV #kbit/s
BURST=2
VBAND1=4
VBAND2=9
VBAND4=4
VBAND5=6
VBAND6=9
VBAND7=4
VBAND8\x15
VBAND9=6
#########
case "$1" in
### START ###
start)
#Delete a root qdisc
#********************
tc qdisc del dev eth0 2>/dev/null
#Root handle
#************
tc qdisc add dev eth0 root handle 1: htb default 100
tc qdisc add dev eth1 root handle 1: htb default 100
#Class for 56kbps channel
#************************
tc class add dev eth0 parent 1: classid 1:1 htb \
rate ${BAND}kbit ceil ${BAND}kbit burst 2k
#VLAN #1 - subclass 1:10
#------------------------------
#Downstream
#Subclass definition
tc class add dev eth0 parent 1:1 classid 1:10 htb \
rate ${VBAND1}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 \
match ip dst 192.168.1.0/24 flowid 1:10
#qdisc - SFQ
tc qdisc add dev eth0 parent 1:10 handle 100: sfq
#Upstream
#Subclass definition
tc class add dev eth1 parent 1:1 classid 1:10 htb \
rate ${VBAND1}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth1 parent 1: protocol ip prio 1 handle 1 \
fw classid 1:10
#qdisc - SFQ
tc qdisc add dev eth1 parent 1:10 handle 100: sfq
#VLAN #2 - subclass 1:20
#------------------------------
#Downstream
#Subclass definition
tc class add dev eth0 parent 1:1 classid 1:20 htb \
rate ${VBAND2}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 \
match ip dst 192.168.2.0/24 flowid 1:20
#qdisc - SFQ
tc qdisc add dev eth0 parent 1:20 handle 200 sfq
#Upstream
#Subclass definition
tc class add dev eth1 parent 1:1 classid 1:20 htb \
rate ${VBAND1}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth1 parent 1: protocol ip prio 1 handle 2 \
fw classid 1:20
#qdisc - SFQ
tc qdisc add dev eth1 parent 1:20 handle 200: sfq
#VLAN #4 - subclass 1:40
#-------------------------
#Downstream
#Subclass definition
tc class add dev eth0 parent 1:1 classid 1:40 htb \
rate ${VBAND4}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 \
match ip dst 192.168.4.0/24 flowid 1:40
#qdisc - SFQ
tc qdisc add dev eth0 parent 1:40 handle 400: sfq
#Upstream
#Subclass definition
tc class add dev eth1 parent 1:1 classid 1:40 htb \
rate ${VBAND1}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth1 parent 1: protocol ip prio 1 handle 4 \
fw classid 1:40
#qdisc - SFQ
tc qdisc add dev eth1 parent 1:40 handle 400: sfq
#VLAN #5 - subclass 1:50
#------------------------------
#Downstream
#Subclass definition
tc class add dev eth0 parent 1:1 classid 1:50 htb \
rate ${VBAND5}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 \
match ip dst 192.168.5.0/24 flowid 1:50
#qdisc - SFQ
tc qdisc add dev eth0 parent 1:50 handle 500: sfq
#Upstrean
#Subclass definition
tc class add dev eth1 parent 1:1 classid 1:50 htb \
rate ${VBAND1}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth1 parent 1: protocol ip prio 1 handle 5 \
fw classid 1:50
#qdisc - SFQ
tc qdisc add dev eth1 parent 1:50 handle 500: sfq
#VLAN #6 - subclass 1:60
#------------------------------
#Downstream
#Subclass definition
tc class add dev eth0 parent 1:1 classid 1:60 htb \
rate ${VBAND6}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 \
match ip dst 192.168.6.0/24 flowid 1:60
#qdisc - SFQ
tc qdisc add dev eth0 parent 1:60 handle 600: sfq
#Upstream
#Subclass definition
tc class add dev eth1 parent 1:1 classid 1:60 htb \
rate ${VBAND1}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth1 parent 1: protocol ip prio 1 handle 6 \
fw classid 1:60
#qdisc - SFQ
tc qdisc add dev eth1 parent 1:60 handle 600: sfq
#VLAN #7 - subclass 1:70
#------------------------------
#Downstream
#Subclass definition
tc class add dev eth0 parent 1:1 classid 1:70 htb \
rate ${VBAND7}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 \
match ip dst 192.168.7.0/24 flowid 1:70
#qdisc - SFQ
tc qdisc add dev eth0 parent 1:70 handle 700: sfq
#Upstream
#Subclass definition
tc class add dev eth1 parent 1:1 classid 1:70 htb \
rate ${VBAND1}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth1 parent 1: protocol ip prio 1 handle 7 \
fw classid 1:70
#qdisc - SFQ
tc qdisc add dev eth1 parent 1:70 handle 700: sfq
#VLAN #8 - subclass 1:80
#------------------------------
#Downstream
#Subclass definition
tc class add dev eth0 parent 1:1 classid 1:80 htb \
rate ${VBAND8}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 \
match ip dst 192.168.8.0/24 flowid 1:80
#qdisc - SFQ
tc qdisc add dev eth0 parent 1:80 handle 800: sfq
#Upstream
#Subclass definition
tc class add dev eth1 parent 1:1 classid 1:80 htb \
rate ${VBAND1}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth1 parent 1: protocol ip prio 1 handle 8 \
fw classid 1:80
#qdisc - SFQ
tc qdisc add dev eth1 parent 1:80 handle 800: sfq
#VLAN #9 - subclass 1:90
#------------------------------
#Downstream
#Subclass definition
tc class add dev eth0 parent 1:1 classid 1:90 htb \
rate ${VBAND9}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 \
match ip dst 192.168.9.0/24 flowid 1:90
#qdisc - SFQ
tc qdisc add dev eth0 parent 1:90 handle 900: sfq
#Upstream
#Subclass definition
tc class add dev eth1 parent 1:1 classid 1:90 htb \
rate ${VBAND1}kbit ceil ${BAND}kbit burst ${BURST}k
#Filter
tc filter add dev eth1 parent 1: protocol ip prio 1 handle 9 \
fw classid 1:90
#qdisc - SFQ
tc qdisc add dev eth1 parent 1:90 handle 900: sfq
;;
stop)
for dev in `ip link| sed -n '/^[0-9]/ { s/^[0-9]\+:
\([a-z0-9]\+\):.*/\1/; p; }'`; do
tc qdisc del dev $dev root &>/dev/null
done
;;
restart)
$0 stop
$0 start
;;
stats)
echo ---[ eth0: queueing
disciplines ]-------------------------
echo; tc -s qdisc show dev eth0; echo
echo ---[ eth0: configured
classes ]---------------------------
echo; tc -s class show dev eth0; echo
echo
=====================================
echo ---[ eth1: queueing
disciplines ]-------------------------
echo; tc -s qdisc show dev eth1; echo
echo ---[ eth1: configured
classes ]---------------------------
echo; tc -s class show dev eth1; echo
;;
*)
echo "HTB start|stop|restart|stats"
;;
esac
-----Original Message-----
From: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl]On
Behalf Of Stef Coene
Sent: Monday, July 22, 2002 4:39 PM
To: lumir.unzeitig@gatc.com; lartc@mailman.ds9a.nl
Subject: Re: [LARTC] htb2 with link sharing - the bandwidth dividing
question
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2002-07-23 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-22 8:44 [LARTC] htb2 with link sharing - the bandwidth dividing question Lumir Unzeitig
2002-07-22 14:38 ` Stef Coene
2002-07-23 9:26 ` Lumir Unzeitig [this message]
2002-07-23 18:49 ` Stef Coene
2002-09-23 3:29 ` Adi Nugroho
2002-09-29 20:33 ` Stef Coene
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-lartc-102741645724383@msgid-missing \
--to=lumir.unzeitig@gatc.com \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.