From: "Taylor, Grant" <gtaylor@riverviewtech.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Re: A question.
Date: Fri, 22 Apr 2005 14:28:00 +0000 [thread overview]
Message-ID: <426909F0.8080707@riverviewtech.net> (raw)
In-Reply-To: <c6694c640504211237229d1722@mail.gmail.com>
> 15 Kbps half duplex
tc qdisc add dev imq0 root handle 1: htb default 2
tc class add dev imq0 parent 1: classid 1:1 htb rate 15kbps
tc qdisc add dev imq0 parent 1:1 handle 10: sfq perturb 10
tc filter add dev imq0 protocol ip parent 10:0 prio 1 u32 match ip src 192.168.1.1/32 flowid 1:1
tc filter add dev imq0 protocol ip parent 10:0 prio 1 u32 match ip dst 192.168.1.1/32 flowid 1:1
tc class add dev imq0 parent 1: classid 1:2 htb rate 15kbps
tc qdisc add dev imq0 parent 1:2 handle 20: sfq perturb 10
tc filter add dev imq0 protocol ip parent 20:0 prio 1 u32 match ip src 192.168.1.2/32 flowid 1:2
tc filter add dev imq0 protocol ip parent 20:0 prio 1 u32 match ip dst 192.168.1.2/32 flowid 1:2
tc class add dev imq0 parent 1: classid 1:3 htb rate 15kbps
tc qdisc add dev imq0 parent 1:3 handle 30: sfq perturb 10
tc filter add dev imq0 protocol ip parent 30:0 prio 1 u32 match ip src 192.168.1.3/32 flowid 1:3
tc filter add dev imq0 protocol ip parent 30:0 prio 1 u32 match ip dst 192.168.1.3/32 flowid 1:3
iptables -t mangle -A PREROUTING -i eth0 -j IMQ --todev 0
iptables -t mangle -A PREROUTING -i eth1 -j IMQ --todev 0
ip link set imq0 up
From what reading I have done this is what I would probably try first. Seeing as I don't have a box set up with IMQ to test I can't tell you for sure if this will work or not. I think at the very least it will give you a head start as a direction to go run. I'll try this as soon as I get a box up and running that does have IMQ on it. I know that I did modify a script that I am running here in the office to rate limit BitTourrents (for my Linux Distro's ISOs) with very similar rules matching based on source or destination port. However I was using that on the raw ethernet device, not IMQ. However if you are wanting rate limiting for in and out bound traffic combined you need something like IMQ or some other sort of loop back connection that you can rate limit on. I think there might be a way to optimize the src and / or dst matches, though I'm not aware of any off hand. I'll keep looking at this and get back to you.
Grant. . . .
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next prev parent reply other threads:[~2005-04-22 14:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-21 19:37 [LARTC] Re: A question Rene Casasola
2005-04-22 7:34 ` Taylor Grant
2005-04-22 14:28 ` Taylor, Grant [this message]
2005-04-22 18:51 ` Taylor, Grant
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=426909F0.8080707@riverviewtech.net \
--to=gtaylor@riverviewtech.net \
--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.