All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] [tcng] correct config?
@ 2002-07-22 18:05 raptor
  2002-07-22 18:40 ` Stef Coene
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: raptor @ 2002-07-22 18:05 UTC (permalink / raw)
  To: lartc




Below is my tests and I have some questions regarding them :
first it seems that classification doesnt happen at all ?! and it is clear from
the u32 filters 'cause they point to classes 1:1 and 1:2 which doesnt exist at all ?
Also I can't figure out which filter got used u32 or tc_index but 'cause tcism_plot generates
only enqueed packed and no dequee-packets. They have same priority but u32 is attached
at root so they should be used, right ?

Ok I will describe the scenario I want to achieve if u can give me simple exmples :

On the root I want to create one 256KB/s channel then in this channel I want
to create two channels which will be separated on two one 60% the other 40% 
(both can borrow bandwith from each other but the 60%-channel has to be
more privileged, higher priority)
Then in those two channels I want have more small channels say 30 in each of them...
(cbq and htb if posiible :") 'm I nasty !)

Next question : Say I have to handle other traffic not only Internet, then I should 
make sibling channels to my Internet one to handle this, right ?

One final question : If u have say 1Mbps Internet connection to the outside world
what channel u create below-the-root (which is 100Mbps -ethernet)  for handling
your internet traffic -- exact 1Mbps OR something like 1.2Mbps so that u can be sure that if
link is used to 100% u dont end up using something like 98% of the link OR
some other way ?

xxx.tcng=========================

dev eth0 {
 egress {
	class(<$t1>) if ip_src = 192.168.0.1;
	class(<$t2>) if ip_src = 192.168.0.2;	
	//drop if tcp_sport != PORT_HTTP;
	//drop if 1;
	
	cbq(bandwidth 256*8 kbps, maxburst 200p, avpkt 1024B, allot 1514B) {
    	    $t1 = class(5,rate 19200 bps) {		
		tbf(rate 19200 bps, burst 3000B, limit 280B, mtu 1510B) {};
	    }	 
	    $t2 = class(6, rate 33600 bps) {};		    		

	}
	
 }
}

----------------------- I start tcism this way : tcism xxx.tcng | tcsim_filter src | tcism_plot

#include "packet.def"
#include "ports.tc"

dev eth0 10Mbps {
 #include "xxx.tcng"
}

every 0.1s send TCP_PCK($ip_src = 192.168.0.1 $tcp_sport = PORT_HTTP);
time 2s
end

-----------------------


the result of tcc compilation----------------------------------------
# ================ Device eth0 ================

tc qdisc add dev eth0 handle 1:0 root dsmark indices 4 default_index 0
tc qdisc add dev eth0 handle 2:0 parent 1:0 cbq bandwidth 256000bps avpkt 1024
tc class add dev eth0 parent 2:0 classid 2:5 cbq bandwidth 256000bps rate 2400bps allot 1514 avpkt 1024 maxburst 200
tc qdisc add dev eth0 handle 3:0 parent 2:5 tbf burst 3000 limit 280 mtu 1510 rate 2400bps
tc class add dev eth0 parent 2:0 classid 2:6 cbq bandwidth 256000bps rate 4200bps allot 1514 avpkt 1024 maxburst 200
tc filter add dev eth0 parent 2:0 protocol ip prio 1 tcindex mask 0x3 shift 0
tc filter add dev eth0 parent 2:0 protocol ip prio 1 handle 2 tcindex classid 2:6
tc filter add dev eth0 parent 2:0 protocol ip prio 1 handle 1 tcindex classid 2:5
tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1:0:0 u32 divisor 1
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match u32 0xc0a80001 0xffffffff at 12 classid 1:1
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match u32 0xc0a80002 0xffffffff at 12 classid 1:2


Thanx alot
raptor@unacs.bg


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LARTC] [tcng] correct config?
  2002-07-22 18:05 [LARTC] [tcng] correct config? raptor
@ 2002-07-22 18:40 ` Stef Coene
  2002-07-22 19:29 ` raptor
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Stef Coene @ 2002-07-22 18:40 UTC (permalink / raw)
  To: lartc

On Monday 22 July 2002 20:05, raptor@unacs.bg wrote:
> Below is my tests and I have some questions regarding them :
> first it seems that classification doesnt happen at all ?! and it is clear
> from the u32 filters 'cause they point to classes 1:1 and 1:2 which doesnt
> exist at all ? Also I can't figure out which filter got used u32 or
> tc_index but 'cause tcism_plot generates only enqueed packed and no
> dequee-packets. They have same priority but u32 is attached at root so they
> should be used, right ?
>
> Ok I will describe the scenario I want to achieve if u can give me simple
> exmples :
>
> On the root I want to create one 256KB/s channel then in this channel I
> want to create two channels which will be separated on two one 60% the
> other 40% (both can borrow bandwith from each other but the 60%-channel has
> to be more privileged, higher priority)
What do you exacly mean with "more privileged, higher priority" ??

> Then in those two channels I want have more small channels say 30 in each
> of them... (cbq and htb if posiible :") 'm I nasty !)
No problem with cbq nor with htb.

> Next question : Say I have to handle other traffic not only Internet, then
> I should make sibling channels to my Internet one to handle this, right ?
Mhh.  I don't understand your point.

> One final question : If u have say 1Mbps Internet connection to the outside
> world what channel u create below-the-root (which is 100Mbps -ethernet) 
> for handling your internet traffic -- exact 1Mbps OR something like 1.2Mbps
> so that u can be sure that if link is used to 100% u dont end up using
> something like 98% of the link OR some other way ?
Other way.  If you create a 1.2 Mbps class, you will send more data then the 
internet connecion can handle.  So the buffers in the internet modem (most 
high-bandwidth modems has big buffers to get a higher throuput) will get 
filled.
Solution: make sure the buffers are never filled so send less bandwidth then 
you actualy have.  You loose some bandwidth, but you win the ability to 
control that bandwidth.

There is also something wrong with the output generated by tcng.  But I dived 
not deep enough in the tcng docs to know what's going wrong.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LARTC] [tcng] correct config?
  2002-07-22 18:05 [LARTC] [tcng] correct config? raptor
  2002-07-22 18:40 ` Stef Coene
