All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] shapping over the same interface
@ 2003-12-19 11:40 Fernando Sancho
  2003-12-19 17:31 ` Stef Coene
  0 siblings, 1 reply; 2+ messages in thread
From: Fernando Sancho @ 2003-12-19 11:40 UTC (permalink / raw)
  To: lartc


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

Hi all
I'm new to the list and new to tc

I'm triying to shape incoming and outgoing traffic for every IP in a
LAN. I'm using cbq classes because i need to use cbq.init script
(partner's restrictions). Well, according to cbq.init documentation i
have to define two classes for every IP

#cbq-0002-incoming-192.168.0.2
DEVICE=eth0,10Mbit,1Mbit
RULE=,192.168.0.2
BOUNDED=yes
PRIO=5
RATE=256Kbit
WEIGHT=25.6Kbit
LEAF=sfq

#cbq-0003-outgoing-192.168.0.2
DEVICE=eth0,10Mbit,1Mbit
RULE=192.168.0.2,
BOUNDED=yes
PRIO=5
RATE=64Kbit
WEIGHT=6.4Kbit
LEAF=sfq

The behavior of this es very extrange because all traffic from and to
192.168.0.2 is shaped by cbq-0002-incoming-192.168.0.2 

The code equivalent to that classes is this:
----------------------------
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1 cbq bandwidth 10Mbit avpkt 1000 cell
8
tc class change dev eth0 root cbq weight 1Mbit allot 1514

tc class add dev eth0 parent 1: classid 1:2 cbq bandwidth 10Mbit rate
256Kbit weight 25.6 prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded
tc qdisc add dev eth0 parent 1:2 handle 2 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
192.168.0.2 classid 1:2

tc class add dev eth0 parent 1: classid 1:3 cbq bandwidth 10Mbit rate
64Kbit weight 6.4Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded
tc qdisc add dev eth0 parent 1:3 handle e sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
192.168.0.2 classid 1:3
------------------------------

I don't know why a IP packet with src IP=192.168.0.2 is captured by a
filter who says very clear that it will only takes packets where dst IP
is 192.168.0.2

I'm using RedHat 7.3 with default kernel (2.4.18-13), another time,
partner's restricctions, eth0 is the private side of the gateway.

Thanks in advance.

PD: Sorry about my broken english.

-- 
Fernando Sancho Glez-Calero
E.S. de Informática de Ciudad Real
Universidad de Castilla la Mancha
Profesor Asociado
Dpto. Arquitectura y Redes de Computadores.
Tlf: +34 926295300 ext:6216, 3705, 6217

[-- Attachment #1.2: Type: text/html, Size: 2688 bytes --]

[-- Attachment #2: Esta parte del mensaje está firmada digitalmente --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [LARTC] shapping over the same interface
  2003-12-19 11:40 [LARTC] shapping over the same interface Fernando Sancho
@ 2003-12-19 17:31 ` Stef Coene
  0 siblings, 0 replies; 2+ messages in thread
From: Stef Coene @ 2003-12-19 17:31 UTC (permalink / raw)
  To: lartc

On Friday 19 December 2003 12:40, Fernando Sancho wrote:
> Hi all
> I'm new to the list and new to tc
>
> I'm triying to shape incoming and outgoing traffic for every IP in a
> LAN. I'm using cbq classes because i need to use cbq.init script
> (partner's restrictions). Well, according to cbq.init documentation i
> have to define two classes for every IP
But you have to do this in a router with 2 network cards.  You can only shape 
outgoing traffic, so you need to 2 network cards if you want to shape in both 
directions.
You can limit incoming traffic with the ingress qdisc.  This is not so 
powerfull as cbq, but you can limit some connections.

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] 2+ messages in thread

end of thread, other threads:[~2003-12-19 17:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-19 11:40 [LARTC] shapping over the same interface Fernando Sancho
2003-12-19 17:31 ` Stef Coene

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.