From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Churchard Date: Mon, 04 Apr 2005 09:54:32 +0000 Subject: [LARTC] Limiting bandwidth on one port Message-Id: <42510ED8.1020703@gmail.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------030901080105080209020107" List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. --------------030901080105080209020107 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----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----- --------------030901080105080209020107 Content-Type: text/plain; name="rc.tc" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rc.tc" #!/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 --------------030901080105080209020107 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --------------030901080105080209020107--