Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Christoph Petersen <lists@peterschen.de>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] IP based bandwith limit
Date: Mon, 18 Oct 2004 10:19:23 +0000	[thread overview]
Message-ID: <417398AB.3080303@peterschen.de> (raw)
In-Reply-To: <41738A35.9070404@peterschen.de>

Hi,

unfortunately there is only one interface for the customers. My problem 
is to limit the up AND down speed in dependence to each other.

So customer A get a bandwith of 2Mbit this is up AND down so if he 
downloads with 1Mbit he gets a max upload speed of 1Mbit.

I've tried it with htb like this:

#!/bin/sh
TC=/sbin/tc
DEV=eth0

$TC qdisc add dev $DEV root handle 1 htb default 90
$TC qdisc add dev $DEV handle ffff: ingress
$TC class add dev $DEV parent 1: classid 1:2 htb rate 100Mbit burst 6k

$TC class add dev $DEV parent 1:2 classid 1:10 htb rate 10kbps ceil 10kbps
$TC filter add dev $DEV parent 1:0 protocol ip prio 100 u32 \
    match ip dst 192.168.1.19 \
    classid 1:10

$TC filter add dev $DEV parent ffff: protocol ip prio 50 u32 \
    match ip src 192.168.1.19 \
    police rate 10kbps burst 10k drop flowid 1:10

this is my internal test. But it wouldn't work with dependence to each 
other...

Greets
Christoph

Peter Huetmannsberger wrote:

>Hi!
>
>Again, beware, that I am new to this myself, but if there is no borrowing 
>necessary, does that mean you have more than 12 Mbit to hand out. If so, I 
>assume you have one interface per customer, in which case you could use 
>tbf on each interface. If both customers are behind the same interface you 
>could use htb and lower the ceiling per customer, which has the same 
>effect, with a filter rule for each customer --> class, based on ip 
>address. 
>
>Hope this helps, correct me if I am wrong. 
>
>.peter
>
>
>On Mon, 18 Oct 2004, Christoph Petersen wrote:
>
>  
>
>>Hi,
>>
>>i've following problem. One of our gateway router, which connects some 
>>of our customers should have bandwith limit.
>>
>>So customer A with IP XX should have 2 Mbit, customer B with IP YY 
>>should have 10 Mbit. There is no need of borrowing bandwith so no 
>>fairness needed.
>>
>>My simple question: with which technique should I manage this shaping? 
>>Or is there any existing project which provides this allready?
>>
>>Greets
>>Christoph
>>_______________________________________________
>>LARTC mailing list / LARTC@mailman.ds9a.nl
>>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>>
>>    
>>
>
>
>
>  
>

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

  parent reply	other threads:[~2004-10-18 10:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-18  9:17 [LARTC] IP based bandwith limit Christoph Petersen
2004-10-18 10:00 ` Peter Huetmannsberger
2004-10-18 10:19 ` Christoph Petersen [this message]
2004-10-18 12:04 ` Peter Huetmannsberger
2004-10-18 14:28 ` Christoph Petersen
2004-10-18 15:09 ` Andreas Klauer
2004-10-18 15:38 ` Christoph Petersen
2004-10-19 11:03 ` Cow
2004-10-19 13:08 ` james jones
2004-10-19 13:42 ` [LARTC] " Christoph Petersen
2004-10-19 14:17 ` Peter Huetmannsberger
2004-10-19 14:17 ` [LARTC] " Christoph Petersen

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=417398AB.3080303@peterschen.de \
    --to=lists@peterschen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox