dummynet patch
Jeremie Le Hen
jeremie at le-hen.org
Mon Sep 19 05:21:55 PDT 2005
Hi,
> Can someone make an patch for dummynet, so an user can't get maximum
> bandwith. Queue work great for sharing same bandwidth, but an user can
> get much banditdth if is not used but anothers.
> So is wonderfull if i can put an paramaters for queue (like for pipe),
> to limit bandwidth:
> For example:
> ipfw pipe 1 congig bw 1mbit/s
> ipfw queue 1 config weight 10 pipe 1 bw 128kbits/s
> ipfw queue 1 config weight 15 pipe 1 bw 256kbits/s
>
> This mean that i have two queue that share same pipe. Bandwidth is
> given accordint with their weight but no more that value indicated by
> "bw" parameter. In my example queue 1 can get more than 128 kbits/s.
> In this mode bandwidth is well splited but an user can't get all
> bandidth if is alone on network.
You can just set net.inet.ip.fw.one_pass to 0 and use more pipes
to limit the maximum bandwidth. Let's say you want to limit the
whole pipe to 1MBits/s and then limit user with UID 1001 to 128 KBits/s
on your external interface fxp0 :
% sysctl -w net.inet.ip.fw.one_pass=0
# First skip to the end of the rules if we're not on the outgoing
# path through fxp0.
% ipfw add 100 skipto 65000 all from any to any not xmit fxp0
# Limit user 1001 max bandwidth.
% ipfw pipe 1001 config bw 128KBits/s
% ipfw add 200 pipe 1001 all from any to any
# System-wipe policy.
% ipfw pipe 1 config bw 1MBits/s
% ipfw queue 11 config weight 10 pipe 1
% ipfw queue 12 config weight 20 pipe 2
% ipfw add 210 queue 11 ...
% ipfw add 220 queue 12 ...
--
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
More information about the freebsd-ipfw
mailing list