Gentoo Archives: gentoo-user

From: Norberto Bensa <nbensa@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Rate limiting TCP connections...
Date: Sun, 17 Aug 2008 19:24:03
Message-Id: 20080817162356.dh7c1d9yoogoccko@mail.bensa.ar
In Reply to: [gentoo-user] Rate limiting TCP connections... by gentoo_steve@shic.co.uk
1 Quoting gentoo_steve@×××××××.uk:
2
3 > Is there a straightforward way to make my Gentoo box 'play fair' and
4 > not hog 100% of the bandwidth?
5 >
6
7 If your router doesn't give you bandwidth and/or traffic shaping
8 control, you can drop some packets. For example, the following rule
9 will accept up to 50 packets per second and drop the rest. The TCP
10 protocol will retry and slow down.
11
12 iptables -I INPUT -p tcp -m limit --limit 50/sec -j ACCEPT
13 iptables -I INPUT -p tcp -j DROP
14
15
16 > Does anyone else have this problem?
17
18 Yes, everyone using TCP :)
19
20 You can read Linux Advanced Routing and Traffic Control for more info
21 (http://lartc.org/).
22
23 Regards,
24 Norberto
25
26
27 ----------------------------------------------------------------
28 This message was sent using IMP, the Internet Messaging Program.

Replies

Subject Author
Re: [gentoo-user] Rate limiting TCP connections... Steve <Gentoo_sjh@×××××××.uk>