From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Furniss Date: Wed, 08 Jun 2005 21:48:29 +0000 Subject: Re: [LARTC] tc filter and ip match Message-Id: <42A767AD.7070507@dsl.pipex.com> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Glaucius Djalma Pereira Junior wrote: > hi all > > people, I'm using tc and htb to create classes and do some QoS , but i > would like to know if i can do it: > > after to create the classes I need to create the rules using tc filter : > > tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst > 10.0.0.0/8 flowid 1:10 > > ok, this rule works with all packets going to 10.0.0.0/8, but how can > i write a rule using "!" or "not" , like : > > tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst > NOT 10.0.0.0/8 flowid 1:10 > > ps.: I would not like to use iptables and mangle table. > > did you understand ? If you want 10.0.0.0/8 to be unshaped by htb and the rest go to 1:10, don't set a default class and filter like - tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst 10.0.0.0/8 flowid 1:99 tc filter add dev eth0 protocol ip parent 1:0 prio 2 u32 match u32 0 0 flowid 1:10 where 1:99 doesn't exist as an htb class. Andy. _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc