From: sandr8_NOSPAM_@crocetta.org
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Shaping weirdness
Date: Fri, 13 Aug 2004 17:56:22 +0000 [thread overview]
Message-ID: <1092419782.411d00c6bcb6f@mail.crocetta.org> (raw)
In-Reply-To: <70fda320408130952818c2bf@mail.gmail.com>
what's your MTU size?
Scrive micah milano <micaho@gmail.com>:
> I've been following the HOWTO, and reading mailing list discussions
> about throttling bandwidth, and have had some success, but I just want
> to tie off some loose ends. Essentially what I am wanting to do is to
> keep our bandwidth usage below 1megabit, because if we go over we get
> charged for that traffic. I've used some of the examples from the
> HOWTO to limit our bandwidth, but I find that it gets limited to
> *half* what I specify. If I specify 256, bandwidth tests (using iperf)
> show that things are clamped at 128, that makes me scared that I am
> doing something right.
>
> I'm using cbq, I've seen some people suggest using htb instead because
> it is more reliable and easier to configure, but I thought i'd get
> what the HOWTO says working first, and then investigate alternatives.
>
> I've got a machine that sits in front of the network, has the internet
> plugged into eth0 and the other side plugged into eth1, and I am doing
> the following:
>
> #!/bin/bash
> LIMITDOWN%6
> LIMITUP%6
> DEV=eth0
> DEV2=eth1
>
> # clean up qdiscs
> tc qdisc del dev $DEV root 2> /dev/null > /dev/null
> tc qdisc del dev $DEV2 root 2> /dev/null > /dev/null
>
> # limit up- and downlink
> tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit
> tc qdisc add dev $DEV2 root handle 2: cbq avpkt 1000 bandwidth 100mbit
>
> tc class add dev $DEV parent 1: classid 1:1 cbq rate ${LIMITDOWN}kbit \
> allot 1500 prio 5 bounded isolated
> tc class add dev $DEV2 parent 2: classid 2:1 cbq rate ${LIMITDOWN}kbit \
> allot 1500 prio 5 bounded isolated
>
> tc class add dev $DEV parent 1: classid 1:2 cbq rate ${LIMITUP}kbit \
> allot 1500 prio 5 avpkt 1000
> tc class add dev $DEV2 parent 2: classid 2:2 cbq rate ${LIMITUP}kbit \
> allot 1500 prio 5 avpkt 1000
>
> tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst \
> 0.0.0.0/0 flowid 1:1
> tc filter add dev $DEV2 parent 2: protocol ip prio 16 u32 match ip dst \
> 0.0.0.0/0 flowid 2:1
>
> tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip src \
> 0.0.0.0/0 flowid 1:2
> tc filter add dev $DEV2 parent 2: protocol ip prio 16 u32 match ip src \
> 0.0.0.0/0 flowid 2:2
>
> tc qdisc add dev $DEV parent 1:1 sfq perturb 10
> tc qdisc add dev $DEV parent 1:2 sfq perturb 10
>
> tc qdisc add dev $DEV2 parent 2:1 sfq perturb 10
> tc qdisc add dev $DEV2 parent 2:2 sfq perturb 10
> _______________________________________________
> 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/
prev parent reply other threads:[~2004-08-13 17:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-13 16:52 [LARTC] Shaping weirdness micah milano
2004-08-13 17:56 ` sandr8_NOSPAM_ [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=1092419782.411d00c6bcb6f@mail.crocetta.org \
--to=sandr8_nospam_@crocetta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox