All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Limiting bandwidth on one port
@ 2005-04-04  9:54 Tim Churchard
  2005-04-04 11:46 ` Andy Furniss
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Churchard @ 2005-04-04  9:54 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Everyone

I'm new to tc.  I'm trying to speed limit access to SSH/SFTP on my
external interface (eth0) without affecting any other traffic on any of
the other interfaces.

I've attached a script with my tc commands in.  Can someone point me in
the right direction?

Thank you for your help in advance.
Tim

- --
If you wish to be happy for one hour, get drunk.
If you wish to be happy for three days, get married.
If you wish to be happy for a month, kill your pig and eat it.
If you with to be happy forever, learn to fish.
        -- Chinese Proverb


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQEVAwUBQlEO2PXjnG6MF3+4AQKCwwgA10hxw+BwzIcUdBS549Twfs8luXD7cGLx
GrN4c8rIjbz/g64CBRv/0FQNamNB+n2qJkHw36LpknyjKY4+kYvcovMQposYeVuj
g/BD7qRa502GIOWMJxbjlGStxwcg2V2pTR+nXy/HNvQsQXGpwYMJ10qGVLlxyF0U
QjcVbry4XpflDGbmpilfJOsNETcfUHC2yxCku1JDIvr6sQ7KPzg5Pyi1HHC1dHt6
qkKTQ0sRuICNhIuuVbj9NaHVd7F7DHWxzINiT0dTIslWz/IzbVLAoLDuaVGTetRA
w3rCZEw2Yv+ryjWYih+9hHheVTZSFt3z5uAekZW3ZVICE1fMmqI6ug==
=tiz/
-----END PGP SIGNATURE-----

[-- Attachment #2: rc.tc --]
[-- Type: text/plain, Size: 425 bytes --]

#!/bin/sh

### Basics 

DEV=eth0
IP=192.168.1.4

LINERATE=2mbit
LOWRATE=8kbps

TC=/sbin/tc


### Rules - throttle SSH on ext_int

$TC qdisc del dev $DEV root

$TC qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth $LINERATE
$TC qdisc add dev $DEV parent 1: classid 1:1 cbq rate $LOWRATE allow 1500 prio 5 bounded isolated

$TC filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip sport 22 0xFFFF flowid 1:1

[-- Attachment #3: 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] 2+ messages in thread

end of thread, other threads:[~2005-04-04 11:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-04  9:54 [LARTC] Limiting bandwidth on one port Tim Churchard
2005-04-04 11:46 ` Andy Furniss

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.