[134112] in North American Network Operators' Group
Re: Throttle traffic for a single local IP on a Linux router?
daemon@ATHENA.MIT.EDU (gordon b slater)
Fri Dec 24 05:30:35 2010
X-IP-MAIL-FROM: gordslater@ieee.org
From: gordon b slater <gordslater@ieee.org>
To: johnc@hush.ai
In-Reply-To: <20101223233234.0DAD0FEBF@smtp.hushmail.com>
Date: Fri, 24 Dec 2010 10:29:41 +0000
Cc: nanog@nanog.org
Reply-To: gordslater@ieee.org
Errors-To: nanog-bounces+nanog.discuss=bloom-picayune.mit.edu@nanog.org
--=-DJP+jENrWuThkRuNr6Lg
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Thu, 2010-12-23 at 18:32 -0500, johnc@hush.ai wrote:
> $TC class add dev $INIF parent 1: classid 1:1 htb rate $DNLD ceil=20
> $DNLD
> $TC class add dev $OUTIF parent 1: classid 1:1 htb rate $UPLD ceil=20
> $UPLD
> $TC filter add dev $INIF parent 1:0 ip pref 1 u32 match ip src=20
> $IP/32 0xFFFFFFFF flowid 1:1
> $TC filter add dev $OUTIF parent 1:0 ip pref 1 u32 match ip dst=20
> $IP/32 0xFFFFFFFF flowid 1:1
>=20
> Anyone see any problems in my setup=20
yes, I think you have the same IDs in the last 4 lines.
classid's should be 1:1 and 1:2
flowid's shoild be 1:1 and 1:2
yours are 1:1 in both cases of each
try :-
$TC class add dev $INIF parent 1: classid 1:1 htb rate $DNLD ceil=20
$DNLD
$TC class add dev $OUTIF parent 1: classid 1:2 htb rate $UPLD ceil=20
$UPLD
# ^^^
$TC filter add dev $INIF parent 1:0 ip pref 1 u32 match ip src $IP/32
0xFFFFFFFF flowid 1:1=20
$TC filter add dev $OUTIF parent 1:0 ip pref 1 u32 match ip dst=20
$IP/32 0xFFFFFFFF flowid 1:2
# ^^^
(line breaks may be affected by email formatting etc )
Gord
--
# ~ TC , the undisputable leader of the gang ~ #
--=-DJP+jENrWuThkRuNr6Lg
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEABECAAYFAk0Udg8ACgkQpFQC9cF/XmZ0UwCfXVFW334WpSl9b3zQ72wYg52W
wDAAn18XTp8BF67VE3Ry9xjQEHB3PmDn
=/IVC
-----END PGP SIGNATURE-----
--=-DJP+jENrWuThkRuNr6Lg--