summaryrefslogtreecommitdiff
path: root/polux/application/iproute2/examples/sarft/comb
diff options
context:
space:
mode:
authorJean-Philippe SAVE2012-02-20 16:38:56 +0100
committerJean-Philippe SAVE2012-02-20 16:38:56 +0100
commit55a15cc820e926219ebce47218ce1e2f35bb0c48 (patch)
treedba3ff39a766e47859ab7fd837d8da5d30b56b1f /polux/application/iproute2/examples/sarft/comb
parent1353d3215782b997fdec3f9182cbda547d92d7e9 (diff)
parentcfc4d43d4d19c398d994b75cb1eeda3c499bd234 (diff)
Add polux base by subtree merge
Diffstat (limited to 'polux/application/iproute2/examples/sarft/comb')
-rwxr-xr-xpolux/application/iproute2/examples/sarft/comb24
1 files changed, 24 insertions, 0 deletions
diff --git a/polux/application/iproute2/examples/sarft/comb b/polux/application/iproute2/examples/sarft/comb
new file mode 100755
index 0000000000..5337d68eb4
--- /dev/null
+++ b/polux/application/iproute2/examples/sarft/comb
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Set the token bucket filter at the root of the tree
+# to allow bandwidth limiting
+tc qdisc add dev plc0 root handle 1: tbf rate 50Mbit burst 200k limit 80000
+# use PRIO qdisc to create two classes where no traffic
+# will be sent from class 2 as long as there is still traffic in class 1
+# PRIO qdisc with 2 bands
+tc qdisc add dev plc0 parent 1: handle 11: prio bands 2 priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+
+tc qdisc add dev plc0 parent 11:1 handle 111: pfifo
+tc qdisc add dev plc0 parent 11:2 handle 112: htb r2q 3
+
+# prioritize rest of the traffic with HTB
+tc class add dev plc0 parent 112: classid 112:1 htb rate 40Mbit burst 200k
+
+tc class add dev plc0 parent 112:1 classid 112:10 htb rate 4Mbit ceil 4Mbit burst 20k prio 1
+tc class add dev plc0 parent 112:1 classid 112:11 htb rate 36Mbit ceil 36Mbit burst 180k prio 2
+
+tc qdisc add dev plc0 parent 112:10 handle 11210 sfq perturb 10
+tc qdisc add dev plc0 parent 112:11 handle 11211 sfq perturb 10
+#match udp destination ports 5000,5001 & 5002
+tc filter add dev plc0 parent 11: prio 1 protocol ip u32 match u16 0x1388 0xffff at nexthdr+2 flowid 11:1
+tc filter add dev plc0 parent 112: prio 10 protocol ip u32 match u16 0x1389 0xffff at nexthdr+2 flowid 112:11
+tc filter add dev plc0 parent 112: prio 3 protocol ip u32 match u16 0x138a 0xffff at nexthdr+2 flowid 112:10