From: "Martin A. Brown" <mabrown-lartc@securepipe.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Sorry about last post in HTML
Date: Fri, 07 Mar 2003 14:08:00 +0000 [thread overview]
Message-ID: <marc-lartc-104704634313978@msgid-missing> (raw)
In-Reply-To: <marc-lartc-104687176124974@msgid-missing>
George,
Sadly, traffic control is not "quick and easy" (yet). It's far easier
than it used to be, though, so here's a quick checklist of things you can
do that should make it easier for you to get to where you want to go:
- install kernel 2.4.20
- get tc HTB from devik's site (http://luxik.cdi.cz/~devik/qos/htb/)
- take a look at the wondershaper (http://lartc.org/wondershaper/)
- take a look at my script (http://linux-ip.net/htb-script)
And take a stab at it.
Here's a quick run down of what I would do:
DEV=eth1
BANDWIDTH\x1544kbit
CAP%6kbit
FWMARK=7
tc qdisc add dev $DEV root handle 1: htb default 10
tc class add dev $DEV parent 1:1 classid 1:10 \
htb rate $BANDWIDTH ceil $BANDWIDTH
tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
tc class add dev $DEV parent 1:1 classid 1:20 \
htb rate $CAP ceil $CAP
tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10
tc filter add dev $DEV parent 1:0 protocol ip \
handle $FWMARK fw classid 1: 1:20
iptables -t mangle -I PREROUTING -s 192.168.0.60 \
-j MARK --set-mark $FWMARK
That should put only packets from 192.168.0.60 into the 1:20 class, which
has the capped bandwidth.
Others on this list may have better ideas about how to break up your
bandwidth to cap the bandwidth hog.
Good luck,
-Martin
: Sorry about previous posting in HTML. Here it is in plaintext
: --------------------------------------------------------------
: Was wondering if someone can more or less come up with something
: newbie'ish for me to quickly and easily limit
: traffic to one host on my Nat'd network (192.168.0.60 for instance is
: using 90% of the bandwidth most of the time in our
: 12 machine network) mostly DCC's on IRC. Is there a quick and super
: simple way to do it with tc/cbq etc ?
:
: eth0 - global interface to net (10mps card)
: eth1 - local (to switch feeding NAT'd machines) (100mps card)
:
:
: using a cable modem connect (2670 kbps downstream, 1156 kbps upstream,
: measured via dslreports.com)
:
:
: Need a way to limit bandwidth to one particular machine on the
: 192.168.x.x network.Don't even need to divide up bandwidth
: like most cbq tutorials discuss. I think it involves the ingress filter
: but not sure. If someone could write a simple tc script that would
: limit bandwidth to an ip (ie:192.168.0.61) on our network to say
: 25-50k/s or there abouts. I've used the wondershaper script
: here at home but no overly useful in the case of work and the need for
: me to become a Bandwidth Nazi. I've used IPTraf and
: it pretty much tells the tale.
:
:
:
:
: _______________________________________________
: LARTC mailing list / LARTC@mailman.ds9a.nl
: http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
:
--
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
prev parent reply other threads:[~2003-03-07 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-05 13:34 [LARTC] Sorry about last post in HTML George Peverill
2003-03-07 14:08 ` Martin A. Brown [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-104704634313978@msgid-missing \
--to=mabrown-lartc@securepipe.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.