Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Nataniel Klug <nata@cnett.com.br>
To: lartc@vger.kernel.org
Subject: [LARTC] Configuration of my QoS ruleset (now working fine with u32
Date: Wed, 05 Apr 2006 12:03:30 +0000	[thread overview]
Message-ID: <4433B212.9010002@cnett.com.br> (raw)

    Hello all,

    As I have promised I am sending my QoS rules. This now works fine 
with u32 classifier (and parent 1:0 that I could not understand why it 
did not worked well before).

Att,

Nataniel Klug

------------------------
#!/bin/sh
#------
# Script de QoS Cyber Nett
#------
# Nataniel Klug
# suporte@cnett.com.br
#------

TC="/sbin/tc"
IPT="/usr/local/sbin/iptables"

DL="eth1"

#------
# Apagando regras antigas de QoS
#------
$TC qdisc del dev $DL root    2> /dev/null > /dev/null
$TC qdisc del dev $DL ingress 2> /dev/null > /dev/null

#------
# Regras para a placa eth1
#------
$TC qdisc add dev $DL root handle 1: htb default 40

CLASS="/sbin/tc class add dev $DL parent"
$CLASS 1: classid 1:1 htb rate 3096Kbit
$CLASS 1:1 classid 1:10 htb rate 2048Kbit ceil 3096Kbit
$CLASS 1:1 classid 1:20 htb rate 1024Kbit ceil 3096Kbit
$CLASS 1:1 classid 1:30 htb rate 1024Kbit ceil 2048Kbit
$CLASS 1:1 classid 1:40 htb rate 512Kbit ceil 2048Kbit

QDISC="/sbin/tc qdisc add dev $DL parent"
$QDISC 1:10 handle 10: sfq perturb 10
$QDISC 1:20 handle 20: sfq perturb 10
$QDISC 1:30 handle 30: sfq perturb 10
$QDISC 1:40 handle 40: sfq perturb 10

FILTER="/sbin/tc filter add dev $DL parent 1:0 protocol ip prio 1 u32"
#----
# Regras com maior prioridade
# APENAS NAVEGACAO E PING
#----
$FILTER match ip sport 80 0xffff flowid 1:10
$FILTER match ip sport 443 0xffff flowid 1:10
$FILTER match ip sport 3128 0xffff flowid 1:10
$FILTER match ip protocol 1 0xff flowid 1:10
#----
# Regra especial para o conteudo
# ns2.cnett.com.br
#----
$FILTER match ip src 200.163.208.4/32 flowid 1:10
$FILTER match ip src 200.163.208.5/32 flowid 1:10
#----
# Regras com prioridade mediana
# DNS, SSH, Telnet
#----
$FILTER match ip sport 22 0xffff flowid 1:20
$FILTER match ip sport 23 0xffff flowid 1:20
$FILTER match ip sport 53 0xffff flowid 1:20
$FILTER match ip sport 2202 0xffff flowid 1:20
#----
# Regras com prioridade baixa
# Mail
#----
$FILTER match ip sport 25 0xffff flowid 1:30
$FILTER match ip sport 110 0xffff flowid 1:30
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

                 reply	other threads:[~2006-04-05 12:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4433B212.9010002@cnett.com.br \
    --to=nata@cnett.com.br \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox