Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Erestor Elensar <erestor.elensar@gmail.com>
To: lartc@vger.kernel.org
Subject: [LARTC] Traffic goes not through filters.
Date: Sat, 03 Feb 2007 15:08:17 +0000	[thread overview]
Message-ID: <45C4A561.7040904@gmail.com> (raw)

Hi,

I think i have made an error with my filters but i can't find it.
We have a site to site tunnel and want to separate the traffic in two
queues, http and business.

I'm now filtering on protocol 8080 prio 2 and ip range prio 1.
As i read the manual i've seen that the filters are executed by prio
means that all goes trough the buisiness queue because all traffic is
for the same ip range.
And indeed i see only traffic in 1:30 and not in 1:20


Can someone tell me how to set this up ?

Thanks.


My code:

#!/bin/ksh

# QOS schema ----------------------------------------
#                 QDISC-ID 1:
#                    |
#              MAINCLASS-ID 1:1
#             /                \
#           1:20:             1:30:
#            |                  |
#   	    SQF                SQF
#        FILTER 1:          FILTER 1:
#
# 1:10 Always reserved for VOIP even not used
# 1:20 HTTP
# 1:30 All other data (could be split-up in 1:30)
#
# This script requires a parameter
#----------------------------------------------------

#set -o xtrace

# Variablen
DEV="tun3"

MAXBAND="256Kbit"

QDISC_ID="1"
QDISC_DEFAULT_HTB="10"

MAINCLASS_HANDLE="1"
MAINCLASS_ID="${QDISC_ID}:${MAINCLASS_HANDLE}"

# HANDLE 10 is reserved for VOIP
HTTP_HANDLE="20"
HTTP_CLASS_ID="${QDISC_ID}:${HTTP_HANDLE}"
HTTP_RATE="64Kbit"
HTTP_PRIO="3"

DATA_HANDLE="30"
DATA_CLASS_ID="${QDISC_ID}:${DATA_HANDLE}"
DATA_RATE="192Kbit"
DATA_PRIO="2"


# Check the parameter
case "$1" in

start)
    # The root queue
    tc qdisc add dev ${DEV} root handle ${QDISC_ID}: htb default
${QDISC_DEFAULT_HTB}
    # The main Class with the full bandwitdth of 256Kbit
    tc class add dev ${DEV} parent ${QDISC_ID}: classid ${MAINCLASS_ID}
htb rate ${MAXBAND}

    # Classes for each queue
    # HTTP 64Kbit burst MaxBand
    tc class add dev ${DEV} parent ${MAINCLASS_ID} classid
${HTTP_CLASS_ID} htb rate ${HTTP_RATE} ceil ${MAXBAND}
    tc qdisc add dev ${DEV} parent ${HTTP_CLASS_ID} handle
${HTTP_HANDLE}: sfq perturb ${HTTP_HANDLE}
    # All other traffic burst MaxBand
    tc class add dev ${DEV} parent ${MAINCLASS_ID} classid
${DATA_CLASS_ID} htb rate ${DATA_RATE} ceil ${MAXBAND}
    tc qdisc add dev ${DEV} parent ${DATA_CLASS_ID} handle
${DATA_HANDLE}: sfq  perturb ${DATA_HANDLE}

    # The Filters that will transport the traffic through the wright Class
    # HTTP
    tc filter add dev ${DEV} protocol ip parent ${QDISC_ID}: prio
${HTTP_PRIO} u32 match ip sport 8080 0xffff flowid ${HTTP_CLASS_ID}
    # Other data
    tc filter add dev ${DEV} protocol ip parent ${QDISC_ID}: prio
${DATA_PRIO} u32 match ip dst 10.32.0.0/22 flowid ${DATA_CLASS_ID}
;;


stop)
    tc qdisc del dev ${DEV} root
;;


status)
    tc -s class show dev ${DEV}
;;

esac







_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

                 reply	other threads:[~2007-02-03 15:08 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=45C4A561.7040904@gmail.com \
    --to=erestor.elensar@gmail.com \
    --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