All of lore.kernel.org
 help / color / mirror / Atom feed
From: office@kabelweb.at
To: lartc@vger.kernel.org
Subject: [LARTC] htb & filter on classes
Date: Mon, 29 Apr 2002 23:11:52 +0000	[thread overview]
Message-ID: <marc-lartc-102014573809620@msgid-missing> (raw)

I am trying to do some simple filtering with htb and the following class 
hierarchy:

        1:
        |
       1:10
       /  \
   1:100  1:200
    /  \
1:1000  ...

Internal traffic should go to 1:200 and external traffic to 1:100 with 
further distinction based on dst ip made there.
The problem is that I just don't get the second distinction (filter on class 
1:100) right. I have not found any working example where filters were not 
attached to qdiscs but on classes instead. Is it possible to do so? If yes: 
am I using the right syntax (parent 1:100)?

The packets just get dropped in class 1:100 although the filter should 
definitely match and enqueue them into 1:1000.

Is there anything like a default filter on class basis which always 
matches or do I have to use something like "match ip dst 0.0.0.0/0"?

Here are the commands I'm using:

##########
tc qdisc add dev eth1 root handle 1: htb default 100
tc class add dev eth1 parent 1: classid 1:10 htb rate 10mbit ceil 10mbit 
burst 20k

# external traffic
tc class add dev eth1 parent 1:10 classid 1:100 htb rate 1mbit ceil 1mbit 
burst 10k

# internal traffic
tc class add dev eth1 parent 1:10 classid 1:200 htb rate 9mbit ceil 9mbit 
burst 10k

tc class add dev eth1 parent 1:100 classid 1:1000 htb rate 0.5mbit ceil 
0.5mbit burst 2k prio 10

# filters
tc filter add dev eth1 pref 1 protocol ip parent 1: u32 match ip src 
195.58.166.176/28 flowid 1:200
tc filter add dev eth1 pref 1 protocol ip parent 1:100 u32 match ip dst 
195.58.0.0/16 flowid 1:1000
##########

Many thanks in advance,

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

             reply	other threads:[~2002-04-29 23:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-29 23:11 office [this message]
2002-04-30 17:14 ` [LARTC] htb & filter on classes Stef Coene
2002-04-30 22:34 ` Martin Devera

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-102014573809620@msgid-missing \
    --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.