jablonka.czprosek.czf

qos

Subversion Repositories:
[/] [trunk/] [qos] - Blame information for rev 30

 

Line No. Rev Author Line
12simandl#!/bin/sh
2#
3# CZFree.Net RFC-QoS script
4#
526simandl# date: 30/06/2008
628simandl# authors: Rakerihoo, Fyzik, Libor, Dzus, Bonez, Simandl, Danny, Sinda
72simandl# references: http://www.lartc.org/
8# http://luxik.cdi.cz/~devik/qos/htb/
928simandl# http://connected.prosek.czf/forum/showthread.php?s=&threadid=9
1013simandl# http://www.simandl.cz/stranky/linux/qos/soubory/qos_base
114simandl# version: 2.1.6
1229simandl# ps ver : 0.1.9
132simandl#
14# Changelog
15#
1630simandl# 04/11/08 [simandl] podpora pro hry "Battlefield" a "Call of Duty"
1729simandl# 13/10/08 [simandl] podpora pro hru "Warhammer Online"
1828simandl# 28/09/08 [simandl] doplneni chybejicich autoru a zmena v references 10.24.1.2 na connected.prosek.czf
1927simandl# 05/08/08 [simandl] podpora pro Americas Army
2026simandl# 30/06/08 [simandl] podpora pro L2TP port 1701 UDP
2125simandl# 09/03/08 [simandl] podpora pro noncontrib
2223simandl# 01/12/07 [simandl] doplnena podpora pro hru "World Of Warcraft" 8085 3724
2319simandl# 09/08/07 [sinda] doplnena podpora pro hru "Counter-Strike Source" UDP 270xx
2418simandl# 26/07/07 [sinda] doplnena podpora pro RTP ha-vel.cz a 802.cz dle ip adresy rtp serveru operatora
2515simandl# 31/08/06 [simandl] doplnena podpora pro definici rychlosti a delitelu pro kazdy iface zvlast v souboru iface_conf
2614simandl# 14/07/06 [sinda] doplneny porty pro hru Quake 3 arena
2713simandl# 17/01/06 [simandl] doplneny TOSy pro ha-vel a hlas.802.cz do VoIP tridy 50
28# 12/12/05 [simandl] preskupeny protokoly trid - 40 mail&data 50 voip 60 web&squid - tak aby byly rovnomerne vyuzite
2910simandl# 23/11/05 [simandl] doplneny porty pro Lineage2 a Teamspeak
309simandl# 22/11/05 [danny] DSCP/ToS filtry pro SIP/RTP (VoIP), maximum reliability [DEV]
318simandl# 20/11/05 [simandl] doplnen port pro RTP
326simandl# 14/11/05 [simandl] doplneny porty pro SIP a gnomemeeting
335simandl# 08/11/05 [simandl] doplneny porty pro H.323
34# 19/08/05 [simandl] doplneny porty pro hru DarkEden
354simandl# 30/10/04 [dzus] oprava parseru MTU, vylepseni kontroly konfig. souboru
36# 27/10/04 [bonez] OpenVPN pridano do data transfer class
37# 05/06/04 [dzus] do interactive class pridan BZFlag, uprava parseru konfig souboru
382simandl# 18/02/04 [dzus] SCP zarazeno do download class (rozliseno podle TOS maximize throughput)
39# 04/01/04 [dzus] podpora pro Jedi Knight, oprava prio u filtru, oprava filtru na FTP, zruseni PPTP class
40# 20/11/03 [dzus] zrusena H323 class, pridan filtr na TCP ACK, nastaveni quantum podle MTU
41# 28/09/03 [dzus] oprava bugu ve filtrech (bez prio to nechodi dobre)
42# 27/09/03 [dzus] konfigurace interfacu se nacita z ext souboru, pridan TOS minimize delay filtr
43# 20/09/03 [dzus] vyhazeni marku z IPtables, nyni pouze filtry v tc
44# 01/09/03 [dzus] vynechani internetoveho rozhrani z konfigurace
45# 07/08/03 [fyzik] preference Inetoveho traffiku
46# 31/07/03 [fyzik] podpora pro HL@tchor, airfree, fixes
47# 05/05/03 [fyzik] podpora pro IRC, PPTP, H323, LDAP, DC, NTP
48# 04/05/03 [fyzik] napsal uvod
49# 01/05/03 [fyzik] non-CZF-RFC, inspirovan Liborovym Heaven QoS
50# 00/03/03 [Rakerihoo] napsal RFC-QoS :)
51#
52# ToDo
53# * zkusit a otestovat podtridy CZF-transfer, CZF-klient, CZF-shared a markovanat podle MAC
54# * pridat podporu ostatnich interaktivnich games
55 
56 
57### Configuration START
58 
5921simandlIFACECONFFILE='/etc/qos/iface_conf'
60IPADDRFILE="/etc/qos/ip_adresy"
612simandl 
6215simandl#default speeds and dividers
63DNONCZFSPD='64'
6425simandlDNONCONTRIBSPD='64'
6518simandlDAIRFREESPD='2048'
6615simandlDSSHDIV='2'
67DPINGDIV='2'
68DINTERACTDIV='2'
69DVOIPDIV='2'
70DWWWDIV='2'
71DXFERDIV='4'
72DDFLTDIV='8'
7313simandl 
742simandl### Configuration STOP
75 
76if [ ! -f $IFACECONFFILE ]
77then
78 echo "Interface configuration file doesn't exist - program terminated" 1>&2
79 exit 1
80fi
81 
824simandlIFACECONF=`grep -v '^[[:space:]]*#' $IFACECONFFILE`
83IFACECONF=`echo $IFACECONF | sed -e 's/[[:space:]]*}[[:space:]]*/}\\\n/g'`
84FACES=`echo -e $IFACECONF | sed -e 's/^[[:space:]]*interface[[:space:]]\+\([[:alnum:]]\+\).*/\1/;t;d'`
852simandl 
86echo "Applying CZF-QOS rules"
87 
88echo "-Set global variables"
89IPTABLES="`which iptables`"
90TC="`which tc`"
91IP="`which ip`"
92IPT_RESTORE="`which iptables-restore`"
93 
94STOCHASIS="sfq perturb 10"
95 
96QUANTUMOFFS="500"
97 
98#$IPT_RESTORE < /etc/network/iptables
99 
100echo "-Remove Qdisc root classes"
101for FACE in ${FACES} ; do
102 $TC qdisc del dev ${FACE} root &>/dev/null
10315simandl#echo $FACE
1042simandldone
105 
106## qoseni podle IP - priklad
107if [ -f $IPADDRFILE ]
108then
1094simandl NONCZF="`sed -e 's/^[[:space:]]*\([[:digit:].,/]\+\)[[:space:]].*NONCZF[[:space:]]*\+/\1/;t repl;d;: repl;y/,/ /' $IPADDRFILE`"
110 NONCZF="$NONCZF `sed -e 's/^.*[[:space:]]\+NONCZF[[:space:]]\+\([[:digit:].,/]\+\)[[:space:]]*/\1/;t repl;d;: repl;y/,/ /' $IPADDRFILE`"
11125simandl NONCONTRIB="`sed -e 's/^[[:space:]]*\([[:digit:].,/]\+\)[[:space:]].*NONCONTRIB[[:space:]]*\+/\1/;t repl;d;: repl;y/,/ /' $IPADDRFILE`"
112 NONCONTRIB="$NONCONTRIB `sed -e 's/^.*[[:space:]]\+NONCONTRIB[[:space:]]\+\([[:digit:].,/]\+\)[[:space:]]*/\1/;t repl;d;: repl;y/,/ /' $IPADDRFILE`"
1134simandl AIRFREE="`sed -e 's/^[[:space:]]*\([[:digit:].,/]\+\)[[:space:]].*AIRFREE[[:space:]]*\+/\1/;t repl;d;: repl;y/,/ /' $IPADDRFILE`"
114 AIRFREE="$AIRFREE `sed -e 's/^.*[[:space:]]\+AIRFREE[[:space:]]\+\([[:digit:].,/]\+\)[[:space:]]*/\1/;t repl;d;: repl;y/,/ /' $IPADDRFILE`"
1152simandlfi
116 
117set_qos_classes () {
118 echo "-Initializing QoS_base rules on interface $FACE (speed $SPEED)"
119 
120 $TC qdisc add dev ${FACE} root handle 1: htb default 300 r2q 2
121 $TC class add dev ${FACE} parent 1: classid 1:1 htb rate $((${SPEED}/2))kbit ceil ${SPEED}kbit burst 15k quantum ${QUANTUM}
12214simandl $TC class add dev ${FACE} parent 1:1 classid 1:5 htb rate 64kbit ceil $((${SPEED}/${SSHDIV}))kbit burst 5k prio 0 # SSH class
123 $TC class add dev ${FACE} parent 1:1 classid 1:10 htb rate 64kbit ceil $((${SPEED}/${INTERACTDIV}))kbit burst 5k prio 1 # interactive class
124 $TC class add dev ${FACE} parent 1:1 classid 1:20 htb rate 32kbit ceil $((${SPEED}/${PINGDIV}))kbit burst 5k prio 0
125 $TC class add dev ${FACE} parent 1:1 classid 1:30 htb rate 32kbit ceil 128kbit burst 5k prio 0 # routing class
12613simandl $TC class add dev ${FACE} parent 1:1 classid 1:40 htb rate 32kbit ceil $((${SPEED}/${XFERDIV}))kbit burst 5k prio 4 # email & data transfer class
127 $TC class add dev ${FACE} parent 1:1 classid 1:50 htb rate 32kbit ceil $((${SPEED}/${VOIPDIV}))kbit burst 5k prio 1 # voip class
128 $TC class add dev ${FACE} parent 1:1 classid 1:60 htb rate 32kbit ceil $((${SPEED}/${WWWDIV}))kbit burst 8k prio 3 # web & squid class
129 $TC class add dev ${FACE} parent 1:1 classid 1:300 htb rate 32kbit ceil $((${SPEED}/${DFLTDIV}))kbit burst 1k prio 5 # default trafic class
1302simandl $TC class add dev ${FACE} parent 1:1 classid 1:666 htb rate 32kbit ceil ${NONCZFSPD}kbit burst 1k prio 5 # unsupported trafic class
131 $TC class add dev ${FACE} parent 1:1 classid 1:667 htb rate 32kbit ceil ${AIRFREESPD}kbit burst 1k prio 4 # local wireless free band
13225simandl $TC class add dev ${FACE} parent 1:1 classid 1:668 htb rate 32kbit ceil ${NONCONTRIBSPD}kbit burst 1k prio 5 # non contributors trafic class
1334simandl# $TC class add dev ${FACE} parent 1:1 classid 1:999 htb rate 32kbit ceil $((${SPEED}/2))kbit burst 8k prio 4 # Inet traffic class
1342simandl 
135 $TC qdisc add dev ${FACE} parent 1:5 handle 5: $STOCHASIS # SSH sub-classes
136 $TC qdisc add dev ${FACE} parent 1:10 handle 10: $STOCHASIS # interactive sub-classes
137 $TC qdisc add dev ${FACE} parent 1:20 handle 20: $STOCHASIS # ping sub-classes
138 $TC qdisc add dev ${FACE} parent 1:30 handle 30: $STOCHASIS # routing sub-classes
13913simandl $TC qdisc add dev ${FACE} parent 1:40 handle 40: $STOCHASIS # email & data transfer sub-classes
140 $TC qdisc add dev ${FACE} parent 1:50 handle 50: $STOCHASIS # voip sub-classes
141 $TC qdisc add dev ${FACE} parent 1:60 handle 60: $STOCHASIS # web & squid sub-classes
1422simandl $TC qdisc add dev ${FACE} parent 1:300 handle 300: $STOCHASIS # default class
14325simandl $TC qdisc add dev ${FACE} parent 1:666 handle 666: $STOCHASIS # unsupported
144 $TC qdisc add dev ${FACE} parent 1:667 handle 667: $STOCHASIS # local wireless
145 $TC qdisc add dev ${FACE} parent 1:668 handle 668: $STOCHASIS # non contributor class
1464simandl# $TC qdisc add dev ${FACE} parent 1:999 handle 999: $STOCHASIS # Inet traffic
1472simandl 
148 
149 ## SSH class
150 # SSH
151 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 3 u32 match ip sport 22 0xffff match ip protocol 0x6 0xff flowid 1:5
152 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 3 u32 match ip dport 22 0xffff match ip protocol 0x6 0xff flowid 1:5
153 
154 ## Interactive class
15513simandl # NTP
156 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 123 0xffff match ip protocol 0x6 0xff flowid 1:10
157 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 123 0xffff match ip protocol 0x6 0xff flowid 1:10
158 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 123 0xffff match ip protocol 0x11 0xff flowid 1:10
159 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 123 0xffff match ip protocol 0x11 0xff flowid 1:10
1609simandl # DNS
1612simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 53 0xffff match ip protocol 0x6 0xff flowid 1:10
162 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 53 0xffff match ip protocol 0x6 0xff flowid 1:10
163 # IRC
164 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 194 0xffff match ip protocol 0x6 0xff flowid 1:10
165 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 194 0xffff match ip protocol 0x6 0xff flowid 1:10
166 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 6667 0xffff match ip protocol 0x6 0xff flowid 1:10
167 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 6667 0xffff match ip protocol 0x6 0xff flowid 1:10
168 # LDAP, LDAPs
169 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 389 0xffff match ip protocol 0x6 0xff flowid 1:10
170 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 389 0xffff match ip protocol 0x6 0xff flowid 1:10
171 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 636 0xffff match ip protocol 0x6 0xff flowid 1:10
172 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 636 0xffff match ip protocol 0x6 0xff flowid 1:10
173 # GAMES
17423simandl # World Of Warcraft
175 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 8085 0xffff match ip protocol 0x11 0xff flowid 1:10
176 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 8085 0xffff match ip protocol 0x11 0xff flowid 1:10
177 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 3724 0xffff match ip protocol 0x11 0xff flowid 1:10
178 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 3724 0xffff match ip protocol 0x11 0xff flowid 1:10
17914simandl # vietcong
180 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 5425 0xffff match ip protocol 0x11 0xff flowid 1:10
181 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 5425 0xffff match ip protocol 0x11 0xff flowid 1:10
1827simandl # LINEAGE2
183 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 2106 0xffff match ip protocol 0x11 0xff flowid 1:10
184 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 2106 0xffff match ip protocol 0x11 0xff flowid 1:10
1852simandl # Half-life
186 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 27015 0xffff match ip protocol 0x11 0xff flowid 1:10
187 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 27015 0xffff match ip protocol 0x11 0xff flowid 1:10
188 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 27016 0xfffe match ip protocol 0x11 0xff flowid 1:10
189 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 27016 0xfffe match ip protocol 0x11 0xff flowid 1:10
1904simandl # UT2003, UT2004
1912simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 7777 0xffff match ip protocol 0x11 0xff flowid 1:10
192 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 7777 0xffff match ip protocol 0x11 0xff flowid 1:10
193 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 7778 0xffff match ip protocol 0x11 0xff flowid 1:10
194 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 7778 0xffff match ip protocol 0x11 0xff flowid 1:10
1954simandl # BZFlag
196 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 5154 0xffff match ip protocol 0x11 0xff flowid 1:10
197 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 5154 0xffff match ip protocol 0x11 0xff flowid 1:10
1982simandl # JEDI KNIGHT
199 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 28060 0xfffe match ip protocol 0x11 0xff flowid 1:10
200 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 28060 0xfffe match ip protocol 0x11 0xff flowid 1:10
201 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 28062 0xffff match ip protocol 0x11 0xff flowid 1:10
202 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 28062 0xffff match ip protocol 0x11 0xff flowid 1:10
203 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 28070 0xfffe match ip protocol 0x11 0xff flowid 1:10
204 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 28070 0xfffe match ip protocol 0x11 0xff flowid 1:10
205 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 28072 0xfff8 match ip protocol 0x11 0xff flowid 1:10
206 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 28072 0xfff8 match ip protocol 0x11 0xff flowid 1:10
207 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 28080 0xfffe match ip protocol 0x11 0xff flowid 1:10
208 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 28080 0xfffe match ip protocol 0x11 0xff flowid 1:10
2095simandl # Dark Eden
210 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 9997 0xffff match ip protocol 0x11 0xff flowid 1:10
211 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 9997 0xffff match ip protocol 0x11 0xff flowid 1:10
212 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 9998 0xfffe match ip protocol 0x11 0xff flowid 1:10
213 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 9998 0xfffe match ip protocol 0x11 0xff flowid 1:10
214 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 9858 0xffff match ip protocol 0x11 0xff flowid 1:10
215 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 9858 0xffff match ip protocol 0x11 0xff flowid 1:10
216 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 9650 0xfffe match ip protocol 0x11 0xff flowid 1:10
217 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 9650 0xfffe match ip protocol 0x11 0xff flowid 1:10
218 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 4056 0xfffe match ip protocol 0x11 0xff flowid 1:10
219 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 4056 0xfffe match ip protocol 0x11 0xff flowid 1:10
22014simandl # Quake 3 arena
221 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 27960 0xfffe match ip protocol 0x11 0xff flowid 1:10
222 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 27960 0xfffe match ip protocol 0x11 0xff flowid 1:10
22319simandl # Counter-Strike Source
224 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 27000 0xfff8 match ip protocol 0x11 0xff flowid 1:10
225 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 27008 0xffc0 match ip protocol 0x11 0xff flowid 1:10
226 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 27072 0xfff0 match ip protocol 0x11 0xff flowid 1:10
227 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 27088 0xfff8 match ip protocol 0x11 0xff flowid 1:10
228 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 27096 0xfffc match ip protocol 0x11 0xff flowid 1:10
229 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 27000 0xfff8 match ip protocol 0x11 0xff flowid 1:10
230 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 27008 0xffc0 match ip protocol 0x11 0xff flowid 1:10
231 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 27072 0xfff0 match ip protocol 0x11 0xff flowid 1:10
232 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 27088 0xfff8 match ip protocol 0x11 0xff flowid 1:10
233 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 27096 0xfffc match ip protocol 0x11 0xff flowid 1:10
2345simandl # H323
2359simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 389 0xffff match ip protocol 0x11 0xff flowid 1:10
236 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 389 0xffff match ip protocol 0x11 0xff flowid 1:10
237 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 522 0xffff match ip protocol 0x11 0xff flowid 1:10
238 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 522 0xffff match ip protocol 0x11 0xff flowid 1:10
239 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 1503 0xffff match ip protocol 0x11 0xff flowid 1:10
240 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 1503 0xffff match ip protocol 0x11 0xff flowid 1:10
241 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 1720 0xffff match ip protocol 0x11 0xff flowid 1:10
242 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 1720 0xffff match ip protocol 0x11 0xff flowid 1:10
243 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 1731 0xffff match ip protocol 0x11 0xff flowid 1:10
244 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 1731 0xffff match ip protocol 0x11 0xff flowid 1:10
2456simandl # SIP
2469simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 5060 0xfffe match ip protocol 0x11 0xff flowid 1:10
247 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 5060 0xfffe match ip protocol 0x11 0xff flowid 1:10
2488simandl # RTP
2499simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 8000 0xffff match ip protocol 0x11 0xff flowid 1:10
250 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 8000 0xffff match ip protocol 0x11 0xff flowid 1:10
2516simandl # gnomemeeting
2529simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 30000 0xfff8 match ip protocol 0x11 0xff flowid 1:10
253 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 30000 0xfff8 match ip protocol 0x11 0xff flowid 1:10
254 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 30008 0xfffe match ip protocol 0x11 0xff flowid 1:10
255 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 30008 0xfffe match ip protocol 0x11 0xff flowid 1:10
256 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 30010 0xffff match ip protocol 0x11 0xff flowid 1:10
257 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 30010 0xffff match ip protocol 0x11 0xff flowid 1:10
258 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 5000 0xfff8 match ip protocol 0x11 0xff flowid 1:10
259 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 5000 0xfff8 match ip protocol 0x11 0xff flowid 1:10
260 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 5010 0xfffe match ip protocol 0x11 0xff flowid 1:10
261 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 5010 0xfffe match ip protocol 0x11 0xff flowid 1:10
262 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 5012 0xfffe match ip protocol 0x11 0xff flowid 1:10
263 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 5012 0xfffe match ip protocol 0x11 0xff flowid 1:10
26410simandl # Lineage2
265 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 7777 0xffff match ip protocol 0x6 0xff flowid 1:10
266 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 7777 0xffff match ip protocol 0x6 0xff flowid 1:10
267 # Teamspeak
268 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 8767 0xffff match ip protocol 0x11 0xff flowid 1:10
269 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 8767 0xffff match ip protocol 0x11 0xff flowid 1:10
27026simandl # L2TP
271 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 1701 0xffff match ip protocol 0x11 0xff flowid 1:10
272 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 1701 0xffff match ip protocol 0x11 0xff flowid 1:10
27327simandl # Americas Army
274 #UDP
275 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 1716 0xfffe match ip protocol 0x11 0xff flowid 1:10
276 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 1716 0xfffe match ip protocol 0x11 0xff flowid 1:10
277 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 1718 0xffff match ip protocol 0x11 0xff flowid 1:10
278 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 1718 0xffff match ip protocol 0x11 0xff flowid 1:10
279 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 8777 0xffff match ip protocol 0x11 0xff flowid 1:10
280 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 8777 0xffff match ip protocol 0x11 0xff flowid 1:10
281 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 27900 0xffff match ip protocol 0x11 0xff flowid 1:10
282 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 27900 0xffff match ip protocol 0x11 0xff flowid 1:10
283 #TCP
284 #14200
285 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 14200 0xffff match ip protocol 0x6 0xff flowid 1:10
286 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 14200 0xffff match ip protocol 0x6 0xff flowid 1:10
287 #20024 .. 20031
288 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 20024 0xfff8 match ip protocol 0x6 0xff flowid 1:10
289 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 20024 0xfff8 match ip protocol 0x6 0xff flowid 1:10
290 #20032 .. 20047
291 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 20032 0xfff0 match ip protocol 0x6 0xff flowid 1:10
292 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 20032 0xfff0 match ip protocol 0x6 0xff flowid 1:10
293 #20048
294 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 20048 0xffff match ip protocol 0x6 0xff flowid 1:10
295 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 20048 0xffff match ip protocol 0x6 0xff flowid 1:10
29629simandl # Warhammer Online
297 #TCP
298 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 1380 0xffff match ip protocol 0x6 0xff flowid 1:10
299 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 1380 0xffff match ip protocol 0x6 0xff flowid 1:10
300 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 10622 0xffff match ip protocol 0x6 0xff flowid 1:10
301 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 10622 0xffff match ip protocol 0x6 0xff flowid 1:10
302 #UDP 33100-33500 (32768-33791)
303 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 33100 0xfc00 match ip protocol 0x11 0xff flowid 1:10
304 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 33100 0xfc00 match ip protocol 0x11 0xff flowid 1:10
30530simandl #Battlefield 2
306 #TCP 16567, 16667
307 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 16567 0xfc00 match ip protocol 0x6 0xff flowid 1:10
308 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 16567 0xfc00 match ip protocol 0x6 0xff flowid 1:10
309 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 16667 0xfc00 match ip protocol 0x6 0xff flowid 1:10
310 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 16667 0xfc00 match ip protocol 0x6 0xff flowid 1:10
31127simandl 
31230simandl #Call of Duty 4
313 #port 28960 TCP a UDP
314 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 28960 0xfc00 flowid 1:10
315 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 28960 0xfc00 flowid 1:10
316 
3172simandl # TCP ACK packets smaller than 64 bytes
318 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 \
319 match ip protocol 6 0xff \
320 match u8 0x05 0x0f at 0 \
321 match u16 0x0000 0xffc0 at 2 \
322 match u8 0x10 0xff at 33 \
323 flowid 1:10
324 
325 ## Ping class
326 # ICMP
327 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip protocol 0x01 0xff flowid 1:20
328 
329 ## Routing class
330 # BGP
331 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 179 0xffff match ip protocol 0x6 0xff flowid 1:30
332 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 179 0xffff match ip protocol 0x6 0xff flowid 1:30
333 # OSPF
334 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip protocol 0x59 0xff flowid 1:30
335 
33613simandl ## Email & Data transfer class
3372simandl # FTP
338 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 20 0xfffe match ip protocol 0x6 0xff flowid 1:40
339 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 20 0xfffe match ip protocol 0x6 0xff flowid 1:40
340 # PPTP
341 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 1723 0xffff match ip protocol 0x6 0xff flowid 1:40
342 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 1723 0xffff match ip protocol 0x6 0xff flowid 1:40
343 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 1723 0xffff match ip protocol 0x11 0xff flowid 1:40
344 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 1723 0xffff match ip protocol 0x11 0xff flowid 1:40
3454simandl # OpenVPN
346 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 5000 0xffff match ip protocol 0x11 0xff flowid 1:40
347 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 5000 0xffff match ip protocol 0x11 0xff flowid 1:40
3482simandl # SCP
349 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 22 0xffff match ip protocol 0x6 0xff match ip tos 0x08 0xff flowid 1:40
350 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 22 0xffff match ip protocol 0x6 0xff match ip tos 0x08 0xff flowid 1:40
351 # POP3
35213simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 110 0xffff match ip protocol 0x6 0xff flowid 1:40
353 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 110 0xffff match ip protocol 0x6 0xff flowid 1:40
3542simandl # IMAP
35513simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 143 0xffff match ip protocol 0x6 0xff flowid 1:40
356 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 143 0xffff match ip protocol 0x6 0xff flowid 1:40
3572simandl # SMTP
35813simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 25 0xffff match ip protocol 0x6 0xff flowid 1:40
359 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 25 0xffff match ip protocol 0x6 0xff flowid 1:40
3602simandl # POP3S
36113simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 995 0xffff match ip protocol 0x6 0xff flowid 1:40
362 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 995 0xffff match ip protocol 0x6 0xff flowid 1:40
3632simandl # IMAPS
36413simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 993 0xffff match ip protocol 0x6 0xff flowid 1:40
365 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 993 0xffff match ip protocol 0x6 0xff flowid 1:40
3662simandl # SSMTP
36713simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 465 0xffff match ip protocol 0x6 0xff flowid 1:40
368 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 465 0xffff match ip protocol 0x6 0xff flowid 1:40
3692simandl # rsync
37013simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 673 0xffff match ip protocol 0x6 0xff flowid 1:40
371 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 673 0xffff match ip protocol 0x6 0xff flowid 1:40
372 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 673 0xffff match ip protocol 0x11 0xff flowid 1:40
373 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 673 0xffff match ip protocol 0x11 0xff flowid 1:40
3742simandl # CVS
37513simandl $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 873 0xffff match ip protocol 0x6 0xff flowid 1:40
376 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 873 0xffff match ip protocol 0x6 0xff flowid 1:40
377 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 873 0xffff match ip protocol 0x11 0xff flowid 1:40
378 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 873 0xffff match ip protocol 0x11 0xff flowid 1:40
3792simandl 
38013simandl ## VOIP class
381 # VoIP typeofservice mark
382 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0x68 0xff flowid 1:50 #SIP
383 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0xb8 0xff flowid 1:50 #RTP
384 # VoIP typeofservice mark for RTP ha-vel.cz
38518simandl #$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0x16 0xff flowid 1:50 #RTP
38613simandl # TOS mimimize delay - VoIP typeofservice mark for RTP vox.802.cz
38718simandl #$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0x10 0xff flowid 1:50
388 # VoIP IP addr for RTP ha-vel.cz
389 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip src 217.66.161.0/28 flowid 1:50 #RTP
390 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dst 217.66.161.0/28 flowid 1:50 #RTP
391 # VoIP IP addr for RTP 802.cz
392 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip src 212.71.146.178 flowid 1:50 #RTP rtp.802.cz
393 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dst 212.71.146.178 flowid 1:50 #RTP rtp.802.cz
394 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip src 212.71.146.184/31 flowid 1:50 # rtp[23].802.cz
395 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dst 212.71.146.184/31 flowid 1:50 # rtp[23].802.cz
396 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip src 212.71.146.163 flowid 1:50 #RTP rtp4.802.cz
397 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dst 212.71.146.163 flowid 1:50 #RTP rtp4.802.cz
39813simandl 
399 ## Web & Squid class
400 # HTTP
401 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 80 0xffff match ip protocol 0x6 0xff flowid 1:60
402 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 80 0xffff match ip protocol 0x6 0xff flowid 1:60
403 # HTTPS
404 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 443 0xffff match ip protocol 0x6 0xff flowid 1:60
405 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 443 0xffff match ip protocol 0x6 0xff flowid 1:60
406 # WebCache
407 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 8080 0xffff match ip protocol 0x6 0xff flowid 1:60
408 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 8080 0xffff match ip protocol 0x6 0xff flowid 1:60
4092simandl # HTTP port
410 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 3128 0xffff match ip protocol 0x6 0xff flowid 1:60
411 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 3128 0xffff match ip protocol 0x6 0xff flowid 1:60
412 # ICP port
413 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 3130 0xffff match ip protocol 0x6 0xff flowid 1:60
414 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 3130 0xffff match ip protocol 0x6 0xff flowid 1:60
415 
416 ## Unsupported class
417 # Kazaa
418 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 1214 0xffff match ip protocol 0x6 0xff flowid 1:666
419 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 1214 0xffff match ip protocol 0x6 0xff flowid 1:666
420 
421 # IP range of DHCP for airfree AP on this router
422 for ipaddr in $AIRFREE
423 do
424 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 1 u32 match ip src $ipaddr flowid 1:667
425 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 1 u32 match ip dst $ipaddr flowid 1:667
426 done
427 # non-CZF-RFC - violators of RFCs
428 for ipaddr in $NONCZF
429 do
430 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 1 u32 match ip src $ipaddr flowid 1:666
431 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 1 u32 match ip dst $ipaddr flowid 1:666
432 done
43325simandl # non-contributors
434 for ipaddr in $NONCONTRIB
435 do
436 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 1 u32 match ip src $ipaddr flowid 1:668
437 $TC filter add dev ${FACE} parent 1:0 protocol ip prio 1 u32 match ip dst $ipaddr flowid 1:668
438 done
4392simandl 
4404simandl ## Internet class
4412simandl # IPtables rule
442# $IPTABLES -t mangle -A FORWARD -s ! 10.0.0.0/8 -o ${FACE} -j MARK --set-mark 999
443# $IPTABLES -t mangle -A FORWARD -d ! 10.0.0.0/8 -o ${FACE} -j MARK --set-mark 999
444 # IPtables mark filter
445# $TC filter add dev ${FACE} parent 1:0 protocol ip prio 1 handle 999 fw flowid 1:999
446}
447 
448for FACE in $FACES
449do
4504simandl if [ -z "`$IP l | grep $FACE[:@]`" ]
451 then
452 echo "Interface $FACE doesn't exist"
453 continue
454 fi
4552simandl TYPE=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*type[[:space:]]\+\([[:alpha:]]\+\).*}.*/\1/"`
456 if [ "$TYPE" != 'transit' ]
457 then
458 continue
459 fi
460 SPEED=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*speed[[:space:]]\+\([[:digit:]]\+\).*}.*/\1/;t;d"`
461 QUANTUM=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*quantum[[:space:]]\+\([[:digit:]]\+\).*}.*/\1/;t;d"`
462 
463 if [ -z "$QUANTUM" ]
464 then
4654simandl MTU=`$IP l | grep $FACE[:@] | sed -e "s/^.*mtu[[:space:]]\+\([[:digit:]]\+\).*/\1/"`
4662simandl QUANTUM=$(($QUANTUMOFFS+$MTU))
467 fi
46815simandl 
469 NONCZFSPD=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*NONCZFSPD[[:space:]]\+\([[:digit:]]\+\).*}.*/\1/;t;d"`
470 if [ -z $NONCZFSPD ] ; then NONCZFSPD=$DNONCZFSPD ; fi
471 
472 AIRFREESPD=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*AIRFREESPD[[:space:]]\+\([[:digit:]]\+\).*}.*/\1/;t;d"`
473 if [ -z $AIRFREESPD ] ; then AIRFREESPD=$DAIRFREESPD ; fi
474 
47525simandl NONCONTRIBSPD=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*NONCONTRIBSPD[[:space:]]\+\([[:digit:]]\+\).*}.*/\1/;t;d"`
476 if [ -z $NONCONTRIBSPD ] ; then NONCONTRIBSPD=$DNONCONTRIBSPD ; fi
477 
47815simandl SSHDIV=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*SSHDIV[[:space:]]\+\([[:digit:]]\+\).*}.*/\1/;t;d"`
479 if [ -z $SSHDIV ] ; then SSHDIV=$DSSHDIV ; fi
480 
481 PINGDIV=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*PINGDIV[[:space:]]\+\([[:digit:]]\+\).*}.*/\1/;t;d"`
482 if [ -z $PINGDIV ] ; then PINGDIV=$DPINGDIV ; fi
483 
484 INTERACTDIV=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*INTERACTDIV[[:space:]]\+\([[:digit:]]\+\).*}.*/\1/;t;d"`
485 if [ -z $INTERACTDIV ] ; then INTERACTDIV=$DINTERACTDIV ; fi
486 
487 VOIPDIV=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*VOIPDIV[[:space:]]\+\([[:digit:]]\+\).*}.*/\1/;t;d"`
488 if [ -z $VOIPDIV ] ; then VOIPDIV=$DVOIPDIV ; fi
489 
490 WWWDIV=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*WWWDIV[[:space:]]\+\([[:digit:]]\+\).*}.*/\1/;t;d"`
491 if [ -z $WWWDIV ] ; then WWWDIV=$DWWWDIV ; fi
492 
493 XFERDIV=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*XFERDIV[[:space:]]\+\([[:digit:]]\+\).*}.*/\1/;t;d"`
494 if [ -z $XFERDIV ] ; then XFERDIV=$DXFERDIV ; fi
495 
496 DFLTDIV=`echo -e $IFACECONF | grep $FACE | sed -e "s/^.*{.*DFLTDIV[[:space:]]\+\([[:digit:]]\+\).*}.*/\1/;t;d"`
497 if [ -z $DFLTDIV ] ; then DFLTDIV=$DDFLTDIV ; fi
498 
499#echo $SPEED $NONCZFSPD $AIRFREESPD $SSHDIV $PINGDIV $INTERACTDIV $VOIPDIV $WWWDIV $XFERDIV $DFLTDIV
5002simandl set_qos_classes
501done
502 
503exit 0

Powered by WebSVN 2.2.1