All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Furniss <andy.furniss@dsl.pipex.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] newbie: TC[NG] with (256kbit/s down and 768kbit/s up)
Date: Mon, 26 Apr 2004 08:01:34 +0000	[thread overview]
Message-ID: <408CC1DE.10704@dsl.pipex.com> (raw)
In-Reply-To: <46799.82.82.95.252.1082769835.squirrel@mail.surakware.net>

Christian Parpart wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Sunday 25 April 2004 09:06, Andy Furniss wrote:
> 
>>Jason Boxman wrote:
>>
>>>Egress is easy.  Ingress seems to be a topic that is discussed often on
>>>LARTC, and I believe your options are to either use an ingress policer or
>>>the IMQ target.  The former you can do directly with tcng, the latter I
>>>believe you cannot.
>>
>>I know nothing about TCNG so can't help there.
>>
>>You can shape ingress without using IMQ as long as you have just one LAN
>>interface and don't care about traffic headed for the shaping PC. You
>>just shape on the LAN interface.
> 
> 
> But *how* does such a setup now looks like, either in tcng or in gc syntax?
> 
> This is what I actually do:
> - --------------------------------------------------
> #! /bin/sh
> 
> DEV=ppp0
> UP%6
> DOWNv8
> CLIENTS="192.168.2.1 192.168.2.2 192.168.2.3 192.168.2.5 192.168.2.6 192.168.2.7 192.168.2.8"
> TC=$(which tc)
> 
> # reset
> $TC qdisc del dev ${DEV} root &>/dev/null
> $TC qdisc del dev ${DEV} ingress &>/dev/null
> 
> # attach HTB queue discipline to device $DEV
> $TC qdisc add dev $DEV root handle 1: htb default 12
> 
> # create client classes for shaping DOWN-stream
> crate=$[DOWN / NumClients]
> i=0
> for host in $CLIENTS; do
>   $TC class add dev $DEV parent 1:1 classid 1:1$i htb rate ${crate}kbit ceil ${DOWN}kbit
>   $TC filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src $host flowid 1:1$i
>   i=$[i + 1]
> done
> 
> # TODO shaping UP stream
> - --------------------------------------------------
> 
> This is my script. And I do not really now, *where* to differ
> here to once shape down-stream, and once to shape the up-stream
> 
> I'd be really really very happy, if someone would point
> me in this *wrong* script to the right direction.
> 

You have to set you rates lower than your real rates - for ingress about 
80% so you actually get queues growing that you can control. For egress 
about 85% with dsl as there are extra overheads and TC counts IP size.

You should be shaping on eth0 if that's your LAN facing interface - you 
shape egress from the shaping box to the LAN to do ingress (on simple 
setups). The src IP match needs to change to dst.

As it is the script may have too big queues - but should work as a test, 
you may also endup wanting to split interactive traffic from bulk to 
make things nicer for users - but that sort of thing is policy to be 
thought about/agreed by users.

Andy.



> Many thanks,
> Christian Parpart.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> 
> iD8DBQFAi/jRPpa2GmDVhK0RAiyiAJ9t1LngvstQqwqGkTC367USYfcQtQCeNHUV
> nc9176QOuUWp1XqeCSrbj8g> =Po1b
> -----END PGP SIGNATURE-----
> _______________________________________________
> 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-04-26  8:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-24  1:23 [LARTC] newbie: TC[NG] with (256kbit/s down and 768kbit/s up) on a router trapni
2004-04-24  5:27 ` Jason Boxman
2004-04-25  7:06 ` [LARTC] newbie: TC[NG] with (256kbit/s down and 768kbit/s up) Andy Furniss
2004-04-25 17:43 ` [LARTC] newbie: TC[NG] with (256kbit/s down and 768kbit/s up) on a router Christian Parpart
2004-04-26  8:01 ` Andy Furniss [this message]
2004-04-28  8:42 ` Christian Parpart
2004-05-02 23:44 ` Andreas Klauer
2004-05-05  8:34 ` [LARTC] newbie: TC[NG] with (256kbit/s down and 768kbit/s up) Andy Furniss
2004-05-05 10:39 ` [LARTC] newbie: TC[NG] with (256kbit/s down and 768kbit/s up) on a router Andreas Klauer
2004-05-05 12:33 ` [LARTC] newbie: TC[NG] with (256kbit/s down and 768kbit/s up) Andy Furniss

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=408CC1DE.10704@dsl.pipex.com \
    --to=andy.furniss@dsl.pipex.com \
    --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.