[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-pf
Subject:    Re: ALTQ help
From:       Kimi Ostro <kimimeister () gmail ! com>
Date:       2005-04-20 12:38:24
Message-ID: 42b497160504200538180491ed () mail ! gmail ! com
[Download RAW message or body]

On 4/20/05, Steven Bowers <steveb7@gmail.com> wrote:
> This is my first time trying to setup some rules for queueing and I
> could use some assistance. I've gone through the PF FAQ and  I think I
> have a bit of a grasp on it, but I'm not quite there yet. The relevant
> portions of my config are shown below. The goals I'm trying to
> accomplish with ALTQ are this:
> 
> 1. VoIP traffic takes priority over wire_if and wlan_if traffic.
> 2. Traffic on wire_if takes priority over wlan_if
> 3. wlan_if can borrow or use more bandwidth, only if it is available.
> 
> I have setup a second nic and attached it to an AP. It is acting as a
> wireless hot-spot here in my apartment complex. However I use VoIP to
> communicate to the office and need traffic originating from my wired
> LAN to be prioritized over any bandwidth my neighbors are using at the
> same time. If posible I'd like to incorporate Daniel Hartmeier's ACK
> prioritization scheme into the rules.
> 
> ## Interfaces##########
> ext_if   = "fxp0"
> wire_if  = "fxp1"
> wlan_if  = "fxp2"
> 
> external_addr   = "x.x.x.x"
> wire_network    = "192.168.1.0/24"
> wire_gw         = "192.168.1.1/32"
> wlan_network    = "192.168.2.0/24"
> wlan_gw         = "192.168.2.1/32"
> 
> voip_tcp      = "5060"
> voip_udp      = "{ 5060, 4569, 5036, 9999 >< 20001, 2727 }"
> wlan_svcs     = "{ domain, pop3, ssh, www, https }"
> 
> ## Queueing Rules #####
> altq on fxp0 priq bandwidth 800Kb queue { std_out, voip_out, lan_out,
> tcp_ack_out }
> 
> # queue definitions
> # std_out     - standard queue for all but below
> # voip_out    - VoIP traffic (primarily from LAN)
> # lan_out     - personal LAN traffic
> # tcp_ack_out - TCP ACK packets with no data payload
> 
> queue std_out     priq(default)
> queue voip_out    priority 4
> queue lan_out     priority 5 priq(red)
> queue tcp_ack_out priority 6
> 

read pf.conf(5) again.

try:
altq on fxp0 priq bandwidth 800Kb queue { tcp_ack_out, voip_out,
lan_out, std_out }

queue tcp_ack_out priority 7
queue voip_out priority 5
queue lan_out priority 2 priq(red)
queue std_out priq(default)

In this definition, any packet will be in std_out queue by default,
any packet in lan_out queue will have a higher priority then std_out,
any packet in voip_out queue will have a higher priority then lan_out,
any packet in tcp_ack_out queue will have a higher priority then
voip_out.

All you need to do is type out the correct pass rules.

something like:

pass out on $ext_if ... queue ( std_out, tcp_ack_out )

> altq on fxp1 cbq bandwidth 1.2Mb queue { std_in, int_voip }
> queue std_in   bandwidth 1.2Mb cbq(default)
> queue voip_in  bandwidth 256Kb cbq(borrow ecn)
> 
> altq on fxp2 cbq bandwidth 1.2Mb queue { std_in }
> queue wlan_in bandwidth 256Kb cbq
> 

Regards

-- 
Kimi
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic