Efficient use of Dummynet pipes in IPFW
John-Mark Gurney
gurney_j at resnet.uoregon.edu
Mon Sep 19 13:55:03 PDT 2005
Brett Glass wrote this message on Mon, Sep 19, 2005 at 09:32 -0600:
> At 03:40 AM 9/19/2005, John-Mark Gurney wrote:
>
> >What's awkward about:
> >#define PIPE_FOO 1
> >#define PIPE_BAR 2
> >
> >add pipe PIPE_FOO config bw 64kbit/sec
> >/* ... etc ... */
>
> I've done that, and unfortunately it does not solve the problem
> I'm describing.
If you paid attention to what I quoted, I never said my message addressed
your overall problem... if you paid attention to what I quoted, you would
see that I was simply replying to your message text:
I've tried this. Alas, it quickly gets out of hand because objects
in IPFW (for example pipes) aren't named. You wind up literally
having to build a symbol table to keep track of rule numbers, pipe
numbers, etc. Yes, you can do it, but it's very awkward.
But with the suggestion of someone else, you can build a set of rules that
do:
#define PIPE_FOO 1
#define PIPE_BAR 1
#define FOO 10000
#define BAR 11000
#define CONT 30000
add skipto FOO tcp from any to any 22
add skipto BAR tcp from any to any 80
add skipto CONT ip from any to any
add FOO pipe PIPE_FOO ip from any to any
add skipto CONT ip from any to any
add BAR pipe PIPE_BAR ip from any to any
add skipto CONT ip from any to any
add CONT count ip from any to any
and there you go...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-net
mailing list