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 14:28:00 +0000	[thread overview]
Message-ID: <4173D2F0.1080909@peterschen.de> (raw)
In-Reply-To: <41738A35.9070404@peterschen.de>

Hi,

okay, but I think I have some problems understanding the interaction 
between upload and download. How I have to define my traffic classes to 
match upload and download depending on each other?

Greets
Christoph

Peter Huetmannsberger wrote:

>Hi 
>
>like I said, I am new too, so take this with a grain of salt. 
>
>  
>
>>unfortunately there is only one interface for the customers. My problem 
>>is to limit the up AND down speed in dependence to each other.
>>    
>>
>
>Downloads become uploads on your internal interface!
>
>so if eth0 is your external interface a download would be INCOMING on eth0 
>but as it is going on to your internal interface (e.g. eth1) it becomes an 
>upload to your customer. So incoming traffic from the internet to your 
>customers is outgoing on eth1. 
>
>if you do this on eth1: 
>--------------
>#!/bin/bash
>tc qdisc add dev eth1 root handle 1: htb default 20
>tc class add dev eth1 parent 1: classid 1:1 htb rate 90mbit burst 15k
>tc class add dev eth1 parent 1:1 classid 1:10 htb rate 10mbit 
>                                                      prio 0 burst 15k
>tc class add dev eth1 parent 1:1 classid 1:20 htb rate 1mbit ceil 1mbit
>						      burst 6k prio 1
>U32="tc filter add dev eth1 protocol ip parent 1:0 prio 0 u32"
>$U32 match ip dst 192.168.1.19 flowid 1:10
>---------------
>
>Then you have split the traffic into two classes: 
>
>one for the preferred customer, who gets 10Mbit and a default for all the 
>other traffic, which gets 1Mbit. It still leaves a lot of bandwidth 
>unused! (79 Mbit)
>
>I have made the experience (which cost me an awful lot of time) that 
>assuming the interface woudl produce excactly 100Mbit is a mistake and htb 
>does unexpected things. It is probably bets to lower the parent class 
>trafic 1: to something about 10% below your actual internet connection, 
>even on your internal interface. (Please correct me if I am completely 
>wrong!) I used iptraf to have a look on the throughput. 
>
>
>You would have to do something similar for actual uploads from your 
>customers to the internet on eth0, but as you probably nat the traffic I 
>am not certain what you would do there! Anyone else?
>
>greetings, 
>
>.peter
>
>
>
>  
>

_______________________________________________
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 14:28 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
2004-10-18 12:04 ` Peter Huetmannsberger
2004-10-18 14:28 ` Christoph Petersen [this message]
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=4173D2F0.1080909@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