View previous topic :: View next topic |
Author |
Message |
Headhunter n00b
Joined: 20 Sep 2002 Posts: 40
|
Posted: Sat Feb 19, 2005 8:22 pm Post subject: Guter Traffic Shaper fuer Linux (Gentoo) gesucht |
|
|
Ich habe mal unter Windows dieses CFos ausprobiert, und war begeistert. Das Teil hat wirklich meine Internetverbindung verbessert, wenn man eben was gedownloaded oder geuploaded hat, und das vor allem automatisch.
Nun suche ich sowas auch fuer Linux, hab aber keine Ahnung wo ich da anfangen soll.
Gibt es auf Linux aehnliche Programme, die auch so gut wie automatisch funktionieren??
Bin fuer jede Hilfe dankbar...
Gruss |
|
Back to top |
|
|
Haldir Guru
Joined: 27 Sep 2002 Posts: 546
|
Posted: Sat Feb 19, 2005 8:57 pm Post subject: |
|
|
Probier mal wondershaper (das ist ein Skript), ist nicht in Portage, ansonsten setz dich mit den QoS Optionen in der Kernel auseinander und wie man die einstellt (zusammen mit Iptables). |
|
Back to top |
|
|
return13 Guru
Joined: 02 Feb 2004 Posts: 513 Location: Hamburg - Germany
|
Posted: Sat Feb 19, 2005 9:15 pm Post subject: |
|
|
ist noch recht leer dieser Bereich, obwohl die Nachfrage eigentlich recht hoch ist... _________________ Wer Recht erkennen will, muß zuvor in richtiger Weise gezweifelt haben.
Aristoteles (384-322), griech. Philosoph, Begründer d. abendländ. Philosophie |
|
Back to top |
|
|
the_mole n00b
Joined: 14 Jan 2005 Posts: 64 Location: Erlangen, Germany
|
Posted: Sat Feb 19, 2005 9:23 pm Post subject: |
|
|
Naja, tc ist doch eigentlich recht vernünftig. Kostet eben ein wenig Konfigurationsaufwand, wenn man wirklich alles ketegorisieren will.
Ich hab das zusammen mit meinem Kumpel bei ihm eingerichtet und trotz Filesharing (mldonkey auf dem Router selbst) ist sein Ping von vorher 250ms und mehr auf unter 50ms runter. (Bei voller genehmigter Bandbreite.
Im Grunde einfach mit iptables die entsprechenden Pakete gemarkt und mit tc dann den verschidenen Klassen zugewiesen. Wenn daran interesse besteht, kann ich ihn hier mal die beiden Skripte posten lassen. Die anzupassen dürfte ja dann kein Problem mehr sein, oder?
cu the_mole |
|
Back to top |
|
|
mr_elch Apprentice
Joined: 18 Jun 2004 Posts: 170
|
|
Back to top |
|
|
Throx n00b
Joined: 18 May 2004 Posts: 25
|
Posted: Sat Feb 19, 2005 10:03 pm Post subject: |
|
|
the_mole wrote: | Wenn daran interesse besteht, kann ich ihn hier mal die beiden Skripte posten lassen. Die anzupassen dürfte ja dann kein Problem mehr sein, oder? |
Hmmm, schreib doch etwas ins WiKi dazu wenns dir nichts ausmacht, wäre echt ne tolle Sache, vorallem scheinen Traffic-Shaper ja immer mehr "IN" zu werden |
|
Back to top |
|
|
return13 Guru
Joined: 02 Feb 2004 Posts: 513 Location: Hamburg - Germany
|
Posted: Sun Feb 20, 2005 11:49 am Post subject: |
|
|
Warum ist tcng im Portage Maskiert?
Hab grad im Bugzilla nach gesucht, aber ergab nichts... _________________ Wer Recht erkennen will, muß zuvor in richtiger Weise gezweifelt haben.
Aristoteles (384-322), griech. Philosoph, Begründer d. abendländ. Philosophie |
|
Back to top |
|
|
schrippe Guru
Joined: 03 Mar 2004 Posts: 556 Location: Mülheim
|
Posted: Sun Feb 20, 2005 9:50 pm Post subject: |
|
|
@the_mole:
bitte poste doch mal deine scripte. die würden mich doch sehr interessieren. vor allem, weil ich bisher nicht zufriedenstellend hinbekommen habe.
danke _________________ for i in $(seq 1 565); do echo 'A$i: entweder rechts fahren oder rechts überholen dürfen!';done |
|
Back to top |
|
|
Qubit Tux's lil' helper
Joined: 23 Sep 2002 Posts: 136 Location: /dev/urandom
|
Posted: Mon Feb 21, 2005 8:07 am Post subject: |
|
|
Hi,
Code: |
emerge -s trickle
Searching...
[ Results for search key : trickle ]
[ Applications found : 1 ]
* net-misc/trickle [ Masked ]
Latest version available: 1.06
Latest version installed: [ Not Installed ]
Size of downloaded files: 162 kB
Homepage: http://www.monkey.org/~marius/trickle/
Description: a portable lightweight userspace bandwidth shaper
License: BSD
|
Qubit. |
|
Back to top |
|
|
MrIch Apprentice
Joined: 25 May 2002 Posts: 204
|
Posted: Mon Feb 21, 2005 9:16 am Post subject: |
|
|
the_mole bitte poste dein skript |
|
Back to top |
|
|
Sonic Lux Guru
Joined: 07 Mar 2004 Posts: 375 Location: Dresden / Germany
|
Posted: Mon Feb 21, 2005 9:35 am Post subject: |
|
|
Ich habe auch ein nettes Script aus verschiedenen anderen zusammengeschrieben.
Vllt mach ich daraus mal ein Howto...
Code: |
#!/bin/bash
###########################################################
# #
# qos by Stephan Kupfer 01/2005 #
# no copyrights, please use it :-) #
# #
###########################################################
# variables ;-)
DEV=ppp0
UPLINK=120
DOWNLINK=1000
TC=/sbin/tc
IPTABLES=/sbin/iptables
# clean existing down- and uplink qdiscs, hide errors
$TC qdisc del dev $DEV root 2> /dev/null > /dev/null
$IPTABLES -t mangle -D POSTROUTING -o $DEV -j MYSHAPER-OUT 2> /dev/null > /dev/null
$IPTABLES -t mangle -F MYSHAPER-OUT 2> /dev/null > /dev/null
$IPTABLES -t mangle -X MYSHAPER-OUT 2> /dev/null > /dev/null
###########################################################
#
# Outbound Shaping (limits total bandwidth to RATEUP)
# set queue size to give latency of about 2 seconds on low-prio packets
ip link set dev $DEV qlen 30
# changes mtu on the outbound device. Lowering the mtu will result
# in lower latency but will also cause slightly lower throughput due
# to IP and TCP protocol overhead.
ip link set dev $DEV mtu 1000
###### uplink
# install root HTB, point default traffic to 1:30:
$TC qdisc add dev $DEV root handle 1: htb default 30
# add main rate limit classes
$TC class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit
# high prio class 1:10 for example ICPM (ping) to impress friends ;-)
$TC class add dev $DEV parent 1:1 classid 1:10 htb rate $[$UPLINK/2]kbit ceil ${UPLINK}kbit prio 0
# bulk & default class 1:20 - gets slightly less traffic, and a lower priority:
$TC class add dev $DEV parent 1:1 classid 1:20 htb rate $[$UPLINK/4]kbit ceil ${UPLINK}kbit prio 1
# traffic we don't like go to class 1:30
$TC class add dev $DEV parent 1:1 classid 1:30 htb rate $[$UPLINK/4]kbit ceil ${UPLINK}kbit prio 2
# class for mega bad traffic like webcam of tina ;-)
$TC class add dev $DEV parent 1:1 classid 1:30 htb rate 15kbit ceil 30kbit prio 3
# all get Stochastic Fairness (sfq):
$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:30 handle 30: sfq perturb 10
$TC qdisc add dev $DEV parent 1:40 handle 40: sfq perturb 10
# filter traffic into classes by fwmark - here we direct traffic into priority class according to
# the fwmark set on the packet (we set fwmark with iptables
# later). Note that above we've set the default priority
# class to 1:30 so unmarked packets (or packets marked with
# unfamiliar IDs) will be defaulted to the lowest priority
# class.
$TC filter add dev $DEV protocol ip parent 1: handle 0x10 fw flowid 1:10
$TC filter add dev $DEV protocol ip parent 1: handle 0x20 fw flowid 1:20
$TC filter add dev $DEV protocol ip parent 1: handle 0x30 fw flowid 1:30
$TC filter add dev $DEV protocol ip parent 1: handle 0x40 fw flowid 1:40
# add MYSHAPER-OUT chain to the mangle table in iptables - this sets up the table we'll use
# to filter and mark packets.
$IPTABLES -t mangle -N MYSHAPER-OUT
$IPTABLES -t mangle -I POSTROUTING -o $DEV -j MYSHAPER-OUT
# add fwmark entries to classify different types of traffic - Set fwmark from 10-40 according to
# desired class. 10 is highest prio.
# Default for low port traffic
$IPTABLES -t mangle -A MYSHAPER-OUT -p tcp --sport 0:1024 -j MARK --set-mark 0x20
$IPTABLES -t mangle -A MYSHAPER-OUT -p tcp --dport 0:1024 -j MARK --set-mark 0x20
# ICMP (ping) - high prio, impress friends
$IPTABLES -t mangle -A MYSHAPER-OUT -p icmp -j MARK --set-mark 0x10
# DNS name resolution (small packets)
# ? - @MOB: Port 53 =?
# secure shell (ssh) port 22
$IPTABLES -t mangle -A MYSHAPER-OUT -p tcp --dport ssh -j MARK --set-mark 0x10
$IPTABLES -t mangle -A MYSHAPER-OUT -p tcp --sport ssh -j MARK --set-mark 0x10
# small packets (probably just ACKs)
$IPTABLES -t mangle -A MYSHAPER-OUT -p tcp -m length --length :64 -j MARK --set-mark 0x10
# for Stephan "give me more bandwidth" Kupfer
$IPTABLES -t mangle -o $DEV -A MYSHAPER-OUT -s 192.168.10.3/32 -j MARK --set-mark 0x20
# for the rest
$IPTABLES -t mangle -o $DEV -A MYSHAPER-OUT -s 192.168.10.2/32 -j MARK --set-mark 0x30
$IPTABLES -t mangle -o $DEV -A MYSHAPER-OUT -s 192.168.10.5/32 -j MARK --set-mark 0x30
$IPTABLES -t mangle -o $DEV -A MYSHAPER-OUT -s 192.168.10.9/32 -j MARK --set-mark 0x30
# tina -> mega bad traffic
$IPTABLES -t mangle -o $DEV -A MYSHAPER-OUT -s 192.168.10.10/32 -j MARK --set-mark 0x40
echo "Outbound shaping added to $DEV. Rate: ${UPLINK}kbit/sec." |
|
|
Back to top |
|
|
TheSmallOne Guru
Joined: 22 Jan 2005 Posts: 467 Location: Germany
|
Posted: Mon Feb 21, 2005 9:56 am Post subject: |
|
|
-–- gelöscht -–-
Last edited by TheSmallOne on Tue Dec 25, 2012 10:37 pm; edited 1 time in total |
|
Back to top |
|
|
Sonic Lux Guru
Joined: 07 Mar 2004 Posts: 375 Location: Dresden / Germany
|
Posted: Mon Feb 21, 2005 10:24 am Post subject: |
|
|
mit iptables kann man halt viel umfangreicher filtern....
und wirklich langsamer geht es auch nicht, vllt ein 0,1ms |
|
Back to top |
|
|
TheSmallOne Guru
Joined: 22 Jan 2005 Posts: 467 Location: Germany
|
Posted: Mon Feb 21, 2005 5:58 pm Post subject: |
|
|
-–- gelöscht -–-
Last edited by TheSmallOne on Sat Dec 22, 2012 12:25 pm; edited 1 time in total |
|
Back to top |
|
|
NightDragon Veteran
Joined: 21 Aug 2004 Posts: 1156 Location: Vienna (Austria)
|
Posted: Mon Feb 21, 2005 6:05 pm Post subject: |
|
|
Kann man den mit iptables allein Bandbreitenbeschränkung machen ohne die Packete zu verwerfen oder nicht weiterzuleiten?
Das ist doch nur mittels Qdiscs möglich oder? _________________ You are the problem too all my solutions |
|
Back to top |
|
|
Sonic Lux Guru
Joined: 07 Mar 2004 Posts: 375 Location: Dresden / Germany
|
Posted: Mon Feb 21, 2005 9:52 pm Post subject: |
|
|
NightDragon wrote: | Kann man den mit iptables allein Bandbreitenbeschränkung machen ohne die Packete zu verwerfen oder nicht weiterzuleiten?
Das ist doch nur mittels Qdiscs möglich oder? |
Du meinst incoming traffic zu begrenzen ?
Ja das geht mit qdisc.
Die Neuen Server erkennen auch die bandbreite und regeln dann wie viel sie dir uploaden (du downloades), daher werden nur am Anfang ein paar Pakete verworfen, danach bekommst du die konstante Bandbreite ohne großartiges verwerfen der Pakete.
(Hoffe du meintes das... ) |
|
Back to top |
|
|
NightDragon Veteran
Joined: 21 Aug 2004 Posts: 1156 Location: Vienna (Austria)
|
Posted: Mon Feb 21, 2005 9:55 pm Post subject: |
|
|
Ja genau
Thx für die Info.
Ich frage deswegen so genau nach, weil ich demnächst nen Server mit QOS und co basteln möchte bzw. mich allgemein mit Bandbreitenkontrolle beschäftigen möchte. _________________ You are the problem too all my solutions |
|
Back to top |
|
|
schrippe Guru
Joined: 03 Mar 2004 Posts: 556 Location: Mülheim
|
Posted: Tue Feb 22, 2005 8:55 am Post subject: |
|
|
das heißt, man kann nun auch den download regeln? hat jemand sowas mit qdisc schon gemacht?
kann man da auf die regeln des scriptes hier im thread aufbauen?
danke _________________ for i in $(seq 1 565); do echo 'A$i: entweder rechts fahren oder rechts überholen dürfen!';done |
|
Back to top |
|
|
TheSmallOne Guru
Joined: 22 Jan 2005 Posts: 467 Location: Germany
|
Posted: Tue Feb 22, 2005 10:30 am Post subject: |
|
|
-–- gelöscht -–-
Last edited by TheSmallOne on Tue Dec 25, 2012 10:38 pm; edited 1 time in total |
|
Back to top |
|
|
Sonic Lux Guru
Joined: 07 Mar 2004 Posts: 375 Location: Dresden / Germany
|
Posted: Tue Feb 22, 2005 11:19 am Post subject: |
|
|
Hätte es nicht besser erklären können...
Und ja, ich habe incoming traffic mal eingeschränkt aber nach kurzer Zeit auf Grund von Sinnlosigkeit des Seins wieder abgestellt.
Down hat man eh genug wichtiger ist es eher den Upload ordentlich zu regulieren.
Vor allem diese Anomalie des DSL, das bei vollgestopftem Upload der Download einbricht ist eine Katastrophe. |
|
Back to top |
|
|
schrippe Guru
Joined: 03 Mar 2004 Posts: 556 Location: Mülheim
|
Posted: Fri Feb 25, 2005 10:23 am Post subject: |
|
|
Quote: | @the_mole:
bitte poste doch mal deine scripte. die würden mich doch sehr interessieren. vor allem, weil ich bisher nicht zufriedenstellend hinbekommen habe.
danke |
_________________ for i in $(seq 1 565); do echo 'A$i: entweder rechts fahren oder rechts überholen dürfen!';done |
|
Back to top |
|
|
Anarcho Advocate
Joined: 06 Jun 2004 Posts: 2970 Location: Germany
|
Posted: Fri Feb 25, 2005 10:44 am Post subject: |
|
|
Sonic Lux wrote: | Vor allem diese Anomalie des DSL, das bei vollgestopftem Upload der Download einbricht ist eine Katastrophe. |
Naja, als "Anomalie" würde ich es nicht bezeichnen. Man könnte es höchtens Designfehler nennen, wobei man beachten sollte das DSL für den Endanwender und nicht für nen Serverbetreiber gedacht ist, der in der Regel wenig upload benötigt.
Und der Grund ist auch recht einfach:
Wenn deine Upload-Leitung voll ist und du downloaden willst, dann musst du jedes TCP-Paket mit einem ACK bestätigen.
Kommt dieses nicht schnell genug an (weil deine outgoing-queue voll ist) wirkt das so genannte Congestion avoidance.
Beim Server gibt es ein Time-out für die nicht bestätigten Pakete und schickt diese nochmal mit verlangsamter Geschwindigkeit.
Das alles bremst natürlich deine Download-rate merklich ab.
Wenn du nun die ACK's in der Priorität hochsetzt kannst du damit Time-out verhindern. _________________ ...it's only Rock'n'Roll, but I like it! |
|
Back to top |
|
|
Sonic Lux Guru
Joined: 07 Mar 2004 Posts: 375 Location: Dresden / Germany
|
Posted: Fri Feb 25, 2005 11:12 am Post subject: |
|
|
Weiß ich doch
Aber ich finde 16k im Vergleich zu ~120k trotzdem viel zu wenig.
Ich möchte mal was auf meinen Server upen und das dauert dann immer ewig |
|
Back to top |
|
|
the_mole n00b
Joined: 14 Jan 2005 Posts: 64 Location: Erlangen, Germany
|
Posted: Tue Mar 22, 2005 11:29 pm Post subject: |
|
|
Servus.
Sorry, hab den thread total vergessen, da ich kein Notify eingeschaltet hatte...
Werde mich mal darum kümmern, dass mein Kumpel die Skripte hier rein schreibt.
Übrigens, die Regelung in IPTables ist schon daher sinnvoll, weil man nach Process-IDs filtern kann, und sogar den Layer7-Paket-Filter für das Shaping missbrauchen kann. Dann ist auch eine effektive regelung von File-Sharing-Traffic möglich.
cu _________________ The software required Windows 98/2000/XP or better... So I installed Linux |
|
Back to top |
|
|
Flintz n00b
Joined: 29 Sep 2004 Posts: 48
|
Posted: Wed Mar 23, 2005 12:00 am Post subject: |
|
|
ok, mole wollte dass ich mal mein skript poste, hier ist es.
ist aber noch absolut nicht fertig, also nicht wundern wenn ihr noch ungereimtheiten oder ähnliches findet
arbeitet übrigens mit packages die mit iptables gemarked werden, und eher weniger mit direkten filter regeln
Code: |
#!/bin/sh
#
# Your outbound interface
DEV=ppp0
# Your upstream capacity in kbit
UPLINK_REAL=512
DOWNLINK_REAL=3072
UPLINK_PERCENT=90
#DOWNLINK_PERCENT=15
# Calculate actual max bandwidth
UPLINK=$[UPLINK_PERCENT*UPLINK_REAL/100]
#DOWNLINK=$[DOWNLINK_PERCENT*DOWNLINK_REAL/100]
# Set how much bandwidth to use for each class
UPLINK_10_R=$[20*UPLINK/100]
UPLINK_20_R=$[24*UPLINK/100]
UPLINK_30_R=$[40*UPLINK/100]
UPLINK_40_R=$[5*UPLINK/100]
UPLINK_50_R=$[10*UPLINK/100]
UPLINK_60_R=$[1*UPLINK/100]
# The same as above, but here you set the ceiling, ie. how much a class is allowed to borrow from another
UPLINK_10_C=$UPLINK
UPLINK_20_C=$UPLINK
UPLINK_30_C=$UPLINK
UPLINK_40_C=$[9*UPLINK/10]
UPLINK_50_C=$[7*UPLINK/10]
UPLINK_60_C=$[8*UPLINK/10]
# DirectConnection port
# In newer versions of DC++ there is no default.
# Please set your port used in DC++ here.
PORT_DC=20000
# Set full path to TC command, unless it's in PATH
TC=tc
# Remove existing qdisc
tc qdisc del dev $DEV root 2> /dev/null > /dev/null
tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null
################### QUEUE DISCIPLINES
# Add root qdisc
$TC qdisc add dev $DEV root handle 1: htb default 40
# Add master qdisc
$TC class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit
# Add prio 0 queue (highest)
$TC class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK_10_R}kbit ceil ${UPLINK_10_C}kbit prio 0 burst 6k
$TC qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
# Add prio 1 queue
$TC class add dev $DEV parent 1:1 classid 1:20 htb rate ${UPLINK_20_R}kbit ceil ${UPLINK_20_C}kbit prio 1 burst 2k
$TC qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10
# Add prio 2 queue (and subqueues)
$TC class add dev $DEV parent 1:1 classid 1:30 htb rate ${UPLINK_30_R}kbit ceil ${UPLINK_30_C}kbit prio 2
$TC class add dev $DEV parent 1:30 classid 1:31 htb rate $[4*UPLINK_30_R/10]kbit ceil ${UPLINK_30_C}kbit prio 1 burst 8k #Teamspeak
$TC qdisc add dev $DEV parent 1:31 handle 31: sfq perturb 10
$TC class add dev $DEV parent 1:30 classid 1:32 htb rate $[3*UPLINK_30_R/10]kbit ceil ${UPLINK_30_C}kbit prio 2 burst 6k #UT2004
$TC qdisc add dev $DEV parent 1:32 handle 32: sfq perturb 10
$TC class add dev $DEV parent 1:30 classid 1:33 htb rate $[1*UPLINK_30_R/10]kbit ceil ${UPLINK_30_C}kbit prio 3 burst 2k #FTP
$TC qdisc add dev $DEV parent 1:33 handle 33: sfq perturb 10
$TC class add dev $DEV parent 1:30 classid 1:34 htb rate $[2*UPLINK_30_R/10]kbit ceil ${UPLINK_30_C}kbit prio 2 burst 3k #UT2004
$TC qdisc add dev $DEV parent 1:34 handle 34: sfq perturb 10
# Add prio 3 queue
$TC class add dev $DEV parent 1:1 classid 1:40 htb rate ${UPLINK_40_R}kbit ceil ${UPLINK_40_C}kbit prio 3 burst 4k
$TC qdisc add dev $DEV parent 1:40 handle 40: sfq perturb 10
# Add prio 4 queue (lowest)
$TC class add dev $DEV parent 1:1 classid 1:50 htb rate ${UPLINK_50_R}kbit ceil ${UPLINK_50_C}kbit prio 4
$TC qdisc add dev $DEV parent 1:50 handle 50: sfq perturb 10
# Add prio 5 queue (default queue)
$TC class add dev $DEV parent 1:1 classid 1:60 htb rate ${UPLINK_60_R}kbit ceil ${UPLINK_60_C}kbit prio 5
$TC qdisc add dev $DEV parent 1:60 handle 60: sfq perturb 10
################### FILTERS
# CLASS 10: TCP/ACK, ICMP, Games, ICQ, SSH etc.
$TC filter add dev $DEV protocol ip parent 1: prio 1 u32 match ip protocol 6 0xff match u8 0x05 0x0f at 0 \
match u16 0x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:10
$TC filter add dev $DEV parent 1: protocol ip prio 1 u32 match ip protocol 1 0xff flowid 1:10 #ICMP
$TC filter add dev $DEV parent 1: protocol ip prio 1 u32 match ip tos 0x10 0xff flowid 1:10 #SSH
#$TC filter add dev $DEV parent 1: protocol ip prio 1 handle 13 fw flowid 1:10 #Games
$TC filter add dev $DEV parent 1: protocol ip prio 2 handle 14 fw flowid 1:10 #ICQ
# CLASS 20: Standard Traffic, HTTP, FTP, MAIL, Shoutcast, IRC
$TC filter add dev $DEV parent 1: protocol ip prio 2 handle 21 fw flowid 1:20 #HTTP
$TC filter add dev $DEV parent 1: protocol ip prio 3 handle 22 fw flowid 1:20 #FTP (lan traffic)
$TC filter add dev $DEV parent 1: protocol ip prio 4 handle 23 fw flowid 1:20 #Mail (Pop3, Imap)
$TC filter add dev $DEV parent 1: protocol ip prio 4 handle 24 fw flowid 1:20 #Shoutcast
$TC filter add dev $DEV parent 1: protocol ip prio 2 handle 25 fw flowid 1:20 #IRC
# CLASS 30: Server: TS, UT, FTP, HTTP
$TC filter add dev $DEV parent 1: protocol ip prio 2 handle 31 fw flowid 1:31 #TS Server
$TC filter add dev $DEV parent 1: protocol ip prio 2 handle 32 fw flowid 1:32 #UT Server
$TC filter add dev $DEV parent 1: protocol ip prio 5 handle 33 fw flowid 1:33 #FTP Server
$TC filter add dev $DEV parent 1: protocol ip prio 3 handle 34 fw flowid 1:34 #HTTP Server
# CLASS 40: Unclassified traffic
# CLASS 50: P2P Traffic
$TC filter add dev $DEV parent 1: protocol ip prio 12 handle 5 fw flowid 1:50
#INGRESS Policing
#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
################### PRINT OUT SETTINGS
# Report settings
#echo "************************* QDISC ******************************"
#$TC qdisc show dev $DEV
#echo "************************* CLASS ******************************"
#$TC class show dev $DEV
# Disabled cause output is quite cryptic, anyone now a more readable way to report this?
#echo "************************* FILTER *****************************"
#$TC filter show dev $DEV
|
|
|
Back to top |
|
|
|