@ 2002-07-22 19:29 ` raptor
  2002-07-22 19:35 ` Stef Coene
  2002-07-25 22:57 ` Werner Almesberger
  3 siblings, 0 replies; 5+ messages in thread
From: raptor @ 2002-07-22 19:29 UTC (permalink / raw)
  To: lartc




|> On the root I want to create one 256KB/s channel then in this channel I
|> want to create two channels which will be separated on two one 60% the
|> other 40% (both can borrow bandwith from each other but the 60%-channel has
|> to be more privileged, higher priority)
|What do you exacly mean with "more privileged, higher priority" ??

]- Opps i've made a mistake... both have to be able to use bantwidth from each other (if the "other" is not used at its full capacity)..
then it is ok.. in HTB it should be :
40% -> rate 40% ceil 100%
60% -> rate 60% ceil 100%


|> Then in those two channels I want have more small channels say 30 in each
|> of them... (cbq and htb if posiible :") 'm I nasty !)
|No problem with cbq nor with htb.
]- i meaned if possible  u to provide examples in both qdisc :")

|> Next question : Say I have to handle other traffic not only Internet, then
|> I should make sibling channels to my Internet one to handle this, right ?
|Mhh.  I don't understand your point.

egress { //100Mbps
//internet traffic
htb (rate 256Kbps) { .... };
// other traffic : say intranet traffic
htb (rate XXX) { .... }
}


|Solution: make sure the buffers are never filled so send less bandwidth then 
|you actualy have.  You loose some bandwidth, but you win the ability to 
|control that bandwidth.
]- understand

|There is also something wrong with the output generated by tcng.  But I dived 
|not deep enough in the tcng docs to know what's going wrong.
]- i cant figure out yet too...  (i'm doing those test on the computer at work, but still have no Internet there.. )

|Stef
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LARTC] [tcng] correct config?
  2002-07-22 18:05 [LARTC] [tcng] correct config? raptor
  2002-07-22 18:40 ` Stef Coene
  2002-07-22 19:29 ` raptor
@ 2002-07-22 19:35 ` Stef Coene
  2002-07-25 22:57 ` Werner Almesberger
  3 siblings, 0 replies; 5+ messages in thread
From: Stef Coene @ 2002-07-22 19:35 UTC (permalink / raw)
  To: lartc

> ]- Opps i've made a mistake... both have to be able to use bantwidth from
> each other (if the "other" is not used at its full capacity).. then it is
> ok.. in HTB it should be :
> 40% -> rate 40% ceil 100%
> 60% -> rate 60% ceil 100%
AND both connected to a 1 class with 100% rate, 100 ceil.

> |> Then in those two channels I want have more small channels say 30 in
> |> each of them... (cbq and htb if posiible :") 'm I nasty !)
> |
> |No problem with cbq nor with htb.
>
> ]- i meaned if possible  u to provide examples in both qdisc :")
I have no examples for that with tcng.  But I have "some" docs on 
www.docum.org if you are interested.

> |> Next question : Say I have to handle other traffic not only Internet,
> |> then I should make sibling channels to my Internet one to handle this,
> |> right ?
> |
> |Mhh.  I don't understand your point.
>
> egress { //100Mbps
> //internet traffic
> htb (rate 256Kbps) { .... };
> // other traffic : say intranet traffic
> htb (rate XXX) { .... }
That's indeed the way to handle this.

> |There is also something wrong with the output generated by tcng.  But I
> | dived not deep enough in the tcng docs to know what's going wrong.
>
> ]- i cant figure out yet too...  (i'm doing those test on the computer at
> work, but still have no Internet there.. )
Reading tc docs is number one on my to do list :)

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LARTC] [tcng] correct config?
  2002-07-22 18:05 [LARTC] [tcng] correct config? raptor
                   ` (2 preceding siblings ...)
  2002-07-22 19:35 ` Stef Coene
@ 2002-07-25 22:57 ` Werner Almesberger
  3 siblings, 0 replies; 5+ messages in thread
From: Werner Almesberger @ 2002-07-25 22:57 UTC (permalink / raw)
  To: lartc

raptor@unacs.bg wrote:
> Below is my tests and I have some questions regarding them :
> first it seems that classification doesnt happen at all ?! and it is
> clear from the u32 filters 'cause they point to classes 1:1 and 1:2 which
> doesnt exist at all ?

They're dsmark classes and don't need explicit creation. They simply
set skb->tc_index to 1 and 2, respectively.

> Also I can't figure out which filter got used u32 or tc_index but
> 'cause tcism_plot generates only enqueed packed and no dequee-packets.

BTW, if you want to see what exactly is going on, you may want to use

tcsim -v -v -v ... | tcsim_pretty

> They have same priority but u32 is attached at root so they should be
> used, right ?

Yes.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://icapeople.epfl.ch/almesber/_____________________________________/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-07-25 22:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-22 18:05 [LARTC] [tcng] correct config? raptor
2002-07-22 18:40 ` Stef Coene
2002-07-22 19:29 ` raptor
2002-07-22 19:35 ` Stef Coene
2002-07-25 22:57 ` Werner Almesberger

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.