Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jun 2003 22:13:32 +0200 (CEST)
From:      =?iso-8859-1?q?Claus=20Guttesen?= <cguttesen@yahoo.dk>
To:        freebsd-stable@freebsd.org
Subject:   Re: 4.8-Stable DummyNet
Message-ID:  <20030602201332.89737.qmail@web14106.mail.yahoo.com>
In-Reply-To: <1054583721.3edbaba959c81@webmail.ownij.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030602201332.89737.qmail>