14
14
# High Normal Low [Priority classes are named 1:(HOST_BUCKET * 100 + 1)]
15
15
# |
16
16
# Flow Bucket 1 .. NUM_FLOW_BUCKETS [Flow QDiscs are named (HOST_BUCKET * 100 + 1 + 1):0]
17
- #
17
+ #
18
18
# The 0->NUM_FLOW_BUCKETS exist under every high, normal and low class.
19
19
#
20
20
# Yes, the class and QDisc naming is confusing and there are probably bugs
24
24
# Config
25
25
# ###
26
26
27
- TC=" /usr/local/sbin/tc"
27
+ # TC="/usr/local/sbin/tc"
28
+ TC=` which tc`
28
29
29
30
DEVICE=" ppp0"
30
31
@@ -91,20 +92,20 @@ MTU="1456"
91
92
# For 5-tuple (flow) fairness use
92
93
# FLOW_KEYS="src,dst,proto,proto-src,proto-dst"
93
94
# For 5-tuple (flow) fairness with NAT use
94
- # FLOW_KEYS="nfct-src,nfct-dst,nfct-proto,nfct-proto-src,nfct-proto-dst"
95
+ FLOW_KEYS=" nfct-src,nfct-dst,nfct-proto,nfct-proto-src,nfct-proto-dst"
95
96
# For 5-tuple (flow) fairness with IPIP IPIPv6, IPv6IP, IPv6IPv6 tunnels (no NAT) use
96
97
# This requires my recent patch to the flow classifier.
97
- FLOW_KEYS=" src,dst,proto,proto-src,proto-dst,tunnel-src,tunnel-dst,proto,tunnel-proto-src,tunnel-proto-dst"
98
+ # FLOW_KEYS="src,dst,proto,proto-src,proto-dst,tunnel-src,tunnel-dst,proto,tunnel-proto-src,tunnel-proto-dst"
98
99
99
100
# ###
100
101
# The keys that are used to identify a host's traffic.
101
102
# ###
102
103
# No NAT
103
104
# HOST_KEYS="src"
104
105
# With NAT
105
- # HOST_KEYS="nfct-src"
106
+ HOST_KEYS=" nfct-src"
106
107
# With IPIP IPIPv6, IPv6IP, IPv6IPv6 tunnels (no NAT)
107
- HOST_KEYS=" src,tunnel-src"
108
+ # HOST_KEYS="src,tunnel-src"
108
109
109
110
# Set R2Q (HTB knob) low because of the low bitrates.
110
111
# If your rates aren't low you might not need this. Remove it from the
@@ -208,7 +209,7 @@ for HOST_NUM in `seq ${NUM_HOST_BUCKETS}`; do
208
209
tc class add dev ${DEVICE} parent 1:1 classid 1:${QID} htb rate ${DIV_RATE} kbit ceil ${RATE} kbit prio 0 linklayer ${LINKLAYER} overhead ${OVERHEAD}
209
210
210
211
# ##
211
- # Within each host bucket add three classes, high, normal and low priority.
212
+ # Within each host bucket add three sub- classes, high, normal and low priority.
212
213
# Priority classes are named 1:[HOST_BUCKET * 100 + 1]
213
214
# ##
214
215
QID_1=` expr $QID ' *' 100 + 1`
@@ -255,7 +256,7 @@ for HOST_NUM in `seq ${NUM_HOST_BUCKETS}`; do
255
256
# R= Reliability bit
256
257
#
257
258
# OpenSSH terminal sets D.
258
- # OpenSSH SCP sets T.
259
+ # OpenSSH SCP/SFTP sets T.
259
260
# It's easy to configure the Transmission Bittorrent client to set T (settings.json).
260
261
# For home VoIP devices use an Iptables rule to set all of their traffic to have D.
261
262
#
@@ -267,14 +268,14 @@ for HOST_NUM in `seq ${NUM_HOST_BUCKETS}`; do
267
268
# D bit set.
268
269
tc filter add dev ${DEVICE} parent 1:${QID} protocol ip prio 10 u32 match ip tos 0x10 0x1c flowid 1:${QID_1}
269
270
270
- # T bit set.
271
- tc filter add dev ${DEVICE} parent 1:${QID} protocol ip prio 10 u32 match ip tos 0x08 0x1c flowid 1:${QID_3}
272
-
273
271
# Diffserv expedited forwarding. Put this in the high priority class.
274
272
# Some VoIP clients set this (ie Ekiga).
275
273
# DSCP=b8
276
274
tc filter add dev ${DEVICE} parent 1:${QID} protocol ip prio 10 u32 match ip tos 0xb8 0xfc flowid 1:${QID_1}
277
275
276
+ # T bit set.
277
+ tc filter add dev ${DEVICE} parent 1:${QID} protocol ip prio 10 u32 match ip tos 0x08 0x1c flowid 1:${QID_3}
278
+
278
279
# Everything else into default.
279
280
tc filter add dev ${DEVICE} parent 1:${QID} protocol ip prio 10 u32 match ip tos 0x00 0x00 flowid 1:${QID_2}
280
281
done
0 commit comments