All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pieter Vanmeerbeek <pv@able.be>
To: lartc@vger.kernel.org
Subject: [LARTC] Ingress and polishing
Date: Wed, 27 Apr 2005 12:01:18 +0000	[thread overview]
Message-ID: <426F7F0E.3030805@able.be> (raw)

Hi,

We are using kernel 2.4.24, tcng version 10b.

I'm trying to do some policing in the ingress queue of the internet 
device. Until now we had configured some filters dividing traffic into 
queues, and on these queues the Double Leaky bucket meter was applied. 
The idea is to have a minimum of bandwidth assigned per class (the cir 
values) and a maximum (pir values), just as with the HTB  meter. (see 
'code 1' at the bottom of the mail for the configuration).

However after reading in the 'Traffic Control - Next generation 
reference Manual' -  p41 of the nov 20, 2003 release - I understood 
(correct me if I'm wrong), this implementation of the DLB would result 
in usage as a SLB :
the pir bucket would fill-up ( 3 tokens in the pir bucket for 1 token in 
the cir bucket), thus the first check using the pir bucket would always 
be yes, and thus bypassed. As sush we are using the DLB as a SLB.

So my question is , is there a way to implement the behavior we want? ( 
minimum and maximum of bandwith per class)

I already tried the srTCM meter but this gave me the following error on 
compiling : don't know how to build meter for this . The code can be 
found below under 'code 2'

The srTCM meter is only a partial solution to our problem as it allows 
configuration of a max burst in kB but not a maximum rate in kbps.


Kind regards,
Pieter
Able


Code 1 :
-----------------
// incoming traffic
        ingress {
                // speeds
                $medium_cir             = $maxDownstream / 4;
                $medium_pir             = $maxDownstream / 4 * 2;
                $low_cir                = $maxDownstream / 4;
                $low_pir                = $maxDownstream / 4;
                // variables to make categories
                $is_medium              = (tcp_sport = PORT_SMTP);
                $is_low                 = 1;
                // Double Leaky Buckets
                $is_medium_pol          = DLB(cir $medium_cir bps,cbs 
20kB,pir $medium_pir bps,pbs 5kB);
                $is_low_pol             = DLB(cir $low_cir bps,cbs 
20kB,pir $low_pir bps,pbs 5kB);
                // do the policing
                class (<>)
                        if $is_medium && DLB_ok($is_medium_pol);
                drop if $is_medium;
                class (<>)
                        if $is_low && DLB_ok($is_low_pol);
                drop if $is_low;

code 2 :
--------------------------
// incoming traffic
        ingress {
                // speeds
                $medium_cir             = $maxDownstream / 4;
                $low_cir                = $maxDownstream / 4;
                // variables to make categories
                $is_medium              = (tcp_sport = PORT_SMTP);
                $is_low                 = 1;
                // Double Leaky Buckets
                $is_medium_pol          = srTCM(cir $medium_cir bps,cbs 
20kB,ebs 40kB);
                $is_low_pol             = srTCM(cir $low_cir bps,cbs 
20kB,ebs 50kB);
                // do the policing
                class (<>)
                        if $is_medium && srTCM_green($is_medium_pol);
                drop if $is_medium;
                class (<>)
                        if $is_low && srTCM_green($is_low_pol);
                drop if $is_low;
        }

--
aXs GUARD has completed security and anti-virus checks on this e-mail
(http://www.axsguard.com)
---------------------------------------------------
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

                 reply	other threads:[~2005-04-27 12:01 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=426F7F0E.3030805@able.be \
    --to=pv@able.be \
    --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.