All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tilman Giese <tilman.giese@globalview.de>
To: lartc@vger.kernel.org
Subject: [LARTC] Question about subclasses and filters
Date: Sun, 03 Aug 2003 07:46:40 +0000	[thread overview]
Message-ID: <marc-lartc-105989687610699@msgid-missing> (raw)

Hi,

unfortunately I did not get any response to my last message, so let me 
describe my problem in detail.

I am setting up a router that is responsible for four different offices 
like shown below:

                |--- Office 1 (192.168.100.242)
                |
   __________   |--- Office 2 (192.168.100.243)
---| Router |---|
   ----------   |--- Office 3 (192.168.100.244)
                |
                |--- Office 4 ------- 192.168.100.245
                                 |
                                 |--- 192.168.100.246
                                 |
                                 |--- 192.168.100.247

Each office should have one fourth of the available bandwidth, but can 
borrow bandwidth if necessary. 192.168.0.246 in Office 4 is something 
special. This server should have a maximum of one fourth.

Therefore I created the following classes:

# queuing discipline
tc qdisc add dev eth1 root handle 1: cbq bandwidth 2MBit allot 1514 cell 
8 avpkt 1000 mpu 64

# root class
tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 2MBit rate 
2MBit allot 1514 cell 8 weight 200KBit prio 5 maxburst 20 avpkt 1000

# offices
tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 2MBit rate 
512KBit allot 1514 cell 8 weight 50KBit prio 5 maxburst 20 avpkt 1000
tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth 2MBit rate 
512KBit allot 1514 cell 8 weight 50KBit prio 5 maxburst 20 avpkt 1000
tc class add dev eth1 parent 1:1 classid 1:4 cbq bandwidth 2MBit rate 
512KBit allot 1514 cell 8 weight 50KBit prio 5 maxburst 20 avpkt 1000
tc class add dev eth1 parent 1:1 classid 1:5 cbq bandwidth 2MBit rate 
512KBit allot 1514 cell 8 weight 50KBit prio 5 maxburst 20 avpkt 1000

# Special treatment for 192.168.100.246
tc qdisc add dev eth1 parent 1:5 handle 2: cbq bandwidth 512KBit allot 
1514 cell 8 avpkt 1000 mpu 64
tc class add dev eth1 parent 2:0 classid 2:1 cbq bandwidth 512KBit rate 
512KBit allot 1514 cell 8 weight 50KBit prio 5 maxburst 20 avpkt 1000
tc class add dev eth1 parent 2:1 classid 2:2 cbq bandwidth 512KBit rate 
128KBit allot 1514 cell 8 weight 12KBit prio 5 maxburst 20 avpkt 1000

Then I added the following filters:

tc filter add dev eth1 parent 1:0 prio 5 protocol ip u32
tc filter add dev eth1 parent 1:0 prio 5 protocol ip u32 match ip dst 
192.168.100.242 flowid 1:2
tc filter add dev eth1 parent 1:0 prio 5 protocol ip u32 match ip dst 
192.168.100.243 flowid 1:3
tc filter add dev eth1 parent 1:0 prio 5 protocol ip u32 match ip dst 
192.168.100.244 flowid 1:4
tc filter add dev eth1 parent 1:0 prio 5 protocol ip u32 match ip dst 
192.168.100.245 flowid 1:5
tc filter add dev eth1 parent 1:0 prio 5 protocol ip u32 match ip dst 
192.168.100.247 flowid 1:5

# Special treatment for 192.168.100.246
tc filter add dev eth1 parent 2:0 prio 5 protocol ip u32
tc filter add dev eth1 parent 2:0 prio 5 protocol ip u32 match ip dst 
192.168.100.246 flowid 2:2

Everything okay up to here. But then I looked ar the following:

# tc -s class show dev eth1

class cbq 2: root rate 512Kbit (bounded,isolated) prio no-transmit
 Sent 261534164 bytes 433080 pkts (dropped 0, overlimits 0)
  borrowed 0 overactions 0 avgidle 12499 undertime 0
class cbq 2:1 parent 2: rate 512Kbit prio 5
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
  borrowed 0 overactions 0 avgidle 12499 undertime 0
class cbq 2:2 parent 2:1 rate 128Kbit prio 5
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
  borrowed 0 overactions 0 avgidle 1.13741e+06 undertime 0
class cbq 1: root rate 2Mbit (bounded,isolated) prio no-transmit
 Sent 142271650091 bytes 210353356 pkts (dropped 0, overlimits 0)
  borrowed 0 overactions 0 avgidle 3124 undertime 0
class cbq 1:1 parent 1: rate 2Mbit prio no-transmit
 Sent 2136522126 bytes 2961604 pkts (dropped 0, overlimits 0)
  borrowed 432995 overactions 0 avgidle 3124 undertime 0
class cbq 1:2 parent 1:1 rate 512Kbit prio 5
 Sent 6450824 bytes 12703 pkts (dropped 0, overlimits 0)
  borrowed 7022 overactions 0 avgidle 282608 undertime 0
class cbq 1:3 parent 1:1 rate 512Kbit prio 5
 Sent 1846942719 bytes 2448726 pkts (dropped 0, overlimits 0)
  borrowed 420044 overactions 0 avgidle 284352 undertime 0
class cbq 1:4 parent 1:1 rate 512Kbit prio 5
 Sent 21594419 bytes 67095 pkts (dropped 0, overlimits 0)
  borrowed 5312 overactions 0 avgidle 284352 undertime 0
class cbq 1:5 parent 1:1 leaf 2: rate 512Kbit prio 5
 Sent 261534164 bytes 433080 pkts (dropped 0, overlimits 0)
  borrowed 617 overactions 0 avgidle 284352 undertime 0

Now I have two questions.

1. Why is the package count of class 2:0 equal to the one of class 1:5?
2. Why are there no packets in class 2:2 and 2:1 respectively?

It would be nice if someone could help me or show me a place where I can 
find an answer to my questions.

Thanks in advance.

Tilman Giese

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

             reply	other threads:[~2003-08-03  7:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-03  7:46 Tilman Giese [this message]
2003-08-03  9:42 ` [LARTC] Question about subclasses and filters 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-105989687610699@msgid-missing \
    --to=tilman.giese@globalview.de \
    --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.