#test matching on tos; test queue rules which specify qlimit, test altq rule #with tbrsize specification, test queue rules which do not specify bandwidth, #test queue rule which doesn't specify anything #test altq rule with qlimit spec intf = "lo0" developerhosts="10.0.0.0/24" employeehosts="10.0.1.0/24" altq on $intf cbq(ecn) bandwidth 10Mb qlimit 100 tbrsize 5000 \ queue { std, http, mail, ssh } oldqueue std bandwidth 10% qlimit 1 cbq(default) oldqueue http bandwidth 60% priority 2 cbq(borrow red) { employees, developers } oldqueue developers bandwidth 60% oldqueue employees bandwidth 40% oldqueue mail bandwidth 10% priority 0 cbq(borrow ecn) oldqueue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk } oldqueue ssh_interactive priority 7 bandwidth 30% oldqueue ssh_bulk priority 0 qlimit 60 bandwidth 70% block return out on $intf inet all queue std pass out on $intf inet proto tcp from $developerhosts to any port 80 keep state \ queue developers pass out on $intf inet proto tcp from $employeehosts to any port 80 keep state \ queue employees pass out on $intf inet proto tcp from any to any port 22 tos 0x10 \ keep state queue ssh_interactive #priority for interactive sessions pass out on $intf inet proto tcp from any to any port 22 tos 0x08 \ keep state queue ssh_bulk #less priority for scp/sftp/... pass out on $intf inet proto tcp from any to any port 25 keep state queue mail