All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kabelweb <office@kabelweb.at>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Most general filter rule?
Date: Thu, 15 Apr 2004 10:20:55 +0000	[thread overview]
Message-ID: <200404151220.57418.office@kabelweb.at> (raw)
In-Reply-To: <200404141104.09337.office@kabelweb.at>

> Post your script and maybe we can help.

Ok thank you - a script says more than thousand words I guess - but I only kept the essential parts:

# here we go:
tc qdisc add dev eth2 root handle 1: htb default 1000
tc class add dev eth2 parent 1: classid 1:100 htb rate 10400kbit ceil 10400kbit
tc class add dev eth2 parent 1:100 classid 1:1000 htb rate 128kbit ceil 10400kbit prio 3 quantum 2000
tc class add dev eth2 parent 1:100 classid 1:2000 htb rate 512kbit ceil 10400kbit prio 1 quantum 20000

tc class add dev eth2 parent 1:100 classid 1:1021 htb rate 10kbit ceil 512kbit prio 3 quantum 2000
tc class add dev eth2 parent 1:100 classid 1:1022 htb rate 10kbit ceil 512kbit prio 3 quantum 2000
tc class add dev eth2 parent 1:100 classid 1:1023 htb rate 10kbit ceil 512kbit prio 3 quantum 2000
...
# this goes on for a couple of hundred classes
...
# test class which I am trying to give all the traffic not belonging to other classes
tc class add dev eth2 parent 1:100 classid 1:5000 htb rate 10kbit ceil 256kbit prio 3 quantum 2000

# now the filters:
tc filter add dev eth2 pref 1 protocol ip parent 1: u32 match ip dst aaa.bbb.ccc.ddd/32 flowid 1:2000
tc filter add dev eth2 pref 1 protocol ip parent 1: u32 match ip src aaa.bbb.ccc.ddd/32 flowid 0:

tc filter add dev eth2 pref 100 protocol ip parent 1: u32 match ip dst aaa.bbb.ccc.ddd/32 flowid 1:1021
tc filter add dev eth2 pref 100 protocol ip parent 1: u32 match ip dst aaa.bbb.ccc.ddd/32 flowid 1:1022
tc filter add dev eth2 pref 100 protocol ip parent 1: u32 match ip dst aaa.bbb.ccc.ddd/32 flowid 1:1023
...
# this goes on for all the classes
...
# now my test filter which should prevent all other traffic going to default
tc filter add dev eth2 pref 200 protocol all parent 1: u32 match ip dst 0.0.0.0/0 flowid 1:5000

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

With "tc -d -s class show dev eth2" I see traffic flowing through the classes nicely but I see
just about 20bps in 1:5000 and about 30000bps in default (1:1000).

Anybody can tell me why?
What kind of traffic doesn't get matched by "dst 0.0.0.0/0" and "protocol all"?

And yes - these are all public IPs.

thanks!

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

  parent reply	other threads:[~2004-04-15 10:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-14  9:04 [LARTC] Most general filter rule? Kabelweb
2004-04-15  9:22 ` Kabelweb
2004-04-15  9:40 ` Catalin BOIE
2004-04-15 10:20 ` Kabelweb [this message]
2004-04-16 21:57 ` Kabelweb

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=200404151220.57418.office@kabelweb.at \
    --to=office@kabelweb.at \
    --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.