All of lore.kernel.org
 help / color / mirror / Atom feed
From: mdew <mdew@orcon.net.nz>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] limiting to a port
Date: Thu, 13 Jun 2002 05:06:49 +0000	[thread overview]
Message-ID: <marc-lartc-102394503722122@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102385125107321@msgid-missing>

[-- Attachment #1: Type: text/plain, Size: 1505 bytes --]

On Wed, 2002-06-12 at 21:07, Stef Coene wrote:
> On Wednesday 12 June 2002 05:05, mdew wrote:
> > one user is utilising to much :80 traffic, how would i limit traffic?
> >
> > Our current bandwidth is 256Kb, i would like to shape the user down
> > 64Kb.
> You have to attach a htb or cbq qdisc.  Create a class with limited bandiwdth 
> and redirect all traffic to port 80 to that class with a filter.
> 
> See the lartc howto and/or www.docum.org for more info.

from an example off the website, ive change a couple of values... what
do i need to start limiting to *only* port 80

#!/bin/sh
RATE_TOT=256kbps
RATE1=128kbps

IP=210.54.175.12

DEV="dev eth0"
OPTION="allot 1514 maxburst 20 avpkt 1000"

tc qdisc del $DEV root
tc qdisc add $DEV root handle 10: cbq bandwidth 10mbit avpkt 1000
tc class add $DEV parent 10:0 classid 10:1 cbq bandwidth 10mbit rate
$RATE_TOT $OPTION prio 3 isolated
tc class add $DEV parent 10:1 classid 10:10 cbq bandwidth 10mbit rate
$RATE1 $OPTION prio 3 bounded

tc filter add $DEV parent 10:  protocol ip prio 3 handle 1 fw classid
10:1
tc filter add $DEV parent 10:1 protocol ip prio 3 handle 1 fw classid
10:10

iptables -F
iptables -X
iptables -N acc_0
iptables -N acc_1
iptables -A OUTPUT -t mangle -p tcp --dport 2000 -d $IP -j MARK
--set-mark 1
iptables -A OUTPUT -p tcp --dport 2000 -d $IP -j acc_0


-- 
ph33r!
Linux mdew 2.4.18-xfs #2 Fri Apr 26 15:09:11 NZST 2002 i686 unknown
GPG Key: http://mdew.orcon.net.nz/gpg

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2002-06-13  5:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-12  3:05 [LARTC] limiting to a port mdew
2002-06-12  9:07 ` Stef Coene
2002-06-12  9:49 ` mdew
2002-06-13  5:06 ` mdew [this message]
2002-06-13  7:21 ` 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-102394503722122@msgid-missing \
    --to=mdew@orcon.net.nz \
    --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.