1272343Sngie# $FreeBSD: releng/11.0/share/examples/pf/queue2 173536 2007-11-11 01:16:51Z mlaier $ 2272343Sngie# $OpenBSD: queue2,v 1.4 2006/10/07 04:48:01 mcbride Exp $ 3272343Sngie# advanced queue example. 4272343Sngie# give interactive ssh traffic priority over ssh bulk transfers (scp, sftp) 5272343Sngie 6272343Sngieext_if="dc0" 7272343Sngiedeveloperhosts="192.168.2.0/24" 8272343Sngieemployeehosts="192.168.0.0/23" 9272343Sngie 10272343Sngiealtq on $ext_if cbq bandwidth 5Mb queue { std, http, mail, ssh } 11272343Sngie 12272343Sngiequeue std bandwidth 10% cbq(default) 13272343Sngiequeue http bandwidth 60% priority 2 cbq(borrow red) { employees, developers } 14272343Sngiequeue developers bandwidth 75% cbq(borrow) 15272343Sngiequeue employees bandwidth 15% 16272343Sngiequeue mail bandwidth 10% priority 0 cbq(borrow ecn) 17272343Sngiequeue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk } 18272343Sngiequeue ssh_interactive bandwidth 25% priority 7 19272343Sngiequeue ssh_bulk bandwidth 75% priority 0 20272343Sngie 21272343Sngieblock return out on $ext_if inet all queue std 22272343Sngiepass out on $ext_if inet proto tcp from $developerhosts to any port 80 \ 23272343Sngie queue developers 24272343Sngiepass out on $ext_if inet proto tcp from $employeehosts to any port 80 \ 25272343Sngie queue employees 26272343Sngiepass out on $ext_if inet proto tcp from any to any port 22 \ 27272343Sngie queue(ssh_bulk, ssh_interactive) 28272343Sngiepass out on $ext_if inet proto tcp from any to any port 25 \ 29272343Sngie queue mail 30272343Sngie