blob: de12cfcd2c7b729f0345b2bcc9bca74fff608e87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#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 }
queue std bandwidth 10% qlimit 1 cbq(default)
queue http bandwidth 60% priority 2 cbq(borrow red) { employees, developers }
queue developers bandwidth 60%
queue employees bandwidth 40%
queue mail bandwidth 10% priority 0 cbq(borrow ecn)
queue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk }
queue ssh_interactive priority 7 bandwidth 30%
queue 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
|