Subject: Re: ALTQ in firewall
To: None <netbsd-help@NetBSD.org>
From: Geoff Wing <gcw@pobox.com>
List: netbsd-help
Date: 08/24/2007 15:14:29
On Friday 2007-08-24 14:53 +1000, Martti Kuparinen output:
:Our house has a shared internet connection (4M/512k ADSL) and the firewall is 
:running NetBSD 3.1.1. Currently we are using the built-in IPF to perform all 
:filtering. We have one public address for the external interface and 64 public 
:addresses for the internal network.
:
:I'm aware that PF supports ALTQ in NetBSD 4.0 but that would mean upgrade and 
:I'd rather not upgrade because everything is very stable.
:
:So, is anyone using IPF with ALTQ in NetBSD 3.x? What queueing discipline should 
:I use in this case? All real-life examples are welcome...

I'm using IPF and ALTQ in -current.  People have mentioned that ALTQ is
somewhat unwieldy or slow though I don't have a problem (Pentium4 2GHz)
given a slow uplink.

Here's a snippet of something I use on a machine connected via 100Mb
to a router on a 256Kb uplink.

------------------------------------------------------------
interface ex0 bandwidth 100M cbq
class cbq ex0 root_class NULL priority 0 pbandwidth 100
class cbq ex0 def_class root_class borrow pbandwidth 95 default
class cbq ex0 tcp_class def_class borrow pbandwidth 80
        filter ex0 tcp_class 0 0 0 0 6
class cbq ex0 csl_class tcp_class exactbandwidth 192K
        filter ex0 csl_class 0 0 0 80 6
        filter ex0 csl_class 0 0 0 110 6
        filter ex0 csl_class 0 0 0 873 6
        filter ex0 csl_class 0 0 0 995 6
class cbq ex0 smtp_class csl_class borrow exactbandwidth 160K
        filter ex0 smtp_class 0 25 0 0 6
class cbq ex0 local_class tcp_class borrow pbandwidth 70
        filter ex0 local_class 192.168.0.0 netmask 0xffff0000 0 0 0 6
        filter ex0 local_class a.b.c.0 netmask 0xffffff00 0 0 0 6

------------------------------------------------------------

Regards,
Geoff