All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephane Ouellette <ouellettes@videotron.ca>
To: lartc@vger.kernel.org
Subject: [LARTC] HTB and filters
Date: Mon, 17 Mar 2003 21:01:42 +0000	[thread overview]
Message-ID: <marc-lartc-104793496727887@msgid-missing> (raw)

Folks,

    after spending a lot of time experimenting with HTB, I found that 
filters cannot be attached to HTB  classes...

The class hierarchy I use is the following (for my upstream internet link):


               PRIO (with priomap that sends everything by default to 
class 1:3)
             /   |   \
            /    |    \
           /     |     \
        1:1     1:2     1:3
      PFIFO    PFIFO    HTB qdisc (default to 4:100)
                         |
                         |
                        4:1
                      HTB class (100% bandwidth)
                      /       \
                     /         \
                 4:100          4:200
          (50% bandwidth)     (50% bandwidth)
          ---- HTB class      HTB class--------\
         /     /   |   \        |   \     \     \
        /     /    |    \       |    \     \     \
   4:110  4:120 4:130 4:140   4:210  4:220 4:230 4:240
    HTB     HTB   HTB   HTB    HTB    HTB   HTB   HTB
     |       |     |     |      |      |     |     |
     |       |     |     |      |      |     |     |
    SFQ     SFQ   SFQ   SFQ    SFQ    SFQ   SFQ   SFQ


NOTES:

Class 1:1 is used for NTP
Class 1:2 is used for DNS and ICMP

Classes 4:100 and 4:200 are used to divide bandwidth between two hosts

Classes 4:110 and 4:210 are used for audio and video traffic
Classes 4:120 and 4:220 are used for interactive traffic  (such as HTTP)
Classes 4:130 and 4:230 are used for bulk traffic  (such as FTP downloads)
Classes 4:140 and 4:240 are used for idle traffic  (such as POP3 and SMTP)


Related tc commands:

# Traffic from $HOST_B must be sent to 4:200
tc filter add dev eth1 parent 4: u32 match ip src $HOST_B flowid 4:200
# Everything else comes from $HOST_A and is sent to 4:100


# For each host, divide the traffic according to its nature
tc filter add dev eth1 parent 4:100 protocol ip prio 10 handle 
$MARK_REALTIME fw flowid 4:110
tc filter add dev eth1 parent 4:100 protocol ip prio 20 handle 
$MARK_INTERACTIVE fw flowid 4:120
tc filter add dev eth1 parent 4:100 protocol ip prio 30 handle 
$MARK_BULK fw flowid 4:130
tc filter add dev eth1 parent 4:100 protocol ip prio 40 handle 
$MARK_IDLE fw flowid 4:140

tc filter add dev eth1 parent 4:200 protocol ip prio 10 handle 
$MARK_REALTIME fw flowid 4:210
tc filter add dev eth1 parent 4:200 protocol ip prio 20 handle 
$MARK_INTERACTIVE fw flowid 4:220
tc filter add dev eth1 parent 4:200 protocol ip prio 30 handle 
$MARK_REALTIME fw flowid 4:230
tc filter add dev eth1 parent 4:200 protocol ip prio 40 handle 
$MARK_REALTIME fw flowid 4:240


If I print statistics, the filters attached to HTB classes never 
match...  :-(

Does anyone know what's going wrong ???

Stephane



_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

             reply	other threads:[~2003-03-17 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-17 21:01 Stephane Ouellette [this message]
2003-03-17 21:12 ` [LARTC] HTB and filters Stef Coene
2003-03-17 21:35 ` Stephane Ouellette
2003-03-17 22:44 ` Stef Coene

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=marc-lartc-104793496727887@msgid-missing \
    --to=ouellettes@videotron.ca \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.