]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/examples/pf/queue2
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / examples / pf / queue2
1 # $FreeBSD$
2 # $OpenBSD: queue2,v 1.4 2006/10/07 04:48:01 mcbride Exp $
3 # advanced queue example.
4 # give interactive ssh traffic priority over ssh bulk transfers (scp, sftp)
5
6 ext_if="dc0"
7 developerhosts="192.168.2.0/24"
8 employeehosts="192.168.0.0/23"
9
10 altq on $ext_if cbq bandwidth 5Mb queue { std, http, mail, ssh }
11
12 queue std bandwidth 10% cbq(default)
13 queue http bandwidth 60% priority 2 cbq(borrow red) { employees, developers }
14 queue  developers bandwidth 75% cbq(borrow)
15 queue  employees bandwidth 15%
16 queue mail bandwidth 10% priority 0 cbq(borrow ecn)
17 queue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk }
18 queue  ssh_interactive bandwidth 25% priority 7
19 queue  ssh_bulk bandwidth 75% priority 0
20
21 block return out on $ext_if inet all queue std
22 pass out on $ext_if inet proto tcp from $developerhosts to any port 80 \
23     queue developers
24 pass out on $ext_if inet proto tcp from $employeehosts to any port 80 \
25     queue employees
26 pass out on $ext_if inet proto tcp from any to any port 22 \
27     queue(ssh_bulk, ssh_interactive)
28 pass out on $ext_if inet proto tcp from any to any port 25 \
29     queue mail