* Re: [LARTC] tc + zebra/quagga
2005-03-23 17:11 [LARTC] tc + zebra/quagga Lorin
@ 2005-03-27 11:50 ` Andy Furniss
2005-03-28 8:07 ` Lorin
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Andy Furniss @ 2005-03-27 11:50 UTC (permalink / raw)
To: lartc
Lorin wrote:
> I have some problem with traffic shaping on debian testing. I actually posted
> a full config on the list a while ago but didn't get any answers.
> The problem is that traffic doesn't get into the user classes (~150) when I
> associate a class with a qdisc. I tried sfq, fifo but none works. If I dont't
> associate a qdisc with a class classification occurs well.
> I'm pretty sure the config is ok. Just was wondering if someone has already
> steped into this one.
> This box runs zebra and bgpd as it is a bgp border router.
> I found this post on google which is quite similar to my case:
> http://mailman.isi.edu/pipermail/6bone/2002-May/005420.html.
>
> Thank you.
This is strange - can you recreate it with a small test script that
doesn't use htbinit way of naming/numbering.
Andy.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [LARTC] tc + zebra/quagga
2005-03-23 17:11 [LARTC] tc + zebra/quagga Lorin
2005-03-27 11:50 ` Andy Furniss
@ 2005-03-28 8:07 ` Lorin
2005-03-28 22:05 ` Andy Furniss
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Lorin @ 2005-03-28 8:07 UTC (permalink / raw)
To: lartc
On Sunday 27 March 2005 14:50, you wrote:
> Lorin wrote:
> > I have some problem with traffic shaping on debian testing. I actually
> > posted a full config on the list a while ago but didn't get any answers.
> > The problem is that traffic doesn't get into the user classes (~150) when
> > I associate a class with a qdisc. I tried sfq, fifo but none works. If I
> > dont't associate a qdisc with a class classification occurs well.
> > I'm pretty sure the config is ok. Just was wondering if someone has
> > already steped into this one.
> > This box runs zebra and bgpd as it is a bgp border router.
> > I found this post on google which is quite similar to my case:
> > http://mailman.isi.edu/pipermail/6bone/2002-May/005420.html.
> >
> > Thank you.
>
> This is strange - can you recreate it with a small test script that
> doesn't use htbinit way of naming/numbering.
>
> Andy.
It would be quite some work to setup a configuration, there are a lot of
hosts that need to be limited.
Here is what I have:
#---class root - RATE/CEIL\x100Mbit
/sbin/tc class add dev eth0 parent 1: classid 1:0010 htb rate 100Mbit
/sbin/tc qdisc add dev eth0 root handle 1 htb default 3000
#---class bgp - RATE/CEIL\x128Kbit
/sbin/tc class add dev eth0 parent 1:0010 classid 1:0050 htb rate 128Kbit ceil
128Kbit prio 0
/sbin/tc qdisc add dev eth0 parent 1:0050 handle 0050 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
<bgp peer>/32 classid 1:0050
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
<bgp peer>/32 classid 1:0050
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
sport 179 0xffff classid 1:0050
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
dport 179 0xffff classid 1:0050
#---class management - RATE/CEILdKbit (ssh,icmp)
/sbin/tc class add dev eth0 parent 1:0010 classid 1:0500 htb rate 64Kbit ceil
64Kbit prio 1
/sbin/tc qdisc add dev eth0 parent 1:0500 handle 0500 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
dport 22 0xffff classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
sport 22 0xffff classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
83.103.150.50 classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
83.103.150.50 classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
sport 0 0xffff classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
dport 0 0xffff classid 1:0500
#---class premium - RATE/CEIL=sum of RATE child classes (the broadband way
[tm])
/sbin/tc class add dev eth0 parent 1:0010 classid 1:1000 htb rate 352Kbit ceil
352Kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:1000 handle 1000 sfq perturb 10
/sbin/tc class add dev eth0 parent 1:1000 classid 1:1001 htb rate 32Kbit ceil
64Kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:1001 handle 1001 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
<client1 ip>/32 classid 1:1001
/sbin/tc class add dev eth0 parent 1:1000 classid 1:1002 htb rate 32Kbit ceil
64Kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:1002 handle 1002 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
<client2 ip>/32 classid 1:1002
/sbin/tc class add dev eth0 parent 1:1000 classid 1:1003 htb rate 32Kbit ceil
64Kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:1003 handle 1003 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
<client3 ip> classid 1:1003
....
#---class best-effort RATE/CEIL=sum of RATE child classes
individual limits just like in premium class
#---class default RATE/CEIL=2Kbit
/sbin/tc class add dev eth0 parent 1:3000 classid 1:3000 htb rate 2Kbit prio 7
/sbin/tc qdisc add dev eth0 parent 1:3000 handle 3000 sfq perturb 10
If I set the leaf qdisc to 'none' traffice gets classified well; if I use a
qdisc in a child class all traffic goes to default.
After few tests I managed to isolate the problem (kinndof) - if I use just
one class, best-effort for example, and put all filters/qdisc in this one
everything works fine. But I really need to separate big clients (premium)
from small ones (best-effort) and to shape management/bgp traffic separately
from those 2. atm the only separations is made after prio value: bgp 0,
management 1, premium 2, best-effort 3 and default 7.
Thanks for the help!
p.s.
I'm working on a romanian translation for LARTC. I have about 1/4 of it till
now. If there are any romanians on this list willing to help it would a very
nice thing to do for the community. Also translating this great howto it's a
study itself so you can get also some solid knowledge besides the Glory:)
--
+ Lorin
+ I tought I taw a putty cat...I did! I did taw a putty cat!
+ http://si-bemol.ro
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [LARTC] tc + zebra/quagga
2005-03-23 17:11 [LARTC] tc + zebra/quagga Lorin
2005-03-27 11:50 ` Andy Furniss
2005-03-28 8:07 ` Lorin
@ 2005-03-28 22:05 ` Andy Furniss
2005-03-29 15:29 ` Lorin
2005-04-04 11:17 ` Lorin
4 siblings, 0 replies; 6+ messages in thread
From: Andy Furniss @ 2005-03-28 22:05 UTC (permalink / raw)
To: lartc
Lorin wrote:
>
> It would be quite some work to setup a configuration, there are a lot of
> hosts that need to be limited.
I really meant can you recreate it with a simple test case without lots
of rules.
> Here is what I have:
>
> #---class root - RATE/CEIL\x100Mbit
> /sbin/tc class add dev eth0 parent 1: classid 1:0010 htb rate 100Mbit
> /sbin/tc qdisc add dev eth0 root handle 1 htb default 3000
This is the wrong way round - if you didn't get an error prehaps there
was already a queue on from a previous test - that could confuse things.
>
> #---class bgp - RATE/CEIL\x128Kbit
> /sbin/tc class add dev eth0 parent 1:0010 classid 1:0050 htb rate 128Kbit ceil
> 128Kbit prio 0
> /sbin/tc qdisc add dev eth0 parent 1:0050 handle 0050 sfq perturb 10
I am not sure if it makes a difference but normally the handle would be
0050: maybe it is clashing with the parent classid without the :
> If I set the leaf qdisc to 'none' traffice gets classified well; if I use a
> qdisc in a child class all traffic goes to default.
> After few tests I managed to isolate the problem (kinndof) - if I use just
> one class, best-effort for example, and put all filters/qdisc in this one
> everything works fine. But I really need to separate big clients (premium)
> from small ones (best-effort) and to shape management/bgp traffic separately
> from those 2. atm the only separations is made after prio value: bgp 0,
> management 1, premium 2, best-effort 3 and default 7.
It should be doable - I may have missed something else. I assume you are
testing with
tc -s qdisc ls dev eth0
tc -s class ls dev eth0
tc -s filter ls dev eth0
not nice with lots of rules - but worth it to check the counters.
>
> Thanks for the help!
>
> p.s.
> I'm working on a romanian translation for LARTC. I have about 1/4 of it till
> now. If there are any romanians on this list willing to help it would a very
> nice thing to do for the community. Also translating this great howto it's a
> study itself so you can get also some solid knowledge besides the Glory:)
I think the list had died again - so make sure you cc me if you reply.
Andy.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LARTC] tc + zebra/quagga
2005-03-23 17:11 [LARTC] tc + zebra/quagga Lorin
` (2 preceding siblings ...)
2005-03-28 22:05 ` Andy Furniss
@ 2005-03-29 15:29 ` Lorin
2005-04-04 11:17 ` Lorin
4 siblings, 0 replies; 6+ messages in thread
From: Lorin @ 2005-03-29 15:29 UTC (permalink / raw)
To: lartc
On Sunday 27 March 2005 14:50, you wrote:
> Lorin wrote:
> > I have some problem with traffic shaping on debian testing. I actually
> > posted a full config on the list a while ago but didn't get any answers.
> > The problem is that traffic doesn't get into the user classes (~150) when
> > I associate a class with a qdisc. I tried sfq, fifo but none works. If I
> > dont't associate a qdisc with a class classification occurs well.
> > I'm pretty sure the config is ok. Just was wondering if someone has
> > already steped into this one.
> > This box runs zebra and bgpd as it is a bgp border router.
> > I found this post on google which is quite similar to my case:
> > http://mailman.isi.edu/pipermail/6bone/2002-May/005420.html.
> >
> > Thank you.
>
> This is strange - can you recreate it with a small test script that
> doesn't use htbinit way of naming/numbering.
>
> Andy.
It would be quite some work to setup a configuration, there are a lot of
hosts that need to be limited.
Here is what I have:
#---class root - RATE/CEIL\x100Mbit
/sbin/tc class add dev eth0 parent 1: classid 1:0010 htb rate 100Mbit
/sbin/tc qdisc add dev eth0 root handle 1 htb default 3000
#---class bgp - RATE/CEIL\x128Kbit
/sbin/tc class add dev eth0 parent 1:0010 classid 1:0050 htb rate 128Kbit ceil
128Kbit prio 0
/sbin/tc qdisc add dev eth0 parent 1:0050 handle 0050 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
<bgp peer>/32 classid 1:0050
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
<bgp peer>/32 classid 1:0050
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
sport 179 0xffff classid 1:0050
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
dport 179 0xffff classid 1:0050
#---class management - RATE/CEILdKbit (ssh,icmp)
/sbin/tc class add dev eth0 parent 1:0010 classid 1:0500 htb rate 64Kbit ceil
64Kbit prio 1
/sbin/tc qdisc add dev eth0 parent 1:0500 handle 0500 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
dport 22 0xffff classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
sport 22 0xffff classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
83.103.150.50 classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
83.103.150.50 classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
sport 0 0xffff classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
dport 0 0xffff classid 1:0500
#---class premium - RATE/CEIL=sum of RATE child classes (the broadband way
[tm])
/sbin/tc class add dev eth0 parent 1:0010 classid 1:1000 htb rate 352Kbit ceil
352Kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:1000 handle 1000 sfq perturb 10
/sbin/tc class add dev eth0 parent 1:1000 classid 1:1001 htb rate 32Kbit ceil
64Kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:1001 handle 1001 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
<client1 ip>/32 classid 1:1001
/sbin/tc class add dev eth0 parent 1:1000 classid 1:1002 htb rate 32Kbit ceil
64Kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:1002 handle 1002 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
<client2 ip>/32 classid 1:1002
/sbin/tc class add dev eth0 parent 1:1000 classid 1:1003 htb rate 32Kbit ceil
64Kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:1003 handle 1003 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
<client3 ip> classid 1:1003
....
#---class best-effort RATE/CEIL=sum of RATE child classes
individual limits just like in premium class
#---class default RATE/CEIL=2Kbit
/sbin/tc class add dev eth0 parent 1:3000 classid 1:3000 htb rate 2Kbit prio 7
/sbin/tc qdisc add dev eth0 parent 1:3000 handle 3000 sfq perturb 10
If I set the leaf qdisc to 'none' traffice gets classified well; if I use a
qdisc in a child class all traffic goes to default.
After few tests I managed to isolate the problem (kinndof) - if I use just
one class, best-effort for example, and put all filters/qdisc in this one
everything works fine. But I really need to separate big clients (premium)
from small ones (best-effort) and to shape management/bgp traffic separately
from those 2. atm the only separations is made after prio value: bgp 0,
management 1, premium 2, best-effort 3 and default 7.
Thanks for the help!
p.s.
I'm working on a romanian translation for LARTC. I have about 1/4 of it till
now. If there are any romanians on this list willing to help it would a very
nice thing to do for the community. Also translating this great howto it's a
study itself so you can get also some solid knowledge besides the Glory:)
--
+ Lorin
+ I tought I taw a putty cat...I did! I did taw a putty cat!
+ http://si-bemol.ro
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [LARTC] tc + zebra/quagga
2005-03-23 17:11 [LARTC] tc + zebra/quagga Lorin
` (3 preceding siblings ...)
2005-03-29 15:29 ` Lorin
@ 2005-04-04 11:17 ` Lorin
4 siblings, 0 replies; 6+ messages in thread
From: Lorin @ 2005-04-04 11:17 UTC (permalink / raw)
To: lartc
On Sunday 27 March 2005 14:50, you wrote:
> Lorin wrote:
> > I have some problem with traffic shaping on debian testing. I actually
> > posted a full config on the list a while ago but didn't get any answers.
> > The problem is that traffic doesn't get into the user classes (~150) when
> > I associate a class with a qdisc. I tried sfq, fifo but none works. If I
> > dont't associate a qdisc with a class classification occurs well.
> > I'm pretty sure the config is ok. Just was wondering if someone has
> > already steped into this one.
> > This box runs zebra and bgpd as it is a bgp border router.
> > I found this post on google which is quite similar to my case:
> > http://mailman.isi.edu/pipermail/6bone/2002-May/005420.html.
> >
> > Thank you.
>
> This is strange - can you recreate it with a small test script that
> doesn't use htbinit way of naming/numbering.
>
> Andy.
It would be quite some work to setup a configuration, there are a lot of
hosts that need to be limited.
Here is what I have:
#---class root - RATE/CEIL\x100Mbit
/sbin/tc class add dev eth0 parent 1: classid 1:0010 htb rate 100Mbit
/sbin/tc qdisc add dev eth0 root handle 1 htb default 3000
#---class bgp - RATE/CEIL\x128Kbit
/sbin/tc class add dev eth0 parent 1:0010 classid 1:0050 htb rate 128Kbit ceil
128Kbit prio 0
/sbin/tc qdisc add dev eth0 parent 1:0050 handle 0050 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
<bgp peer>/32 classid 1:0050
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
<bgp peer>/32 classid 1:0050
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
sport 179 0xffff classid 1:0050
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
dport 179 0xffff classid 1:0050
#---class management - RATE/CEILdKbit (ssh,icmp)
/sbin/tc class add dev eth0 parent 1:0010 classid 1:0500 htb rate 64Kbit ceil
64Kbit prio 1
/sbin/tc qdisc add dev eth0 parent 1:0500 handle 0500 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
dport 22 0xffff classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
sport 22 0xffff classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
83.103.150.50 classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
83.103.150.50 classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
sport 0 0xffff classid 1:0500
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
dport 0 0xffff classid 1:0500
#---class premium - RATE/CEIL=sum of RATE child classes (the broadband way
[tm])
/sbin/tc class add dev eth0 parent 1:0010 classid 1:1000 htb rate 352Kbit ceil
352Kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:1000 handle 1000 sfq perturb 10
/sbin/tc class add dev eth0 parent 1:1000 classid 1:1001 htb rate 32Kbit ceil
64Kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:1001 handle 1001 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
<client1 ip>/32 classid 1:1001
/sbin/tc class add dev eth0 parent 1:1000 classid 1:1002 htb rate 32Kbit ceil
64Kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:1002 handle 1002 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
<client2 ip>/32 classid 1:1002
/sbin/tc class add dev eth0 parent 1:1000 classid 1:1003 htb rate 32Kbit ceil
64Kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:1003 handle 1003 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
<client3 ip> classid 1:1003
....
#---class best-effort RATE/CEIL=sum of RATE child classes
individual limits just like in premium class
#---class default RATE/CEIL=2Kbit
/sbin/tc class add dev eth0 parent 1:3000 classid 1:3000 htb rate 2Kbit prio 7
/sbin/tc qdisc add dev eth0 parent 1:3000 handle 3000 sfq perturb 10
If I set the leaf qdisc to 'none' traffice gets classified well; if I use a
qdisc in a child class all traffic goes to default.
After few tests I managed to isolate the problem (kinndof) - if I use just
one class, best-effort for example, and put all filters/qdisc in this one
everything works fine. But I really need to separate big clients (premium)
from small ones (best-effort) and to shape management/bgp traffic separately
from those 2. atm the only separations is made after prio value: bgp 0,
management 1, premium 2, best-effort 3 and default 7.
Thanks for the help!
p.s.
I'm working on a romanian translation for LARTC. I have about 1/4 of it till
now. If there are any romanians on this list willing to help it would a very
nice thing to do for the community. Also translating this great howto it's a
study itself so you can get also some solid knowledge besides the Glory:)
--
+ Lorin
+ I tought I taw a putty cat...I did! I did taw a putty cat!
+ http://si-bemol.ro
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 6+ messages in thread