Annotation of src/share/pf/queue2, Revision 1.2
1.2 ! henning 1: # $OpenBSD$
1.1 henning 2: # advanced queue example.
3: # give interactive ssh traffic priority over ssh bulk transfers (scp, sftp)
4:
5: ext_if="dc0"
6: developerhosts="192.168.2.0/24"
7: employeehosts="192.168.0.0/23"
8:
9: altq on $ext_if cbq bandwidth 5Mb queue { std, http, mail, ssh }
10:
11: queue std bandwidth 10% cbq(default)
12: queue http bandwidth 60% priority 2 cbq(borrow red) { employees, developers }
13: queue developers bandwidth 75% cbq(borrow)
14: queue employees bandwidth 15%
15: queue mail bandwidth 10% priority 0 cbq(borrow ecn)
16: queue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk }
17: queue ssh_interactive priority 7
18: queue ssh_bulk priority 0
19:
20: block return out on $ext_if inet all queue std
21: pass out on $ext_if inet proto tcp from $developerhosts to any port 80 \
22: keep state queue developers
23: pass out on $ext_if inet proto tcp from $employeehosts to any port 80 \
24: keep state queue employees
25: pass out on $ext_if inet proto tcp from any to any port 22 \
26: keep state queue(ssh_bulk, ssh_interactive)
27: pass out on $ext_if inet proto tcp from any to any port 25 \
28: keep state queue mail