All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Using filters without a handle
@ 2003-04-26 18:31 Paul Evans
  2003-04-26 19:01 ` Stef Coene
  2003-04-26 19:23 ` Paul Evans
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Evans @ 2003-04-26 18:31 UTC (permalink / raw)
  To: lartc

On April 26, 2003 01:01 am, Stef Coene wrote:
> On Saturday 26 April 2003 06:50, Paul Evans wrote:
> > Hi Stef,
> > You mean instead of a zillion of these:
> > $tc filter add dev $extif parent 1:0 protocol ip handle $var fw flowid
> > 1:$var
> >
> > It's just one of:
> > $tc filter add dev $extif parent 1:0 protocol ip fw
> > ?
> >
> > I see it doesn't error, but I haven't tried it on the real thing yet.
>
> It works.  If you add that filter, packets with mark 11 will end in class
> 1:11.  Actually you use a bery fast hash key so you don't need to check all
> the filters.
> But be aware.  Mark and classid is in hex.  So somtimes 10 is translated in
> to A.  So it's better to specify 0x10 for the mark so you are sure it's in
> hex.
>
> > Also, could I then add further filters *with* options and would they be
> > honored? It'd be very cool if so.
>
> Yes.  You can iuse the fw filter to put the packets in a class.  And you
> can add extra filters to that class to classify the packets in sub classes
> : 1:0
>   1:1
>     1:10
>     1:11
>
> $tc filter add dev $extif parent 1:0 protocol ip handle $var fw
> $tc filter add dev $extif parent 1:10 blabla flowid 1:10
> $tc filter add dev $extif parent 1:11 blabla flowid 1:11
>
> I know it can be done, but I never checked it my self.  So if it works, let
> me know :)  And if it works, I create an extra fas and update the howto.
> Stef

When I tried it for real:
RTNETLINK answers: Invalid argument

Used the line just as I suggested above.

-- 
Regards, Paul Evans


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] Using filters without a handle
  2003-04-26 18:31 [LARTC] Using filters without a handle Paul Evans
@ 2003-04-26 19:01 ` Stef Coene
  2003-04-26 19:23 ` Paul Evans
  1 sibling, 0 replies; 3+ messages in thread
From: Stef Coene @ 2003-04-26 19:01 UTC (permalink / raw)
  To: lartc

> When I tried it for real:
> RTNETLINK answers: Invalid argument
>
> Used the line just as I suggested above.
tc filter add dev eth0 parent 10: protocol ip fw
works for me.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] Using filters without a handle
  2003-04-26 18:31 [LARTC] Using filters without a handle Paul Evans
  2003-04-26 19:01 ` Stef Coene
@ 2003-04-26 19:23 ` Paul Evans
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Evans @ 2003-04-26 19:23 UTC (permalink / raw)
  To: lartc

On April 26, 2003 12:01 pm, Stef Coene wrote:
> > When I tried it for real:
> > RTNETLINK answers: Invalid argument
> >
> > Used the line just as I suggested above.
>
> tc filter add dev eth0 parent 10: protocol ip fw
> works for me.

Worked fine in my shell on my own box too (where nothing is happening or 
configed) until I changed the script on the backup router and got that.

The script on the router is just a bunch of loops creating leaf classes for 
different kinds of client machines. I commented the filter line out of each 
loop and added the line from our last mail at the end and got that error.

Maybe I had finger problems. could be. I'll give it another go a little later 
on. I'm accumulating some numbers right now and don't want to reset the 
counters again just yet. Be nice if I could nuke hundreds of filter entries 
at one go.

oh yeah :-) also, I should go through your site again if you want sometime. 
Today I'm going to attack rrdtools with python so I'm looking forward to that 
later on.

-- 
Regards, Paul Evans


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-26 19:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-26 18:31 [LARTC] Using filters without a handle Paul Evans
2003-04-26 19:01 ` Stef Coene
2003-04-26 19:23 ` Paul Evans

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.