qos |
Subversion Repositories: |
Rev 37 | Rev 38 | |
---|---|---|
Line 11... | Line 11... | |
# version: 2.1.6 |
# version: 2.1.6 | |
# ps ver : 0.1.9 |
# ps ver : 0.1.9 | |
# |
# | |
# Changelog |
# Changelog | |
# |
# | |
# 14/01/09 [sinda] doplnena podpora pro hru "Sniper Elite" porty UDP 21540 a 54468 | ||
# 13/01/09 [sinda] doplnena podpora pro RTP dle ip operatora systinet.com a rozsireni portu OpenVPN o 1194/UDP | ||
# 07/01/09 [simandl] doplnena podpora pro hru "World Of Warcraft" porty 6112 a 6881-6999 |
# 07/01/09 [simandl] doplnena podpora pro hru "World Of Warcraft" porty 6112 a 6881-6999 | |
# 23/12/08 [simandl] podpora pro ventrilo |
# 23/12/08 [simandl] podpora pro ventrilo | |
# 04/12/08 [sinda] doplnena podpora pro RTP dle ip operatoru fayn.cz, mujtelefon.cz, netphone.cz, aps.sbohempevnalinko.cz, fax.sipcz.net |
# 04/12/08 [sinda] doplnena podpora pro RTP dle ip operatoru fayn.cz, mujtelefon.cz, netphone.cz, aps.sbohempevnalinko.cz, fax.sipcz.net | |
# 01/12/08 [sinda] File download over http do class airfree (TERASPACE-GMBH, yandex.ru, ...) |
# 01/12/08 [sinda] File download over http do class airfree (TERASPACE-GMBH, yandex.ru, ...) | |
# 04/11/08 [simandl] podpora pro hry "Battlefield" a "Call of Duty" |
# 04/11/08 [simandl] podpora pro hry "Battlefield" a "Call of Duty" | |
Line 122... | Line 124... | |
echo "-Initializing QoS_base rules on interface $FACE (speed $SPEED)" |
echo "-Initializing QoS_base rules on interface $FACE (speed $SPEED)" | |
|
| |
$TC qdisc add dev ${FACE} root handle 1: htb default 300 r2q 2 |
$TC qdisc add dev ${FACE} root handle 1: htb default 300 r2q 2 | |
$TC class add dev ${FACE} parent 1: classid 1:1 htb rate $((${SPEED}/2))kbit ceil ${SPEED}kbit burst 15k quantum ${QUANTUM} |
$TC class add dev ${FACE} parent 1: classid 1:1 htb rate $((${SPEED}/2))kbit ceil ${SPEED}kbit burst 15k quantum ${QUANTUM} | |
$TC class add dev ${FACE} parent 1:1 classid 1:5 htb rate 64kbit ceil $((${SPEED}/${SSHDIV}))kbit burst 5k prio 1 # SSH class |
$TC class add dev ${FACE} parent 1:1 classid 1:5 htb rate 64kbit ceil $((${SPEED}/${SSHDIV}))kbit burst 5k prio 1 # SSH class | |
$TC class add dev ${FACE} parent 1:1 classid 1:10 htb rate 64kbit ceil $((${SPEED}/${INTERACTDIV}))kbit burst 5k prio 1 # interactive class |
$TC class add dev ${FACE} parent 1:1 classid 1:10 htb rate 192kbit ceil $((${SPEED}/${INTERACTDIV}))kbit burst 5k prio 1 # interactive class | |
$TC class add dev ${FACE} parent 1:1 classid 1:20 htb rate 32kbit ceil $((${SPEED}/${PINGDIV}))kbit burst 5k prio 0 |
$TC class add dev ${FACE} parent 1:1 classid 1:20 htb rate 32kbit ceil $((${SPEED}/${PINGDIV}))kbit burst 5k prio 0 | |
$TC class add dev ${FACE} parent 1:1 classid 1:30 htb rate 32kbit ceil 128kbit burst 5k prio 0 # routing class |
$TC class add dev ${FACE} parent 1:1 classid 1:30 htb rate 32kbit ceil 128kbit burst 5k prio 0 # routing class | |
$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 |
$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 | |
$TC class add dev ${FACE} parent 1:1 classid 1:50 htb rate 96kbit ceil $((${SPEED}/${VOIPDIV}))kbit burst 5k prio 0 # voip class |
$TC class add dev ${FACE} parent 1:1 classid 1:50 htb rate 192kbit ceil $((${SPEED}/${VOIPDIV}))kbit burst 5k prio 0 # voip class | |
$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 |
$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 | |
$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 |
$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 | |
$TC class add dev ${FACE} parent 1:1 classid 1:666 htb rate 32kbit ceil ${NONCZFSPD}kbit burst 1k prio 5 # unsupported trafic class |
$TC class add dev ${FACE} parent 1:1 classid 1:666 htb rate 32kbit ceil ${NONCZFSPD}kbit burst 1k prio 5 # unsupported trafic class | |
$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 |
$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 | |
$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 |
$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 | |
Line 173... | Line 175... | |
$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 |
$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 | |
$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 |
$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 | |
$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 |
$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 | |
$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 |
$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 | |
# GAMES |
# GAMES | |
# Sniper Elite | ||
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 21540 0xffff match ip protocol 0x11 0xff flowid 1:10 | ||
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 21540 0xffff match ip protocol 0x11 0xff flowid 1:10 | ||
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 54468 0xffff match ip protocol 0x11 0xff flowid 1:10 | ||
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 54468 0xffff match ip protocol 0x11 0xff flowid 1:10 | ||
# World Of Warcraft |
# World Of Warcraft | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 8085 0xffff flowid 1:10 |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 8085 0xffff flowid 1:10 | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 8085 0xffff flowid 1:10 |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 8085 0xffff flowid 1:10 | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 3724 0xffff flowid 1:10 |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 3724 0xffff flowid 1:10 | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 3724 0xffff flowid 1:10 |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 3724 0xffff flowid 1:10 | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 6112 0xffff flowid 1:10 | ||
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 6112 0xffff flowid 1:10 | ||
#6881..6999 is covered by (6880..6911 + 6912..6975 + 6976..7007) |
#6881..6999 is covered by (6880..6911 + 6912..6975 + 6976..7007) | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 6880 0xffe0 flowid 1:10 |
# $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 6880 0xffe0 flowid 1:10 | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 6880 0xffe0 flowid 1:10 |
# $TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 6880 0xffe0 flowid 1:10 | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 6912 0xffc0 flowid 1:10 |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 6912 0xffc0 flowid 1:10 | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 6912 0xffc0 flowid 1:10 |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 6912 0xffc0 flowid 1:10 | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 6976 0xffe0 flowid 1:10 |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 6976 0xffe0 flowid 1:10 | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 6976 0xffe0 flowid 1:10 |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 6976 0xffe0 flowid 1:10 | |
# vietcong |
# vietcong | |
Line 335... | Line 344... | |
$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 |
$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 | |
$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 |
$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 | |
# OpenVPN |
# OpenVPN | |
$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 |
$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 | |
$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 |
$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 | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip sport 1194 0xffff match ip protocol 0x11 0xff flowid 1:40 | ||
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dport 1194 0xffff match ip protocol 0x11 0xff flowid 1:40 | ||
# SCP |
# SCP | |
$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 |
$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 | |
$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 |
$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 | |
# POP3 |
# POP3 | |
$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 |
$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 | |
Line 374... | Line 385... | |
$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:50 |
$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:50 | |
$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:50 |
$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:50 | |
# RTP |
# RTP | |
$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:50 |
$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:50 | |
$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:50 |
$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:50 | |
# Skype typeofservice mark | ||
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0x20 0xff flowid 1:50 #Skype? | ||
# VoIP typeofservice mark |
# VoIP typeofservice mark | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0x68 0xff flowid 1:50 #SIP |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0x68 0xff flowid 1:50 #SIP | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0xb8 0xff flowid 1:50 #RTP |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0xb8 0xff flowid 1:50 #RTP | |
# VoIP typeofservice mark for RTP ha-vel.cz |
# VoIP typeofservice mark for RTP ha-vel.cz | |
#$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0x16 0xff flowid 1:50 #RTP |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0x16 0xff flowid 1:50 #RTP | |
# TOS mimimize delay - VoIP typeofservice mark for RTP vox.802.cz |
# TOS mimimize delay - VoIP typeofservice mark for RTP vox.802.cz | |
#$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0x10 0xff flowid 1:50 |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip tos 0x10 0xff flowid 1:50 | |
# VoIP IP addr for RTP ha-vel.cz |
# VoIP IP addr for RTP ha-vel.cz | |
$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 |
$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 | |
$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 |
$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 | |
# VoIP IP addr for RTP 802.cz |
# VoIP IP addr for RTP 802.cz | |
$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 |
$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 | |
Line 402... | Line 415... | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dst 212.20.119.40/29 flowid 1:50 #sip1.netphone.cz |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dst 212.20.119.40/29 flowid 1:50 #sip1.netphone.cz | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip src 81.91.216.18 flowid 1:50 #aps.sbohempevnalinko.cz |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip src 81.91.216.18 flowid 1:50 #aps.sbohempevnalinko.cz | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dst 81.91.216.18 flowid 1:50 #aps.sbohempevnalinko.cz |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dst 81.91.216.18 flowid 1:50 #aps.sbohempevnalinko.cz | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip src 81.91.216.11 flowid 1:50 #fax.sipcz.net |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip src 81.91.216.11 flowid 1:50 #fax.sipcz.net | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dst 81.91.216.11 flowid 1:50 #fax.sipcz.net |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dst 81.91.216.11 flowid 1:50 #fax.sipcz.net | |
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip src 193.86.76.226 match ip protocol 0x11 0xff flowid 1:50 #ustredna.systinet.com | ||
$TC filter add dev ${FACE} parent 1:0 protocol ip prio 2 u32 match ip dst 193.86.76.226 match ip protocol 0x11 0xff flowid 1:50 #ustredna.systinet.com | ||
# gnomemeeting |
# gnomemeeting | |
$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:50 |
$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:50 | |
$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:50 |
$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:50 | |
$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:50 |
$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:50 | |
$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:50 |
$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:50 |