Traffic shaping part 2
Stefan Bethke
stb at lassitu.de
Sun Jun 25 13:47:29 UTC 2006
Am 25.06.2006 um 07:55 schrieb Jax:
> Anyone can give me a real life example, full ipfw traffic shaping
> ruleset or something like that.
FWIW, here's the shaping section from my ipfw setup. I'm behind an
ADSL2 line, so I don't care about downstream bandwidth, but I do
about the upstream. This allows me to run BT at full rate and still
have decent ssh interactive and web browsing behaviour.
${fwcmd} pipe 1 config bw 480kbit/s
# up prio: TCP ACKs, SSH interactive, etc.
${fwcmd} queue 1 config pipe 1 weight 100 queue 20 mask all
# up std: everything else
${fwcmd} queue 2 config pipe 1 weight 50 queue 20 mask all
# up bt: bt etc.
${fwcmd} queue 3 config pipe 1 weight 1 queue 20 mask all
# favour small TCP packets (ACKs)
${fwcmd} add 200 queue 1 tcp from any to any iplen 1-100 xmit tun0
# ssh
${fwcmd} add 201 queue 1 tcp from any to any 22 iptos lowdelay xmit tun0
# DNS, NTP
${fwcmd} add 202 queue 1 udp from any to any 53, 123 xmit tun0
# BT etc.
${fwcmd} add 210 queue 3 tcp from 192.168.0.0/24 21530-21539 to any
xmit tun0
${fwcmd} add 211 queue 3 tcp from 192.168.0.0/24 6880-6889 to any
xmit tun0
${fwcmd} add 212 queue 3 tcp from 192.168.0.0/24 to any 6880-6889
xmit tun0
# default
${fwcmd} add 220 queue 2 tcp from any to any xmit tun0
--
Stefan Bethke <stb at lassitu.de> Fon +49 170 346 0140
More information about the freebsd-net
mailing list