All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] HTB and filters
@ 2003-03-17 21:01 Stephane Ouellette
  2003-03-17 21:12 ` Stef Coene
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stephane Ouellette @ 2003-03-17 21:01 UTC (permalink / raw)
  To: lartc

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-03-17 22:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-17 21:01 [LARTC] HTB and filters Stephane Ouellette
2003-03-17 21:12 ` Stef Coene
2003-03-17 21:35 ` Stephane Ouellette
2003-03-17 22:44 ` Stef Coene

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.