xref: /freebsd/share/examples/pf/queue1 (revision 42a227f8baec1d2627cec5c2010aedb78f7e9b28)
19d7ccc0fSMax Laier# $FreeBSD$
242a227f8SMax Laier# $OpenBSD: queue1,v 1.4 2006/10/07 04:48:01 mcbride Exp $
39d7ccc0fSMax Laier
49d7ccc0fSMax Laierext_if = "dc0"
59d7ccc0fSMax Laier
69d7ccc0fSMax Laieraltq on $ext_if cbq bandwidth 10Mb \
79d7ccc0fSMax Laier    queue { deflt, http, ssh, mail, rsets }
89d7ccc0fSMax Laierqueue	deflt bandwidth 10% priority 0 cbq(default ecn)
99d7ccc0fSMax Laierqueue	http bandwidth 1.5Mb priority 3 { http_vhosts, http_cust1 }
109d7ccc0fSMax Laierqueue	 http_vhosts bandwidth 40% cbq(borrow red)
119d7ccc0fSMax Laierqueue	 http_cust1 bandwidth 0.5Mb
129d7ccc0fSMax Laierqueue	mail bandwidth 10% priority 1
139d7ccc0fSMax Laierqueue	ssh bandwidth 100Kb priority 7 cbq(borrow)
149d7ccc0fSMax Laierqueue	rsets bandwidth 7500b priority 0 cbq(red)
159d7ccc0fSMax Laier
169d7ccc0fSMax Laierblock return in on $ext_if inet all queue rsets
1742a227f8SMax Laierpass in on $ext_if inet proto tcp from any to any port 80 queue http
1842a227f8SMax Laierpass out on $ext_if inet proto tcp from any to any port 22 queue ssh
1942a227f8SMax Laierpass in  on $ext_if inet proto tcp from any to any port 22 queue ssh
2042a227f8SMax Laierpass out on $ext_if inet proto tcp from any to any port 25 queue mail
2142a227f8SMax Laierpass out on $ext_if inet all
22