From: "Ricardo" <linux@netcomp.com.br>
To: lartc@vger.kernel.org
Subject: [LARTC] CBQ Problem
Date: Wed, 28 Jul 2004 18:57:26 +0000 [thread overview]
Message-ID: <003a01c474d4$b9895350$0200000a@ricardo> (raw)
In-Reply-To: <marc-lartc-104753105416470@msgid-missing>
[-- Attachment #1: Type: text/plain, Size: 2066 bytes --]
Hi.
I want to shape traffic from some IPs in my lan, but I'm w/ trouble. I have a linux box connected to the Internet. In the other side of this box is my LAN. I want to create the following scenario:
My root qdisc is attached to a 100Mbit/s NIC
I want to create a class attached to this qdisc that will limit the traffic at 384Kbit/s.
I want to create two leaf classes that limits the traffic at 256Kbit/s.
I want to attach two sfq qdiscs so two classes are treated equally.
I want to put one LAN IP for each leaf class.
When one IP is downloading a file from internet it will never be more than 256Kbit.
When both IPs is downloading files at the same time, they will never be more than 384Kbit.
(I think that is something like the webserver + smtp example that is in the howto)
My config:
tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000 cell 8
tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate 384Kbit weight 38Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded
tc class add dev eth1 parent 1:1 classid 1:10 cbq bandwidth 100Mbit rate 256Kbit weight 25Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
tc class add dev eth1 parent 1:1 classid 1:20 cbq bandwidth 100Mbit rate 256Kbit weight 25Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth1 parent 1:10 handle 100: sfq
tc qdisc add dev eth1 parent 1:20 handle 200: sfq
tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst 10.0.0.2/32 flowid 1:10
tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst 10.0.0.3/32 flowid 1:20
When I start a download from one machine, the speed is limited at 256Kbit/s (this is OK)
When I start a download from both machines, the speed for each machine is limited to 256Kbit/s. They are getting 512Kbit/s together.
I want limit this speed at 384Kbit/s, so traffic from each machine will never be more than 192Kbps when both are in use.
Why it is not working for me ??? What is the mistake ?
Thank You.
Ricardo
[-- Attachment #2: Type: text/html, Size: 2875 bytes --]
prev parent reply other threads:[~2004-07-28 18:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-13 4:49 [LARTC] CBQ problem Liu Zhiyong
2003-03-13 10:19 ` Liu Zhiyong
2003-03-13 15:59 ` Stef Coene
2004-07-28 18:57 ` Ricardo [this message]
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='003a01c474d4$b9895350$0200000a@ricardo' \
--to=linux@netcomp.com.br \
--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.