From: Trevor Warren <trevorwarren@softhome.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] can't get cbq to traffic shape
Date: Thu, 12 Jun 2003 07:16:18 +0000 [thread overview]
Message-ID: <marc-lartc-105544487324235@msgid-missing> (raw)
In-Reply-To: <marc-lartc-105534505817749@msgid-missing>
Hello Stef,
Thanks a million for the information. Am sending you the modified tc
script that i worked on. This in essence have 2 filters for the incoming
and outgoing packets to 192.168.*.*.
#!/bin/bash
#####################################
#Deleting and setting up
#Root qdisc's
#####################################
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 10Mbit avpkt 1000
cell 8
#######################################
#Setting up top 10 qdiscs
#for initial packet classification
#######################################
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate
200Kbit allot 1514 cell 8 maxburst 20 avpkt 1000 weight 20Kbit bounded
tc filter add dev eth0 parent 1:0 protocol ip u32 match ip src
192.168.10.0/24 classid 1:1
tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dst
192.168.10.0/24 classid 1:1
tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 10Mbit rate
200Kbit allot 1514 cell 8 maxburst 20 avpkt 1000 weight 20Kbit bounded
tc filter add dev eth0 parent 1:0 protocol ip u32 match ip src
192.168.11.0/24 classid 1:2
tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dst
192.168.11.0/24 classid 1:2
tc class add dev eth0 parent 1:0 classid 1:3 cbq bandwidth 10Mbit rate
200Kbit allot 1514 cell 8 maxburst 20 avpkt 1000 weight 20Kbit bounded
tc filter add dev eth0 parent 1:0 protocol ip u32 match ip src
192.168.12.0/24 classid 1:3
tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dst
192.168.12.0/24 classid 1:3
:
:
:
:
####################################
#Actual Filters
####################################
On Wed, 2003-06-11 at 22:01, Stef Coene wrote:
> On Wednesday 11 June 2003 05:20, Trevor Warren wrote:
> > Hello Folks,
> >
> > For a long time i have tried to get Traffic Shaping work for my 500
> > Customer setup, but never succeded. I know i have made mistakes which i
> > ain't able to point out.
> >
> > I have made a heirarchical setup where in the incoming-outgoing
> > bandwidth is split into 10 different subnets and i have filters to
> > divert traffic into these 10 different pipes. Then in each of these
> > pipes i then have all the clients under those subnets.
> >
> > Below at the end i have attached the CBQ errors thrown when i
> > initialise the TC pipes.
> >
> > Any help and pointers on the same will be appreciated.
> The bandwidth _MUST_ be your NIC bandwidth. So it's 100Mbit for a 100mbit
> NIC. You combined 100Mbit and 10Mbit.
> You also have to provide a weight paramter. Take weight = rate / 10. I think
> this will remove the quantum errors.
>
> Some general quesions :
> What's you link bandwidth you want to shape? It's best if you add 1 bounded
> class to the root qdisc wih rate = link bandwidth and attach all other
> classes to that class (and not to the root qdisc).
> Is this script used on a firewall? And is eth0 connected to the internet?
> Then you have a filter problem. You filter on the src address, but all
> connections are natted so the real src address is not known.
>
> Stef
--
( >- GNU/LINUX, It's all about CHOICE -< )
/~\ __ trevor@clovertechnologies.com __ /~\
| \) / Pre Sales Consultant - Red Hat \ (/ |
|_|_ \ 9820349221(M) | 22881326(O) / _|_|
\___________________________________/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2003-06-12 7:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-11 3:32 [LARTC] can't get cbq to traffic shape Trevor Warren
2003-06-11 16:31 ` Stef Coene
2003-06-12 7:16 ` Trevor Warren [this message]
2003-06-12 7:34 ` Trevor Warren
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-105544487324235@msgid-missing \
--to=trevorwarren@softhome.net \
--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.