All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] question about correct way of shapping
@ 2005-04-07 15:06 Paulo Ricardo Bruck
  2005-04-07 17:22 ` Corey Hickey
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Paulo Ricardo Bruck @ 2005-04-07 15:06 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 1092 bytes --]

Hi Guys

After reading
http://lartc.org/lartc.html#LARTC.QDISC
http://www.docum.org/docum.org/
http://tldp.org/HOWTO/Traffic-Control-HOWTO/
http://www.opalsoft.net/qos/DS-21.htm

and a wonderful figure from:  http://www.opalsoft.net/qos/ds-lb-214.gif


I have a newbie question. Suposse next figure:

		   <--- up 128K      
internet ----- dsl ---------------------eth1 -Linux Qos- eth0 ------ LAN
		   ---> down 450k	


If I want "shape" traffic to my LAN ( sharing equally download for all
users) I have to insert a rule like this

tc qdisc add dev eth0 root handle 1:0 htb
tc class add dev eth0 parent 1:0 classid 1:1 htb rate 400kbit
and ....other rules

and If I want "shape" traffic to Internet ( not allowing a single user
to destroy upload) I have to insert a rule like this:

tc qdisc add dev eth1 root handle 1:0 htb
tc class add dev eth1 parent 1:0 classid 1:1 htb rate 100kbit
and ...other rules


Is it correct?? or it is  better to use IMQ or dummy to shape in both
directions ?? 

thanks in advanced

-- 
Paulo Ricardo Bruck - consultor

[-- Attachment #1.2: Esta é uma parte de mensagem assinada digitalmente --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
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] question about correct way of shapping
  2005-04-07 15:06 [LARTC] question about correct way of shapping Paulo Ricardo Bruck
@ 2005-04-07 17:22 ` Corey Hickey
  2005-04-07 18:45 ` Paulo Ricardo Bruck
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Corey Hickey @ 2005-04-07 17:22 UTC (permalink / raw)
  To: lartc

Paulo Ricardo Bruck wrote:

> 
> 		   <--- up 128K      
> internet ----- dsl ---------------------eth1 -Linux Qos- eth0 ------ LAN
> 		   ---> down 450k	
> 
> 
> If I want "shape" traffic to my LAN ( sharing equally download for all
> users) I have to insert a rule like this
> 
> tc qdisc add dev eth0 root handle 1:0 htb
> tc class add dev eth0 parent 1:0 classid 1:1 htb rate 400kbit
> and ....other rules
> 
> and If I want "shape" traffic to Internet ( not allowing a single user
> to destroy upload) I have to insert a rule like this:
> 
> tc qdisc add dev eth1 root handle 1:0 htb
> tc class add dev eth1 parent 1:0 classid 1:1 htb rate 100kbit
> and ...other rules
> 
> 
> Is it correct??

Yes. That's the way to do it. Don't forget to add some filters (tc
filter add ...) to send traffic into those queues.

-Corey
_______________________________________________
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] question about correct way of shapping
  2005-04-07 15:06 [LARTC] question about correct way of shapping Paulo Ricardo Bruck
  2005-04-07 17:22 ` Corey Hickey
@ 2005-04-07 18:45 ` Paulo Ricardo Bruck
  2005-04-07 22:35 ` Corey Hickey
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Paulo Ricardo Bruck @ 2005-04-07 18:45 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 1530 bytes --]

Em Qui, 2005-04-07 às 10:22 -0700, Corey Hickey escreveu:
> Paulo Ricardo Bruck wrote:
> 
> > 
> > 		   <--- up 128K      
> > internet ----- dsl ---------------------eth1 -Linux Qos- eth0 ------ LAN
> > 		   ---> down 450k	
> > 
> > 
> > If I want "shape" traffic to my LAN ( sharing equally download for all
> > users) I have to insert a rule like this
> > 
> > tc qdisc add dev eth0 root handle 1:0 htb
> > tc class add dev eth0 parent 1:0 classid 1:1 htb rate 400kbit
> > and ....other rules
> > 
> > and If I want "shape" traffic to Internet ( not allowing a single user
> > to destroy upload) I have to insert a rule like this:
> > 
> > tc qdisc add dev eth1 root handle 1:0 htb
> > tc class add dev eth1 parent 1:0 classid 1:1 htb rate 100kbit
> > and ...other rules
> > 
> > 
> > Is it correct??
> 
> Yes. That's the way to do it. Don't forget to add some filters (tc
> filter add ...) to send traffic into those queues.
> 
Yes I'll not forget 8) 
thanks for quickly answer Corey

Just another question related w/ shapping  

at some documents it's describe the use of IMQ and some other the use of
dummy device. What's the best method ? From what I've read we use dummy
to shape both lan and wan using dummy device. It's correct? If it's
correct why does we use dummy insted shape at LAn and Wan Interfaces ?

I intend use TC + iptables + debian sarge, but I'm not sure about using
dummy device....


thanks in advance




> -Corey
-- 
Paulo Ricardo Bruck - consultor


[-- Attachment #1.2: Esta é uma parte de mensagem assinada digitalmente --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
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] question about correct way of shapping
  2005-04-07 15:06 [LARTC] question about correct way of shapping Paulo Ricardo Bruck
  2005-04-07 17:22 ` Corey Hickey
  2005-04-07 18:45 ` Paulo Ricardo Bruck
