From: Andy Furniss <andy.furniss@dsl.pipex.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] packet shaping bridge
Date: Thu, 05 May 2005 22:51:28 +0000 [thread overview]
Message-ID: <427AA370.8000108@dsl.pipex.com> (raw)
In-Reply-To: <427A4932.7000002@ckua.org>
Jason Bath wrote:
> I'm currently tweaking but this is what I have for now:
> -----------------------
> #!/bin/sh
>
> DEV=eth0
> #setup the root
>
> #tc qdisc add dev $DEV root handle 1: htb default 11
Remember arp traffic will go to default unless you filter elsewhere.
> tc class add dev $DEV parent 1: classid 1:1 htb rate 100kbps ceil 100kbps
> #Tokyo class
> tc class add dev $DEV parent 1:1 classid 1:10 htb rate 50kbps ceil 100kbps
I would use rate 90 ceil 100 prio 0
> #Everything else
> tc class add dev $DEV parent 1:1 classid 1:11 htb rate 50kbps ceil 100kbps
rate 10 ceil 100 prio 1 quantum 1500 (or your mtu) burst 10b cburst 10b
>
> #filter for streaming
> tc filter add dev $DEV parent 1:1 protocol ip prio 0 u32 match ip src
> 10.2.1.7 match ip dport 2001 0xffff flowid 1:10
Filters don't work as you need to add them to 1:0 also prio 0 is not
highest for a filter - use 1
> tc filter add dev $DEV protocol ip parent 1:1 prio 0 u32 match ip src
> 10.2.1.5 match ip dport 2001 0xffff flowid 1:10
>
> #filter for my workstation
> tc filter add dev $DEV protocol ip parent 1:1 prio 3 u32 match ip src
> 10.2.1.251 flowid 1:10
If your workstation generates bulk traffic don't put it with stream -
make another class.
>
> #all other traffic sent to the other queue
> tc filter add dev $DEV protocol ip parent 1:1 prio 3 u32 match ip src
> 0.0.0.0/0 flowid 1:11
Not really needed if you use default 11 but remember arp - if you omit
default 11 then leave this and arp will pass unshaped.
> tc qdisc add dev $DEV parent 1:10 handle 10: pfifo limit 2
two packets seems a bit low - maybe use a short bfifo to limit to a
couple big packets (3k) but still allow more small.
> tc qdisc add dev $DEV parent 1:11 handle 11: sfq perturb 2
perturb causes packet reordering 2 is too low use min 10 or higher.
Andy.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next prev parent reply other threads:[~2005-05-05 22:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-05 16:26 [LARTC] packet shaping bridge Jason Bath
2005-05-05 21:58 ` Jason Bath
2005-05-05 22:20 ` Andreas Klauer
2005-05-05 22:51 ` Andy Furniss [this message]
2005-05-06 17:49 ` Jason Bath
2005-05-09 22:26 ` 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=427AA370.8000108@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.