[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ALTQ help



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
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