All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fernando Sancho <fsancho@inf-cr.uclm.es>
To: lartc@vger.kernel.org
Subject: [LARTC] shapping over the same interface
Date: Fri, 19 Dec 2003 11:40:30 +0000	[thread overview]
Message-ID: <marc-lartc-107183559407845@msgid-missing> (raw)


[-- 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 --]

             reply	other threads:[~2003-12-19 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-19 11:40 Fernando Sancho [this message]
2003-12-19 17:31 ` [LARTC] shapping over the same interface Stef Coene

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-107183559407845@msgid-missing \
    --to=fsancho@inf-cr.uclm.es \
    --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.