* [LARTC] Sorry about last post in HTML
@ 2003-03-05 13:34 George Peverill
2003-03-07 14:08 ` Martin A. Brown
0 siblings, 1 reply; 2+ messages in thread
From: George Peverill @ 2003-03-05 13:34 UTC (permalink / raw)
To: lartc
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [LARTC] Sorry about last post in HTML
2003-03-05 13:34 [LARTC] Sorry about last post in HTML George Peverill
@ 2003-03-07 14:08 ` Martin A. Brown
0 siblings, 0 replies; 2+ messages in thread
From: Martin A. Brown @ 2003-03-07 14:08 UTC (permalink / raw)
To: lartc
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-07 14:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-05 13:34 [LARTC] Sorry about last post in HTML George Peverill
2003-03-07 14:08 ` Martin A. Brown
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.