All of lore.kernel.org
 help / color / mirror / Atom feed
From: "hotmail" <chemant@hotmail.com>
To: lartc@vger.kernel.org
Subject: [LARTC] probleme with cbq share
Date: Fri, 04 Apr 2003 12:56:36 +0000	[thread overview]
Message-ID: <marc-lartc-104946106700976@msgid-missing> (raw)

[-- Attachment #1: Type: text/plain, Size: 2131 bytes --]

Hi everybody sorry for my poor english.

My script doesn't work very well

I want to share bandwidth between 3 subnet (64k, 128k, 256k)
if i put the flag bounded on the class root that's doesn't work bandwidth is not limited
if i put the flag bounded on each class, all the subnet is limited by each rule:

subnet 64 can't use more than a total of 64k as it was 1 single user
...

so i don't know how to share 64k by user on subnet 64, 128k by user on subnet 128, 256k by user on subnet 254.

What's wrong with my script?

thx a lot.
Michael


tc qdisc add dev eth0 root handle 1: cbq bandwidth 100Mbit avpkt 1000 cell 8 mpu 64

tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 100Mbit \
rate 100Mbit prio 1 allot 1514 weight 10Mbit cell 8 maxburst 20 avpkt 1000

tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 100Mbit \
rate 4Mbit prio 1 allot 1514 weight 400kbit cell 8 maxburst 20 avpkt 1000 bounded

tc class add dev eth0 parent 1:2 classid 1:11 cbq bandwidth 100Mbit \
rate 64kbit prio 1  allot 1514 weight 6kbit cell 8 maxburst 20      \
avpkt 1000

tc class add dev eth0 parent 1:2 classid 1:12 cbq bandwidth 100Mbit \
rate 128kbit prio 1  allot 1514 weight 13kbit cell 8 maxburst 20      \
avpkt 1000

tc class add dev eth0 parent 1:2 classid 1:13 cbq bandwidth 100Mbit  \
rate 256kbit prio 1  allot 1514 weight 26kbit cell 8 maxburst 20      \
avpkt 1000

tc filter add dev eth0 parent 1:0 prio 1 protocol ip u32
tc filter add dev eth0 parent 1:0 prio 1 handle 2: u32 divisor 256


j=0;
while [ $j -le 255 ]; do
hex=`echo "obase=16; $j" |bc`
echo $hex;
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 ht 2:$hex: \
match ip src 172.16.64.$j flowid 1:11
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 ht 2:$hex: \
match ip src 172.16.128.$j flowid 1:12
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 ht 2:$hex: \
match ip src 172.16.254.$j flowid 1:13
j=$((j+1))
done

tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 ht 800:: \
match ip src 172.16.0.0/16 \
hashkey mask 0x000000ff at 12 \
link 2:

 


[-- Attachment #2: Type: text/html, Size: 3937 bytes --]

                 reply	other threads:[~2003-04-04 12:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-104946106700976@msgid-missing \
    --to=chemant@hotmail.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.