creating a dedicated portion of bandwidth with ipfw and dummynet
Michael Sierchio
kudzu at tenebras.com
Sat Nov 1 15:28:00 PST 2003
Peter Brezny wrote:
> Is it possible to dedicate a portion of bandwidth to a rule so that
> regardless of how cramped a connection gets, a defined amount can be
> reserved for a particular packet flow, for instance ssh?
I've been experimenting with using dummynet queues based on
packetlen ranges. Bulk transfers almost always occur at
the MTU size, and interactive traffic almost always consists
of small packets.
I did a tcpdump of raw packets during a "typical" day when
there was no contention for resources, then used tcpdstat
on the dump file to get stats like:
### Packet Size Distribution (including MAC headers) ###
<<<<
[ 32- 63]: 759995
[ 64- 127]: 2525268
[ 128- 255]: 895623
[ 256- 511]: 85380
[ 512- 1023]: 119121
[ 1024- 2047]: 339362
>>>>
Subtract 12 bytes to get the IP len, and you can use iplen range
matching to assign weights to queues. Set net.inet.ip.fw.one_pass=0
More information about the freebsd-ipfw
mailing list