All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Newb question: tc shedulers on 2 interfaces
Date: Tue, 28 Dec 2004 19:22:49 +0000	[thread overview]
Message-ID: <200412282022.49327.stef.coene@docum.org> (raw)
In-Reply-To: <1104255997.9531.25.camel@vhost.sourceforge.net>

On Tuesday 28 December 2004 18:46, Patrich Björklund wrote:
> Hi all! I'm new to this list, and hope for some clarity in this matter:
>
> I have a home-gateway with linux-2.6.9 and iproute2 (ver:2.6.9). My
> following tc syntaxes.
>
> # eth0 internet scheduleing are:
>
> tc qdisc add dev eth0 root handle 1: htb default 20
>
> tc class add dev eth0 parent 1: classid 1:1 htb rate 512kbit burst 6k
> tc class add dev eth0 parent 1:1 classid 1:10 htb rate 512kbit burst 6k
> prio 1
> tc class add dev eth0 parent 1:1 classid 1:20 htb reate 9*512/10kbit
> burst 6k prio 2
>
> tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
> tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
>
> tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 match ip tos
> 0x10 0xff flowid 1:10
> tc filter add dev eth0 parent 1: protocol ip prio 10 u32 \
> match ip protocol 6 0xff \
> match u8 0x50 0x0f at 0 \
> match u16 0x0000 0xffc0 at 2 \
> match u8 0x10 0xff at 33 \
> flowid 1:10
>
> tc qdisc add dev dev eth0 handle ffff: ingress
>
> tc filter add dev eth0 parent ffff: protocol ip prio 50 u32 \
> match ip src 0.0.0.0/0 police rate 2200kbit burst 10k drop flowid :1
>
> # My eth1 schedule:
> tc qdisc add dev eth1 root tbf rate 512kbit latency 50ms burst 10000
>
> The long eth0 tc-script is fetched externally as you may see...but:
>
> This have worked well for me (no, really) but...since I am a newbee, I
> have read the lartc doc, and understood some but very much was really
> hard to get...especially the class and filter stuff. Lets say it's not a
> 'for dummies' book :) No complainig. My Q are, is there a chance I will
> get packet losses or other messes to gateway(eth1/eth0) if I have no
> rule set for my LAN-PC:s? Or the above scripts for that matter...Should
> I have a 'eth1 tc-command here?' Or any advice or comment would be
> greatly appreciated.
There are no real errors in your script.  Of course, each script can be tuned.  
Some remarks:
- you are only shaping traffic leaving eth0, if you add class/filters to eth1, 
you can also shaping traffic leaving eth1
- you are shaping traffic leaving eth1 because you are shaping traffic 
entering eth0 with the ingress qdisc.  but using htb/cbq for shaping gives 
you much more control.
- try http://docum.org/ for other/more  information.

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

      reply	other threads:[~2004-12-28 19:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-28 17:46 [LARTC] Newb question: tc shedulers on 2 interfaces Patrich Björklund
2004-12-28 19:22 ` Stef Coene [this message]

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=200412282022.49327.stef.coene@docum.org \
    --to=stef.coene@docum.org \
    --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.