4.8-Stable DummyNet

Claus Guttesen cguttesen at yahoo.dk
Mon Jun 2 13:13:34 PDT 2003


Hi.

> We have a 6.0 mb/s ADSL net connection for all the
> gaming clients to use, 
> however if a gamer starts downloading a file, that
> file takes precendence and 
> causes everyone's pings 'in-game' to sky rocket to
> unplayable levels.

I have the following in my /etc/rc.firewall:

# do some traffic-shaping, configure a pipe
${fwcmd} pipe 10 config bw 1280Kbit/s
${fwcmd} pipe 20 config bw 1280Kbit/s

# create some queues with various weight
${fwcmd} queue 11 config pipe 10 weight 50
${fwcmd} queue 12 config pipe 10 weight 25
${fwcmd} queue 13 config pipe 10 weight 5
${fwcmd} queue 21 config pipe 20 weight 50
${fwcmd} queue 22 config pipe 20 weight 25
${fwcmd} queue 23 config pipe 20 weight 5

# create some rules that will be applied to the queues
# inside-interface
${fwcmd} add 340 queue 11 tcp from ${inet}:${imask} to
any dst-port http in recv ${iif}
${fwcmd} add 340 queue 11 tcp from ${inet}:${imask} to
any dst-port ssh in recv ${iif}
${fwcmd} add 340 queue 11 udp from ${inet}:${imask} to
any dst-port 53 in recv ${iif}
${fwcmd} add 340 queue 12 tcp from ${inet}:${imask} to
any dst-port smtp in recv ${iif}
${fwcmd} add 340 queue 12 tcp from ${inet}:${imask} to
any dst-port pop3 in recv ${iif}
${fwcmd} add 340 queue 13 ip from ${inet}:${imask} to
any in recv ${iif}

# outside-interface
${fwcmd} add 350 queue 21 tcp from any to
${inet}:${imask} src-port http in recv ${oif}
${fwcmd} add 350 queue 21 tcp from any to
${inet}:${imask} src-port ssh in recv ${oif}
${fwcmd} add 350 queue 21 udp from any to
${inet}:${imask} src-port 53 in recv ${oif}
${fwcmd} add 350 queue 22 tcp from any to
${inet}:${imask} src-port smtp in recv ${oif}
${fwcmd} add 350 queue 22 tcp from any to
${inet}:${imask} src-port pop3 in recv ${oif}
${fwcmd} add 350 queue 23 ip from any to
${inet}:${imask} in recv ${oif}

;;

This creates some queues with a certain bandwitdh and
weight, apply some protocols to the various queues.

You may use this as a staring-point. I'm using this on
FreeBSD 4.8 stable and compiled IPFW2-support into the
kernel. Requires a change to /etc/make.conf and
kernel.

Regards
Claus


Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, spamfilter og virusscan


More information about the freebsd-stable mailing list