All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Chamas <josh@chamas.com>
To: lartc@vger.kernel.org
Subject: [LARTC] Throttling or policing incoming bandwidth to my linux server
Date: Tue, 17 Sep 2002 18:02:40 +0000	[thread overview]
Message-ID: <marc-lartc-103228583018591@msgid-missing> (raw)

Hey,

Does anyone have an idea on how to police incoming bandwidth
to my server/workstation, in addition to outgoing.  I have
a rule set like this so far that does well to limit my
outbound traffic, but what could I add to this that would
limit my inbound traffic to $LIMIT as well, ideally both
inbound & outbound sharing the same $LIMIT say 200kbit.

LIMIT 0kbit
HOSTIP=NNN.NNN.NNN.NNN

start () {
     tc qdisc add dev eth1 root handle 1: cbq avpkt 1000 bandwidth 10mbit
     tc class add dev eth1 parent 1: classid 1:1 cbq rate $LIMIT allot 1500 prio 5 bounded isolated
     tc filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src $HOSTIP flowid 1:1
     tc qdisc add dev eth1 parent 1:1 sfq perturb 10
}

The reason I want this is to be able to limit my bandwidth
to what I pay for at my colocation facility, & I only have
one server/host machine there, no router.

I have read the docs about policing bandwidth with little
help, and it seems that when I try to reference the ingress
rules, I get a kernel error, maybe its not compiled into my
stock 7.2 redhat by default?  It sounded like ingress rules
might be related to policing, if so I am out of luck.

The FreeBSD dummynet/ipfw implementation seem to handle this
just fine out of the box, so I suspect this functionality
is lurking in the tc rules, but have not found any online
docs that seem to know how to clearly do it.

Thanks for any clarification you might have on this.

Regards,

Josh
________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com

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

             reply	other threads:[~2002-09-17 18:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-17 18:02 Josh Chamas [this message]
2002-09-17 18:53 ` [LARTC] Throttling or policing incoming bandwidth to my linux server Stef Coene

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-103228583018591@msgid-missing \
    --to=josh@chamas.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.