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] Throttling or policing incoming bandwidth to my linux server
Date: Tue, 17 Sep 2002 18:53:05 +0000	[thread overview]
Message-ID: <marc-lartc-103228888922539@msgid-missing> (raw)
In-Reply-To: <marc-lartc-103228583018591@msgid-missing>

On Tuesday 17 September 2002 20:02, Josh Chamas wrote:
> 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.
If you create a imq devce (you need to patch kernel + iptables for this), you 
can redirect incomint and outgoing to this device so you can make sure IN + 
OUT < 200kbit.

> LIMIT=200kbit
> 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.
You also need tc with ingress support.  Why not compile your own kernel ?  And 
I don't use RH, so I don't know if there kernels support ingress.

> 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.
It is, ingress + policer is the answer.

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/

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-17 18:02 [LARTC] Throttling or policing incoming bandwidth to my linux server Josh Chamas
2002-09-17 18:53 ` 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-103228888922539@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.