* [LARTC] incoming traffic??
@ 2003-05-10 16:15 sun reflex4
2003-05-10 18:05 ` Jose Luis Domingo Lopez
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: sun reflex4 @ 2003-05-10 16:15 UTC (permalink / raw)
To: lartc
Hi,
I want to classify incoming traffic and then put them in HTB queues, is that
possible with tc (and/or iptables)? and when yes, which chain should I use:
PREROUTING, or INPUT?
Thanx
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?pageþatures/featuredemail
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LARTC] incoming traffic??
2003-05-10 16:15 [LARTC] incoming traffic?? sun reflex4
@ 2003-05-10 18:05 ` Jose Luis Domingo Lopez
2003-05-11 4:49 ` hare ram
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Jose Luis Domingo Lopez @ 2003-05-10 18:05 UTC (permalink / raw)
To: lartc
On Saturday, 10 May 2003, at 16:15:00 +0000,
sun reflex4 wrote:
> I want to classify incoming traffic and then put them in HTB queues, is
> that possible with tc (and/or iptables)? and when yes, which chain should I
> use: PREROUTING, or INPUT?
>
You should patch your kernel to support IMQ device and configure it, as
has been said several times on this list. Check the archives.
If you are configuring Linux traffic shaping in a router for a whole net
behind it, you can avoid IMQ and shapa incoming traffic in the inner
network card, shaping outgoing traffic to your internal network.
IP packets travel through the operating system stack following a well
defined path, that you can check at:
http://www.docum.org/stef.coene/qos/kptd/
Regards.
--
Jose Luis Domingo Lopez
Linux Registered User #189436 Debian Linux Sid (Linux 2.5.69)
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LARTC] incoming traffic??
2003-05-10 16:15 [LARTC] incoming traffic?? sun reflex4
2003-05-10 18:05 ` Jose Luis Domingo Lopez
@ 2003-05-11 4:49 ` hare ram
2003-05-11 10:13 ` sun reflex4
2003-05-11 12:37 ` Graste
3 siblings, 0 replies; 9+ messages in thread
From: hare ram @ 2003-05-11 4:49 UTC (permalink / raw)
To: lartc
Hi
AFAIK,
If you have Two interfaces, better you do
up control in one interface and down in one interface
this can be achived, even i have tested, not yet kept on live, still some
more testing iam doing with my test setup
But if you have looking for up+down= total b/w
people in this Group recomending IMQ, but i have never seen any of the post
in this group this IMQ successfully running, may be it may be not working
for me( since iam using bridge)
But you can try, with the help of stef and Patrick help
hare
----- Original Message -----
From: "Jose Luis Domingo Lopez" <lartc@24x7linux.com>
To: <lartc@mailman.ds9a.nl>
Sent: Saturday, May 10, 2003 11:35 PM
Subject: Re: [LARTC] incoming traffic??
> On Saturday, 10 May 2003, at 16:15:00 +0000,
> sun reflex4 wrote:
>
> > I want to classify incoming traffic and then put them in HTB queues, is
> > that possible with tc (and/or iptables)? and when yes, which chain
should I
> > use: PREROUTING, or INPUT?
> >
> You should patch your kernel to support IMQ device and configure it, as
> has been said several times on this list. Check the archives.
>
> If you are configuring Linux traffic shaping in a router for a whole net
> behind it, you can avoid IMQ and shapa incoming traffic in the inner
> network card, shaping outgoing traffic to your internal network.
>
> IP packets travel through the operating system stack following a well
> defined path, that you can check at:
> http://www.docum.org/stef.coene/qos/kptd/
>
> Regards.
>
> --
> Jose Luis Domingo Lopez
> Linux Registered User #189436 Debian Linux Sid (Linux 2.5.69)
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LARTC] incoming traffic??
2003-05-10 16:15 [LARTC] incoming traffic?? sun reflex4
2003-05-10 18:05 ` Jose Luis Domingo Lopez
2003-05-11 4:49 ` hare ram
@ 2003-05-11 10:13 ` sun reflex4
2003-05-11 12:37 ` Graste
3 siblings, 0 replies; 9+ messages in thread
From: sun reflex4 @ 2003-05-11 10:13 UTC (permalink / raw)
To: lartc
well, I have 2 interfaces, but I didn't get what you mean. You say I use one
for incoming and one for outgoing? can this then be achieved only with
iptables and tc?
Best greetings
>From: "hare ram" <hareram@sol.net.in>
>Reply-To: "hare ram" <hareram@sol.net.in>
>To: <lartc@mailman.ds9a.nl>
>Subject: Re: [LARTC] incoming traffic??
>Date: Sun, 11 May 2003 10:21:16 +0530
>
>Hi
>
>AFAIK,
>
>If you have Two interfaces, better you do
>up control in one interface and down in one interface
>this can be achived, even i have tested, not yet kept on live, still some
>more testing iam doing with my test setup
>
>But if you have looking for up+down= total b/w
>people in this Group recomending IMQ, but i have never seen any of the post
>in this group this IMQ successfully running, may be it may be not working
>for me( since iam using bridge)
>
>But you can try, with the help of stef and Patrick help
>
>hare
>----- Original Message -----
>From: "Jose Luis Domingo Lopez" <lartc@24x7linux.com>
>To: <lartc@mailman.ds9a.nl>
>Sent: Saturday, May 10, 2003 11:35 PM
>Subject: Re: [LARTC] incoming traffic??
>
>
> > On Saturday, 10 May 2003, at 16:15:00 +0000,
> > sun reflex4 wrote:
> >
> > > I want to classify incoming traffic and then put them in HTB queues,
>is
> > > that possible with tc (and/or iptables)? and when yes, which chain
>should I
> > > use: PREROUTING, or INPUT?
> > >
> > You should patch your kernel to support IMQ device and configure it, as
> > has been said several times on this list. Check the archives.
> >
> > If you are configuring Linux traffic shaping in a router for a whole net
> > behind it, you can avoid IMQ and shapa incoming traffic in the inner
> > network card, shaping outgoing traffic to your internal network.
> >
> > IP packets travel through the operating system stack following a well
> > defined path, that you can check at:
> > http://www.docum.org/stef.coene/qos/kptd/
> >
> > Regards.
> >
> > --
> > Jose Luis Domingo Lopez
> > Linux Registered User #189436 Debian Linux Sid (Linux 2.5.69)
> > _______________________________________________
> > LARTC mailing list / LARTC@mailman.ds9a.nl
> > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> >
>
>_______________________________________________
>LARTC mailing list / LARTC@mailman.ds9a.nl
>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?pageþatures/virus
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LARTC] incoming traffic??
2003-05-10 16:15 [LARTC] incoming traffic?? sun reflex4
` (2 preceding siblings ...)
2003-05-11 10:13 ` sun reflex4
@ 2003-05-11 12:37 ` Graste
3 siblings, 0 replies; 9+ messages in thread
From: Graste @ 2003-05-11 12:37 UTC (permalink / raw)
To: lartc
On Sun, 11 May 2003 10:13:08 +0000, sun reflex4 <sunreflex4@hotmail.com>
wrote:
> well, I have 2 interfaces, but I didn't get what you mean. You say I use
> one for incoming and one for outgoing? can this then be achieved only
> with iptables and tc?
>
> Best greetings
>
Yes it can. Outgoing traffic can be shaped on your outgoing interface on
your gateway. Incoming traffic is a little bit trickier - but if you have
two interfaces you can use the interface that connects to your lan. Check
http://www.docum.org/stef.coene/qos/kptd/ and you get a clue where to mark
packets with iptables and then use tc and tc filter to do your shaping.
e.g. for download/incoming traffic:
#delete qdisc on dev
tc qdisc del dev $INTIF root 2>/dev/null
#new root qdisc
tc qdisc add dev $INTIF root handle 2:0 htb default 20
#some classes
tc class add dev $INTIF parent 2:0 classid 2:2 htb rate 10mbps ceil 101mbps
tc class add dev $INTIF parent 2:2 classid 2:20 htb rate 2000kbps ceil
101mbps prio 2 ...
or whatever qdiscs and classes and then:
#create a class for a single user for example
tc class add dev $INTIF parent 2:20 classid 2:2001 htb rate 1kbps ceil
200kbps
#mark his incoming traffic
/sbin/iptables -A POSTROUTING -t mangle -o $INTIF -p tcp --destination
192.168.1.1 -j MARK --set-mark 2001
#send all his incoming traffic to his class
tc filter add dev $INTIF parent 2:0 protocol ip handle 2001 fw flowid
2:2001
$INTIF is the interface, that connects to your lan. Dunno if it is all
right what I wrote here fast. So you have to recheck before use. Hope it
helps anyway.
Regards,
Graste
--
Using M2, Opera's new e-mail client.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* [LARTC] Incoming traffic?
@ 2005-10-04 9:33 Dominik Werder
2005-10-04 10:00 ` Andreas Klauer
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Dominik Werder @ 2005-10-04 9:33 UTC (permalink / raw)
To: lartc
Hi there,
a program is downloading large files on a regular basis and has no switch
to limit bandwidth.
Is there a way to shape this incoming traffic? Any pointers?
My outgoing traffic shaping works perfectly, but this incoming thing gives
me a headache..
many thanks in advance!
Dominik
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LARTC] Incoming traffic?
2005-10-04 9:33 [LARTC] Incoming traffic? Dominik Werder
@ 2005-10-04 10:00 ` Andreas Klauer
2005-10-04 13:08 ` Edward Smith
2005-10-04 17:53 ` Carl-Daniel Hailfinger
2 siblings, 0 replies; 9+ messages in thread
From: Andreas Klauer @ 2005-10-04 10:00 UTC (permalink / raw)
To: lartc
On Tuesday 04 October 2005 11:33, Dominik Werder wrote:
> a program is downloading large files on a regular basis and has no
> switch to limit bandwidth.
>
> Is there a way to shape this incoming traffic? Any pointers?
On a router, you could just setup shaping on the LAN interface. On a
standalone machine, you'd either have to use ingress qdisc, or if you want
to use more familiar schedulers like HTB for incoming traffic, maybe IMQ
can help you.
Shaping incoming traffic usually works by dropping packets that were
already sent to you and hoping that the other side will back off and send
packets slower. This causes overhead (as packets have to be re-sent) which
is why some people don't like this method.
Personally, I've been using this approach for ages on my router (shaping
incoming traffic as outgoing traffic on LAN interface) and found that it's
better than having a single person / download choke the line completely...
Better methods are said to exist (like tcp window resizing or whatever) but
I've never seen them implemented in Linux so far.
HTH
Andreas Klauer
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LARTC] Incoming traffic?
2005-10-04 9:33 [LARTC] Incoming traffic? Dominik Werder
2005-10-04 10:00 ` Andreas Klauer
@ 2005-10-04 13:08 ` Edward Smith
2005-10-04 17:53 ` Carl-Daniel Hailfinger
2 siblings, 0 replies; 9+ messages in thread
From: Edward Smith @ 2005-10-04 13:08 UTC (permalink / raw)
To: lartc
[-- Attachment #1.1: Type: text/plain, Size: 801 bytes --]
Dominik, if you are running a router, the way to do it is to shape outgoing
traffic on your LAN interface. A copy of my script to do this is at
http://www.stardotstar.org/?page_id=63
Edward
Date: Tue, 04 Oct 2005 11:33:15 +0200
> From: "Dominik Werder" <dwerder@gmx.net>
> Subject: [LARTC] Incoming traffic?
> To: lartc@mailman.ds9a.nl
> Message-ID: <op.sx37hpsigft90w@dominik.test>
> Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8
>
> Hi there,
>
> a program is downloading large files on a regular basis and has no switch
> to limit bandwidth.
>
> Is there a way to shape this incoming traffic? Any pointers?
>
>
> My outgoing traffic shaping works perfectly, but this incoming thing gives
> me a headache..
>
> many thanks in advance!
> Dominik
>
>
[-- Attachment #1.2: Type: text/html, Size: 1213 bytes --]
[-- Attachment #2: Type: text/plain, Size: 143 bytes --]
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LARTC] Incoming traffic?
2005-10-04 9:33 [LARTC] Incoming traffic? Dominik Werder
2005-10-04 10:00 ` Andreas Klauer
2005-10-04 13:08 ` Edward Smith
@ 2005-10-04 17:53 ` Carl-Daniel Hailfinger
2 siblings, 0 replies; 9+ messages in thread
From: Carl-Daniel Hailfinger @ 2005-10-04 17:53 UTC (permalink / raw)
To: lartc
Dominik Werder schrieb:
> Hi there,
>
> a program is downloading large files on a regular basis and has no
> switch to limit bandwidth.
>
> Is there a way to shape this incoming traffic? Any pointers?
Use trickle.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-10-04 17:53 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-04 9:33 [LARTC] Incoming traffic? Dominik Werder
2005-10-04 10:00 ` Andreas Klauer
2005-10-04 13:08 ` Edward Smith
2005-10-04 17:53 ` Carl-Daniel Hailfinger
-- strict thread matches above, loose matches on Subject: below --
2003-05-10 16:15 [LARTC] incoming traffic?? sun reflex4
2003-05-10 18:05 ` Jose Luis Domingo Lopez
2003-05-11 4:49 ` hare ram
2003-05-11 10:13 ` sun reflex4
2003-05-11 12:37 ` Graste
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.