Subject: Re: dummy as IMQ replacement

From: Hasso Tepper <[email-masked]>
Date: Mon, 31 Jan 2005 16:14:31 +0200

jamal wrote:
> On Mon, 2005-01-31 at 08:02, Hasso Tepper wrote:
> > All traffic coming from eth1.101 interface.
>
> eth1.101 is an alias? You may have issues there. Maybe not if the
> attach to that interface worked.

No, vlan.

> Theres other ways to do it[1] but if theres a bug in this it needs
> fixing.
>
> cheers,
> jamal
>
> [1]
> Example, you could do this:
>
> tc filter add dev eth1 parent ffff: protocol ip prio 1 \
> u32 match u32 0 0 flowid 1:15 \
> action police index 1 rate 1024kbit burst 60k drop index 1
>
> Note the use of "index 1" to select a policer.
>
> Then repeat replacing ip with ip6; make sure that "index 1" for policer
> stays. You could do this to share also across devices.
>
> Example, on egress of eth0 also use the same 1Mbps
>
> tc filter add dev eth0 parent 1:0 protocol ip prio 6 u32 \
> match ip src 10.0.0.21/32 flowid 1:16 \
> action police index 1 rate 1024kbit burst 60k drop index 1
>
> Now with new action stuff you could instead just have said:
> tc actions add \
> action police index 1 rate 1024kbit burst 60k drop index 1
>
> And then later just referenced it without having to repeat the rate
> like so:
> filter add dev eth0 parent ffff: protocol ip prio 6 u32 match ip src \
> 10.0.0.21/32 flowid 1:16 \
> action police index 1

Hmmm ... I even didn't know about index. Yes, something like that would do 
as well probably. I'll do some tests later today with this. Actions don't 
help me though as I'm using 2.4 kernel for production.

-- 
Hasso Tepper
Elion Enterprises Ltd.
WAN administrator