summaryrefslogtreecommitdiff
path: root/polux/application/iproute2/examples/sarft/dba10to20
diff options
context:
space:
mode:
Diffstat (limited to 'polux/application/iproute2/examples/sarft/dba10to20')
-rwxr-xr-xpolux/application/iproute2/examples/sarft/dba10to2035
1 files changed, 35 insertions, 0 deletions
diff --git a/polux/application/iproute2/examples/sarft/dba10to20 b/polux/application/iproute2/examples/sarft/dba10to20
new file mode 100755
index 0000000000..b5c7a6e601
--- /dev/null
+++ b/polux/application/iproute2/examples/sarft/dba10to20
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+#changes added to previous dba test:
+#TBF qdisc as root for good limitation
+#HBT qdisc kept for good shaping
+
+#these two lines erase previous queueing disciplines and ebtables
+tc qdisc del dev plc0 root handle 10:
+ebtables --init-table
+
+#root qdisc
+tc qdisc add dev plc0 root handle 10: tbf rate 30Mbit buffer 40k limit 40k
+
+#htb added to root tbf discipline
+tc qdisc add dev plc0 parent 10:0 handle 20: htb
+
+#htb qdisc has one "root" class
+tc class add dev plc0 parent 20:0 classid 20:1 htb rate 30Mbit ceil 30Mbit burst 30k
+
+#htb 20:1 class has to leafs 20:2 and 20:3 which cat borrow from eachother
+#important is choice of burst for 20:2 class,it is chosen to keep low bandwidth rate
+#class 20:2 is the one whose precise limitation is important
+tc class add dev plc0 parent 20:1 classid 20:2 htb rate 10Mbit ceil 20Mbit burst 4.2k
+tc class add dev plc0 parent 20:1 classid 20:3 htb rate 20Mbit ceil 30Mbit burst 30k
+
+
+tc filter add dev plc0 parent 20: protocol all handle 1 fw flowid 20:2
+tc filter add dev plc0 parent 20: protocol all handle 2 fw flowid 20:3
+
+#Traffic of one slave is put in class 20:2, it is makred 1. It is connected to tc filter by
+# handle 1. Traffic of other two(or everybody else) is put in 20:3 and they are marked 2.
+#Since test is made for testing with smartbit, mac address in next line is one of the
+#smartbit ports
+ebtables -A FORWARD -d 00:00:00:00:00:02 -j mark --set-mark 1 --mark-target ACCEPT
+ebtables -A FORWARD -j mark --set-mark 2 --mark-target ACCEPT \ No newline at end of file