example swiped from unix.se:
altq on $ext_if cbq bandwidth 640Kb queue { def, ftp, udp, \ http, ssh, icmp } queue def bandwidth 18% cbq(default borrow red) queue ftp bandwidth 10% cbq(borrow red) queue udp bandwidth 30% cbq(borrow red) queue http bandwidth 20% cbq(borrow red) queue ssh bandwidth 20% cbq(borrow red) { ssh_interactive, \ ssh_bulk } queue ssh_interactive priority 7 bandwidth 20% queue ssh_bulk priority 0 bandwidth 80% queue icmp bandwidth 2% cbq pass log quick on $ext_if proto tcp to port ssh \ queue (ssh_bulk, ssh_interactive) pass in quick on $ext_if proto tcp to port ftp queue ftp pass in quick on $ext_if proto tcp to port www queue http pass out on $ext_if proto udp all queue udp pass out on $ext_if proto icmp all queue icmp