1*fff57c55Syamt# $NetBSD: queue2,v 1.2 2008/06/18 09:06:26 yamt Exp $ 2*fff57c55Syamt# $OpenBSD: queue2,v 1.4 2006/10/07 04:48:01 mcbride Exp $ 3533d14a1Syamt# advanced queue example. 4533d14a1Syamt# give interactive ssh traffic priority over ssh bulk transfers (scp, sftp) 5533d14a1Syamt 6533d14a1Syamtext_if="dc0" 7533d14a1Syamtdeveloperhosts="192.168.2.0/24" 8533d14a1Syamtemployeehosts="192.168.0.0/23" 9533d14a1Syamt 10533d14a1Syamtaltq on $ext_if cbq bandwidth 5Mb queue { std, http, mail, ssh } 11533d14a1Syamt 12533d14a1Syamtqueue std bandwidth 10% cbq(default) 13533d14a1Syamtqueue http bandwidth 60% priority 2 cbq(borrow red) { employees, developers } 14533d14a1Syamtqueue developers bandwidth 75% cbq(borrow) 15533d14a1Syamtqueue employees bandwidth 15% 16533d14a1Syamtqueue mail bandwidth 10% priority 0 cbq(borrow ecn) 17533d14a1Syamtqueue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk } 18*fff57c55Syamtqueue ssh_interactive bandwidth 25% priority 7 19*fff57c55Syamtqueue ssh_bulk bandwidth 75% priority 0 20533d14a1Syamt 21533d14a1Syamtblock return out on $ext_if inet all queue std 22533d14a1Syamtpass out on $ext_if inet proto tcp from $developerhosts to any port 80 \ 23*fff57c55Syamt queue developers 24533d14a1Syamtpass out on $ext_if inet proto tcp from $employeehosts to any port 80 \ 25*fff57c55Syamt queue employees 26533d14a1Syamtpass out on $ext_if inet proto tcp from any to any port 22 \ 27*fff57c55Syamt queue(ssh_bulk, ssh_interactive) 28533d14a1Syamtpass out on $ext_if inet proto tcp from any to any port 25 \ 29*fff57c55Syamt queue mail 30