To: lartc@vger.kernel.org
Subject: [LARTC] Shaping Incoming Traffic
Date: Fri, 17 Nov 2000 08:42:15 +0000 [thread overview]
Message-ID: <marc-lartc-98373938216936@msgid-missing> (raw)
In-Reply-To: <marc-lartc-98373938216928@msgid-missing>
<PRE>At 20:09 2000-11-16 +0000, you wrote:
><i>Is there no way to shape incoming traffic? With any kernel version, or
</I>><i>even by rewriting the networking code? I understand the difficulties, and
</I>><i>the reasons why outgoing shaping is simple at the low-level but incoming
</I>><i>shaping is not done even at the high-level, but what about this? Use the
</I>><i>TCP window field to restrict the rate of data transfer (not worrying about
</I>><i>the details right now; just the general feasibility). (This is for a
</I>><i>single box, rather than for a box on a network which has a separate router
</I>><i>to shape its traffic.) If a node were to consistently violate the window,
</I>><i>it could be blocked until the administrator fixed the problem at that
</I>><i>node. (This is intended for thsoe who do not intend to violate the
</I>><i>policies of the server, rather than those who may wish to do so
</I>><i>maliciously.)
</I>><i>
</I>><i>I'd just like some pointers and hints for this...it seems workable to me.
</I>><i>But if there is another way, or *any* way, I'd rather pursue that before
</I>><i>the TCP way so I can see which is better. I'm simply discouraged by the
</I>><i>fact that no one seems to have tried this before, while it seems a
</I>><i>painfully obvious way to do it to me, so I wonder what I'm missing
</I>><i>conceptually.
</I>
Try
<A HREF="http://freshmeat.net/projects/rshaper/?highlight=rshaper">http://freshmeat.net/projects/rshaper/?highlight=rshaper</A>
for rshaper. I haven't tried it myself, but they use a metod where they
delay the notification of received packets to the sending host.
><i>From the README:
</I>
><i> THEORY OF OPERATION
</I>><i> ===================
</I>><i>
</I>><i>The idea is easy: whenever a packet is received through a network
</I>><i>interface, the rshaper module delays notification of the packet to the
</I>><i>network subsystem of Linux according to the expected data flow for the
</I>><i>involved host.
</I>><i>
</I>><i>In order to delay reception of the packet, the network driver must be
</I>><i>modified to call the shaper's receive function instead of the standard
</I>><i>netif_rx(). Therefore, you must modify two lines of your network
</I>><i>device driver. In case you use a NE2000 clone or another 8390-based
</I>><i>ethernet device, you can use the patch included in this package as
</I>><i>"8390-X.Y.c.patch", where X.Y is your kernel versione (as of now are
</I>><i>supported versions 2.0 and 2.2). If you are new to patches, please
</I>><i>refer to the last section.
</I>
Another method would be to use ICMP source quench:
<A HREF="http://www.faqs.org/rfcs/rfc1016.html">http://www.faqs.org/rfcs/rfc1016.html</A>
><i>Introduction
</I>><i>
</I>><i> A gateway may discard Internet datagrams if it does not have the
</I>><i> buffer space needed to queue the datagrams for output to the next
</I>><i> network on the route to the destination network. If a gateway
</I>><i> discards a datagram, it may send a source quench message to the
</I>><i> Internet source host of the datagram. A destination host may also
</I>><i> send a source quench message if datagrams arrive too fast to be
</I>><i> processed. The source quench message is a request to the host to cut
</I>><i> back the rate at which it is sending traffic to the Internet
</I>><i> destination. The gateway may send a source quench message for every
</I>><i> message that it discards. On receipt of a source quench message, the
</I>><i> source host should cut back the rate at which it is sending traffic
</I>><i> to the specified destination until it no longer receives source
</I>><i> quench messages from the gateway. The source host can then gradually
</I>><i> increase the rate at which it sends traffic to the destination until
</I>><i> it again receives source quench messages [1,2].
</I>><i>
</I>><i> The gateway or host may send the source quench message when it
</I>><i> approaches its capacity limit rather than waiting until the capacity
</I>><i> is exceeded. This means that the data datagram which triggered the
</I>><i> source quench message may be delivered.
</I>
I'm not aware of any implementation of this method for Linux that would
suite your needs.
Cisco has shaping both for incoming and outgoing traffic. See www.cisco.com
for mor info.
/Fredrik
__________________________________________________________________________
Fredrik Björk Seaside Internet/Varberg Energi <A HREF="mailto:Fredrik.Bjork@seaside.se">Fredrik.Bjork@seaside.se</A>
</PRE>
next prev parent reply other threads:[~2000-11-17 8:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-16 20:09 [LARTC] Shaping Incoming Traffic John
2000-11-17 8:42 ` [this message]
2000-11-17 12:53 ` Gregory
2000-11-24 15:38 ` [LARTC] shaping incoming traffic steeman
2003-02-11 17:03 ` [LARTC] Shaping " Andreas Wright
2003-02-11 18:11 ` 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-98373938216936@msgid-missing \
--to=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.