@ 2005-04-07 22:35 ` Corey Hickey
  2005-04-08 12:14 ` Paulo Ricardo Bruck
  2005-04-10 21:36 ` Corey Hickey
  4 siblings, 0 replies; 6+ messages in thread
From: Corey Hickey @ 2005-04-07 22:35 UTC (permalink / raw)
  To: lartc

Paulo Ricardo Bruck wrote:

> 
> at some documents it's describe the use of IMQ and some other the use of
> dummy device. What's the best method ? From what I've read we use dummy
> to shape both lan and wan using dummy device. It's correct? If it's
> correct why does we use dummy insted shape at LAn and Wan Interfaces ?
> 

I've never used a dummy device. This looks interesting, though it
doesn't apply to your setup.

http://article.gmane.org/gmane.linux.network/21224

Were you reading something different? If so, post the link(s). IMQ
probably doesn't apply to you either.

You might have come across documents describing ingress shaping, which
deals with traffic coming into an interface rather than the usual
methods of shaping traffic as it leaves an interface. For a router
setup, like yours, ingress shaping is unnecessary because all traffic
(except a little bit for the router itself) can be shaped normally as it
leaves one interface or the other.

To shape upstream traffic, attach a qdisc to your Internet-side
interface; to shape downstream traffic, attach a qdisc to your LAN-side
interface.

> I intend use TC + iptables + debian sarge

That's what I use.

-Corey
_______________________________________________
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: Re: [LARTC] question about correct way of shapping
  2005-04-07 15:06 [LARTC] question about correct way of shapping Paulo Ricardo Bruck
                   ` (2 preceding siblings ...)
  2005-04-07 22:35 ` Corey Hickey
@ 2005-04-08 12:14 ` Paulo Ricardo Bruck
  2005-04-10 21:36 ` Corey Hickey
  4 siblings, 0 replies; 6+ messages in thread
From: Paulo Ricardo Bruck @ 2005-04-08 12:14 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 1618 bytes --]

Em Sex, 2005-04-08 às 11:06 +0200, lartc-request@mailman.ds9a.nl
escreveu:
Hy people and Corey

> You might have come across documents describing ingress shaping, which
> deals with traffic coming into an interface rather than the usual
> methods of shaping traffic as it leaves an interface.

Yes a lot of documents including lartc..8)

>  For a router setup, like yours, ingress shaping is unnecessary
> because all traffic
> (except a little bit for the router itself) can be shaped normally as
> it
> leaves one interface or the other.
> 
> To shape upstream traffic, attach a qdisc to your Internet-side
> interface; to shape downstream traffic, attach a qdisc to your
> LAN-side
> interface.
> 

all right . Let me insert more details about it. ( sorry I started w/ a
single scenario just to understand things easier )

> > 
> >                    <--- up 128K          __________
> internet ---- dsl -------------------eth1 -Linux Qos- eth0 --- LAN
> >                   ---> down 450k         ----------
> > 

At Linux Qos I have:
debian sarge ( iptables + squid + ntop + psad + apache (only for
reports) + acid + snort) 

Sometimes I use 2 links to ISP ( providing load balance)
BTW nice work at lartc. w/ this session about it. 80)

It means that at Linux QoS I have not only linux as a router, but Linux
serving some applications and QoS too.

Again sorry for make things not so clear at my first e-mail.


Then should I use only  TC + iptables ?

> > I intend use TC + iptables + debian sarge
> 
> That's what I use.
-- 
Paulo Ricardo Bruck - consultor


[-- Attachment #1.2: Esta é uma parte de mensagem assinada digitalmente --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
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] question about correct way of shapping
  2005-04-07 15:06 [LARTC] question about correct way of shapping Paulo Ricardo Bruck
                   ` (3 preceding siblings ...)
  2005-04-08 12:14 ` Paulo Ricardo Bruck
@ 2005-04-10 21:36 ` Corey Hickey
  4 siblings, 0 replies; 6+ messages in thread
From: Corey Hickey @ 2005-04-10 21:36 UTC (permalink / raw)
  To: lartc

Paulo Ricardo Bruck wrote:
> all right . Let me insert more details about it. ( sorry I started w/ a
> single scenario just to understand things easier )
> 

> At Linux Qos I have:
> debian sarge ( iptables + squid + ntop + psad + apache (only for
> reports) + acid + snort) 
> 
> Sometimes I use 2 links to ISP ( providing load balance)
> BTW nice work at lartc. w/ this session about it. 80)
> 
> It means that at Linux QoS I have not only linux as a router, but Linux
> serving some applications and QoS too.
> 
> Again sorry for make things not so clear at my first e-mail.
> 
> 
> Then should I use only  TC + iptables ?
> 

If you want to shape traffic as it comes from the Internet, then you
will have to use IMQ or dummy, which gets beyond my area of expertise.

I used IMQ for a little while several months ago and it worked very
nicely for ingress shaping, but the machine kept hard-locking and I gave
up on it. I don't mean to spread FUD about IMQ -- it may be more stable
now -- but be wary.

-Corey
_______________________________________________
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

end of thread, other threads:[~2005-04-10 21:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-07 15:06 [LARTC] question about correct way of shapping Paulo Ricardo Bruck
2005-04-07 17:22 ` Corey Hickey
2005-04-07 18:45 ` Paulo Ricardo Bruck
2005-04-07 22:35 ` Corey Hickey
2005-04-08 12:14 ` Paulo Ricardo Bruck
2005-04-10 21:36 ` Corey Hickey

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.