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] any errors in this script?
Date: Thu, 07 Aug 2003 17:01:34 +0000	[thread overview]
Message-ID: <marc-lartc-106027576227656@msgid-missing> (raw)
In-Reply-To: <marc-lartc-106025825203449@msgid-missing>

On Thursday 07 August 2003 14:08, Tom Verbeek wrote:
> Hi,
>
> ok, I dropped the idea of using Wondershaper without having background
> knowledge and are now trying to set up my own script :)
ok :)

> my max. upload bandwidth is 192 Kbit/s and my goal is to ensure smooth
> gameplay (udp) while allowing other protocols to use up the remaining
> bandwidth. Mail is supposed to be treated with the least priority.
>
> Cheers,
> Tom.
>
> #-----------------------------------------------------
> # clean existing down- and uplink qdiscs, hide errors
> tc qdisc del dev ppp0 root    2> /dev/null > /dev/null
> tc qdisc del dev ppp0 ingress 2> /dev/null > /dev/null
>
> #root htb with non-classified data to 1:11
> tc qdisc add dev ppp0 root handle 1: htb default 11
>
> #max uplink class
> tc class add dev ppp0 parent 1: classid 1:1 htb rate 180kbit ceil 180kbit
> burst 2k
>
> #interactice class
> tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 130kbit ceil 180kbit
> burst 2k prio 0
>
> #default class
> tc class add dev ppp0 parent 1:1 classid 1:11 htb rate 40kbit ceil 180kbit
> burst 2k prio 1
>
> #slow class
> tc class add dev ppp0 parent 1:1 classid 1:12 htb rate 10kbit ceil 70kbit
> burst 2k prio 2
>
> #put udp into interactive class
> tc filter add dev ppp0 parent 1:0 protocol ip prio 0 u32 \
>    match ip protocol 17 0xff \
>    flowid 1:10
>
> #put mail into slow class
> tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \
>    match ip sport 25 0xffff \
>    flowid 1:12
>
> tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \
>    match ip dport 25 0xffff \
>    flowid 1:12
>
> tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \
>    match ip sport 110 0xffff \
>    flowid 1:12
>
> tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \
>    match ip dport 110 0xffff \
>    flowid 1:12

You set a burst of 2k and that's too low.  Just remove the burst parameter so 
htb can calculate the minimal burst for you.

Different prio's for the filters makes no different because it's only used to 
order the filters.

DIfferent prio's for htb classes can be dangerous.  If a low prio class like 
class 1:10 receives more data then it's rate (130kbit), the latency can go 
way up.  So it's important the you monitor your setup so your low prio 
classes are never overlimited.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

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

      parent reply	other threads:[~2003-08-07 17:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-07 12:08 [LARTC] any errors in this script? Tom Verbeek
2003-08-07 12:30 ` Atahualpa Jones
2003-08-07 17:01 ` 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=marc-lartc-106027576227656@msgid-missing \
    --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.