summaryrefslogtreecommitdiffstats
path: root/shaper
diff options
context:
space:
mode:
authorRaghavendra D Prabhu <rprabhu@wnohang.net>2011-07-16 23:11:17 +0530
committerRaghavendra D Prabhu <rprabhu@wnohang.net>2011-07-16 23:11:17 +0530
commit56d848c248199f02521e293f0568dbeac5185097 (patch)
tree430b777dfe67dc31647f0d1cf186a98017a49278 /shaper
parent806e6210978606d89e3af70eb10d90351b3ea488 (diff)
downloadScripts-56d848c248199f02521e293f0568dbeac5185097.tar.gz
Scripts-56d848c248199f02521e293f0568dbeac5185097.tar.bz2
Scripts-56d848c248199f02521e293f0568dbeac5185097.zip
Scripts update
Diffstat (limited to 'shaper')
-rwxr-xr-xshaper19
1 files changed, 12 insertions, 7 deletions
diff --git a/shaper b/shaper
index 6600901..3338843 100755
--- a/shaper
+++ b/shaper
@@ -1,11 +1,14 @@
#!/bin/bash
-
+#exit
# The Ultimate Setup For Your Internet Connection At Home
+#tc qdisc add dev eth0 root handle 1: sfb
+#tc qdisc add dev eth0 handle 2: parent 1: prio
+# exit
#
#
# Set the following values to somewhat less than your actual download
# and uplink speed. In kilobits
-DOWNLINK=1920
+DOWNLINK=2400
UPLINK=490
DEV=eth0
@@ -36,8 +39,10 @@ tc class add dev $DEV parent 1:1 classid 1:20 htb rate $[9*$UPLINK/10]kbit \
burst 6k prio 2
# both get Stochastic Fairness:
-tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
-tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10
+#tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
+#tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10
+tc qdisc add dev $DEV parent 1:10 handle 10: sfb
+tc qdisc add dev $DEV parent 1:20 handle 20: sfb
# TOS Minimum Delay (ssh, NOT scp) in 1:10:
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
@@ -68,10 +73,10 @@ tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
#
# attach ingress policer:
-tc qdisc add dev $DEV handle ffff: ingress
+#tc qdisc add dev $DEV handle ffff: ingress
# filter *everything* to it (0.0.0.0/0), drop everything that's
# coming in too fast:
-tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \
- 0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1
+#tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \
+# 0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1