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