Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Vorhergehende ÜberarbeitungLetzte Überarbeitung | |||
— | traffic_shaping [2013/10/05 23:15] – mwarning | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | Demnächst soll auf den Routern sogenanntes Traffic shaping ermöglicht werden. | ||
+ | Also das der Traffic aus dem Freifunknetz die eigene Leitung nicht blockiert. | ||
+ | |||
+ | Hier ist ein ungestestetes Script. Es nimmt an das der Anschluss 100MBit/s hat | ||
+ | und limitiert den Upload auf 500KBit/s für fastd. | ||
+ | Btw., nur Upload kann wirlich reguliert werden. Download kommt daher nirgends vor. | ||
+ | |||
+ | Note: Ein Image mit tc scheint ständig neuzustarten. TODO :-) Im failsafe gibt mount_root: "jffs2 not ready yet; using ramdisk" | ||
+ | |||
+ | Zusätzliche Informationen gibt es hier: | ||
+ | http:// | ||
+ | |||
+ | #!/bin/sh | ||
+ | tc=/sbin/tc | ||
+ | wan=" | ||
+ | fastd_port=1234 | ||
+ | |||
+ | #Cleaning up | ||
+ | $tc qdisc del dev $wan root handle 1: > /dev/null 2>&1 | ||
+ | | ||
+ | #Add the root handle, setting the default leaf | ||
+ | $tc qdisc add dev $wan root handle 1: htb default 5 | ||
+ | | ||
+ | #Set the basic speed of the device | ||
+ | $tc class add dev $wan parent 1: classid 1:1 htb rate 100mbit ceil 100mbit | ||
+ | | ||
+ | #Set up the two leaves (default and fastd) | ||
+ | $tc class add dev $wan parent 1:1 classid 1:4 htb rate 80mbit ceil 100mbit prio 1 | ||
+ | $tc class add dev $wan parent 1:1 classid 1:5 htb rate 500kbit ceil 100mbit | ||
+ | | ||
+ | #Add SFQ queueing disciplines | ||
+ | $tc qdisc add dev $wan parent 1:4 handle 4: sfq perturb 10 | ||
+ | $tc qdisc add dev $wan parent 1:5 handle 5: sfq perturb 10 | ||
+ | | ||
+ | #prioritize traffic | ||
+ | $tc filter add dev $wan protocol ip parent 1:0 prio 1 u32 match ip sport $fastd_port 0xffff flowid 1:4 | ||