Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Arkadiusz Miskiewicz <misiek@pld.ORG.PL>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] bnig number of interfaces and upstream limit
Date: Sun, 11 Aug 2002 10:41:35 +0000	[thread overview]
Message-ID: <marc-lartc-102916834521181@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102901727632275@msgid-missing>

Arkadiusz Miskiewicz <misiek@pld.ORG.PL> writes:

> Hi,
> 
> The problem is: I have PPPoE (ppp over eth) server and 100 clients.
> For each client new pppX interface is created.
> 
> Now I want to limit max speed on each interface to different
> values. For example
> ppp0 - downstream 256kbit, upstream 128kbit
> ppp1 - downstream 512kbit, upstream 512kbit
> ...
> 
> Downstream is easy - I just add htb rule on user pppX interface
> and that's all. 100 rules for 100 clients.
> 
> Upstream seems be big problem because AFAIK htb (cbq, too) must
> be attached to outgoing interface which means that in my
> case for each client there is 99 potential outgoing interfaces.
Uhm, it was so easy ;)

part of my python script now

    os.system("tc qdisc del root dev %s 2> /dev/null" % ppp_iface)
    os.system("tc qdisc del dev %s ingress 2> /dev/null" % ppp_iface)
    
    # downstream
    os.system("tc qdisc add dev %s root tbf rate %skbit latency 50ms burst 1540"
              % (ppp_iface, speed_down))
    
    # upstream
    os.system("tc qdisc add dev %s handle ffff: ingress" % ppp_iface)
    os.system("tc filter add dev %s parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate %skbit burst 10k drop flowid :1" % (ppp_iface, speed_up))

-- 
Arkadiusz Mi¶kiewicz   IPv6 ready PLD Linux at http://www.pld.org.pl
misiek(at)pld.org.pl   AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PWr
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  reply	other threads:[~2002-08-11 10:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-10 22:06 [LARTC] bnig number of interfaces and upstream limit Arkadiusz Miskiewicz
2002-08-11 10:41 ` Arkadiusz Miskiewicz [this message]
2002-08-11 18:02 ` 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-102916834521181@msgid-missing \
    --to=misiek@pld.org.pl \
    --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