Subject: Re: Help with ALTQ and pf
To: None <current-users@netbsd.org>
From: Amadeus Stevenson <amadeus.stevenson@gmail.com>
List: current-users
Date: 05/20/2005 08:49:30
On 5/20/05, Dave Huang <khym@azeotrope.org> wrote:
> I heard that to use ALTQ, pf is the way to go these days, so I applied
> the ALTQ patch from http://nedbsd.nl/~ppostma/pf/ to a netbsd-2 branch
> i386 kernel and installed security/pflkm from pkgsrc.

I'm using ALTQ with ipf without any problems - default netbsd-2
install with kernel options ALTQ and ALTQ_PRIQ. altqd=3DYES in rc.conf
with:

altq.conf:

interface rtk0 bandwidth 400K priq

        class priq rtk0 high_class NULL priority 2

                filter rtk0 high_class 0 22 0 0 6
                        # ssh
                filter rtk0 high_class 0 1723 0 0 6
                        # vpn tcp
                filter rtk0 high_class 0 21 0 0 6
                        # ftp ctrl
                filter rtk0 high_class 0 53 0 0 6
                        #dns tcp
                filter rtk0 high_class 0 53 0 0 17
                        #dns udp
                filter rtk0 high_class 0 3389 0 0 6
                        #tcp remote desktop
                filter rtk0 high_class 0 0 0 0 47
                        #gre vpn

        class priq rtk0 med_class NULL priority 1

                filter rtk0 med_class 0 443 0 0 6
                        # ssl
                filter rtk0 med_class 0 80 0 0 6
                        # http

        class priq rtk0 low_class NULL priority 0 default

With a "standard" ipf.conf and ipnat.conf (no mention of altq in
either of these files).

altqstat shows packets are put in their queues accordingly:

# altqstat -i rtk0
altqstat: priq on interface rtk0

rtk0:

rtk0:
[high_class] handle:0xc07b29c0 pri:2
  measured: 0bps qlen: 0 period:420999
     packets:482656 (92227341 bytes) drops:417
[med_class] handle:0xc07b5180 pri:1
  measured: 1.29Kbps qlen: 0 period:4442828
     packets:5908617 (617432308 bytes) drops:38
[low_class] handle:0xc07bcf00 pri:0
  measured: 32.72Kbps qlen: 0 period:7867029
     packets:16381331 (6687111626 bytes) drops:330131

Hope this helps,

Amadeus