Bandwidth Limiting
Dan Nelson
dnelson at allantgroup.com
Tue Aug 3 22:15:27 PDT 2004
In the last episode (Aug 03), Jonathan said:
> Hello, I run FreeBSD 5-2.1 on a serv4er box used for my company
> (StreamForce Hosting Solutions). I was wondering if there is an
> application i can install or method of limiting per user bandwidth by
> like a certain group or class. If not is there a way to limit bandwidth
> for all non super user accounts.
ipfw rules plus dummynet should be able to do what you want. ipfw can
filter on the uid or gid of the process sending/receiving the packet, so
this should cause all non-root packets to get filtered through dummynet
pipe 1 (which you could configure to run at 90% of your true capacity):
ipfw add 400 skipto 402 ip from any to any uid root
ipfw add 401 pipe 1 ip from any to any
Hopefully ipfw will soon get the ability to use ALTQ which was recently
merged into -current, so you can do some more advanced limiting.
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-questions
mailing list