All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcus Fritzsch <marcus.fritzsch@gmx.net>
To: lartc@vger.kernel.org
Subject: [LARTC] limiting bandwidth on iface
Date: Wed, 23 Mar 2005 13:33:02 +0000	[thread overview]
Message-ID: <4241700E.40800@gmx.net> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there!

Well, as an exercise, I try 'simulating' an adsl link (just the speed ;o))
with a GRE tunnel and HTB for bandwidth limiting. Typically in germany
adsl has about 1024kbit downstream and 128kbits upstream (yes, there are
others ;) but these are what I have) - which are the values i try to simulate.

Here is the snipped that does the real thing on the client-side:

- -----snip-----
~     23 # now setup shaping to dsl-like-speed (up:128, down:1024 - this \
~        is the dsl-client)
~     24 $tc qdisc del dev $tun root >&- 2>&-
~     25 $tc qdisc add dev $tun root handle 1: htb
~     26
~     27 # shapiung class of root --> not more than 1mbit bandwidth
~     28 $tc class add dev $tun parent 1: classid 1:1 htb rate 1mbit \
~        burst 0 cburst 128
~     29
~     30 # this is for downstream
~     31 $tc class add dev $tun parent 1:1 classid 1:10 htb rate 1mbit
~     32 # this does upstream
~     33 $tc class add dev $tun parent 1:1 classid 1:20 htb rate \
~        128kbit burst 0 cburst 128
~     34
~     35 # add fairness queues for up- and downstream classes
~     36 $tc qdisc add dev $tun parent 1:10 handle 10: sfq perturb 5
~     37 $tc qdisc add dev $tun parent 1:20 handle 20: sfq perturb 5
~     38
~     39 # now take care of what is up- and what ist down-steam
~     40 U32="$tc filter add dev $tun protocol ip parent 1:0 prio 1 u32"
~     41 # everything that is from me is upstream
~     42 $U32 match ip src $tunip flowid 1:20
~     43 # everthing that comes to me is downstream
~     44 $U32 match ip dst $tunip flowid 1:10
- -----snap-----

eplanations:
$tunip is the ip of this end of the tunnel
$tc = tc

OK, I tryied this setup and noticed that approximately every 60 seconds,
the bandwidth gues up to about 256kbits for about 3 seconds - I have no
explanation for this - well, I do not really know what to set as parameter
for burst/cburst...

Any ideas, grave mistakes?



thanks a lot,

Marcus Fritzsch

- --
~                                          s(c,t){return isalpha(c)&&t?/*
Marcus Fritzsch <marcus.fritzsch@gmx.net>  ICQ:53118621  WWW:fritschy.de
~  GnuPG: gpg --keyserver sks.keyserver.penguin.de --recv-keys 98A1D365
*/s(65-c&&97-c?--c:c+25,--t):c;}main(){for(;;)putchar(s(getchar(),13));}

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCQXAM8lT6s5ih02URAha4AKCqbcvh8h4OqqaLKiKv806SsqdHrACgg8iw
kFyUksrkfYe+QQ4nKILAEKo=voOh
-----END PGP SIGNATURE-----
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

             reply	other threads:[~2005-03-23 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-23 13:33 Marcus Fritzsch [this message]
2005-03-23 16:08 ` [LARTC] limiting bandwidth on iface Brian Carrig
2005-03-24 12:14 ` Marcus Fritzsch

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=4241700E.40800@gmx.net \
    --to=marcus.fritzsch@gmx.net \
    --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.