LARTC
[Top] [All Lists]

[LARTC] Order of 'tc filer'

To: lartc@mailman.ds9a.nl
Subject: [LARTC] Order of 'tc filer'
From: "Martin Schiøtz" <malinux@gmail.com>
Date: Sat, 17 Feb 2007 13:48:49 +0100
Delivered-to: sp-com-lists@consult.net
Delivered-to: lartc-list@securepoint.com
Delivered-to: lartc@outpost.ds9a.nl
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=YTB40ljCw9w3DWflluecehoJb1to+8HtUbCRO46B50yUWkFf4g4B7I4QYOXRBBaG+4oH3JLeNb5mr1k5hTDiSei0VCwptjVnpZsN03ftaXi1p2vKpPRSuKiRq0pM9ei41rAhwv8mAgLqXhJ8khfvltVK/kLvNIAi1mEAnxgixwM=
List-archive: <http://mailman.ds9a.nl/pipermail/lartc>
List-help: <mailto:lartc-request@mailman.ds9a.nl?subject=help>
List-id: "Mailinglist of the Linux Advanced Routing &amp; Traffic Control project" <lartc.mailman.ds9a.nl>
List-post: <mailto:lartc@mailman.ds9a.nl>
List-subscribe: <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=subscribe>
List-unsubscribe: <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=unsubscribe>
Sender: lartc-bounces@mailman.ds9a.nl
Hi

How can I control which filter a packet will meet first?

I have tried changing the order of applying the tc filter scripts and
switching flowid number, but 'protocol ip u32 match ip src <ip net>
match ip src 0.0.0.0/0' always kicks in first?

From my script
--------------------
# All traffic - Priority: Low
tc filter add dev eth0 parent 1:0 prio 2 protocol ip u32 match ip src
<ip net> match ip src 0.0.0.0/0 flowid 1:21
# Traffic between offices (IPSEC) - Priority: High
tc filter add dev eth0 parent 1:0 prio 0 protocol ip u32 match ip src
<ip net> match ip protocol 50 0xff flowid 1:22


# tc -s filter show dev eth0
----------------------------------
filter parent 1: protocol ip pref 2 u32
filter parent 1: protocol ip pref 2 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 2 u32 fh 800::802 order 2050 key ht
800 bkt 0 flowid 1:21  (rule hit 428 success 426)
 match c0000000/e0000000 at 16 (success 426 )
 match 00000000/00000000 at 12 (success 426 )
filter parent 1: protocol ip pref 49151 u32
filter parent 1: protocol ip pref 49151 u32 fh 803: ht divisor 1
filter parent 1: protocol ip pref 49151 u32 fh 803::800 order 2048 key
ht 803 bkt 0 flowid 1:22  (rule hit 3 success 0)
 match c0000000/e0000000 at 16 (success 0 )
 match 00320000/00ff0000 at 8 (success 0 )

- Martin
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

<Prev in Thread] Current Thread [Next in Thread>