From mboxrd@z Thu Jan 1 00:00:00 1970 From: kinto Date: Sat, 14 May 2005 00:57:20 +0000 Subject: [LARTC] Need some help Message-Id: <200505140257.20352.mlist@email.it> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Hi all, I have read the larc howto and I need to apply a traffic shaper=20 with this configuration: router / two interface etho and eth1 lan lan is on eth1 and on eth0 I've the dsl connection (1.2 Mbit / 256 kbit) I need to limit the bandwith towards lan and I've thought at HTB and=20 tcng. I write the script belove. I want limit the p2p and ftp (ssh and=20 irc) connection at 15 kBps (128 kbps) and the other type of traffic at=20 32 kBps (256kbps). Is the script right? Moreover I want understand better how htb work: I can shape the traffic=20 router->lan but I can't shape traffic lan->router, is it right? In this=20 way I can limit the bandwidht towards lan, but I have the bandwith=20 towards router always full. Thanks P.S.: sorry for my very bad english :) ############# script ######### /* *Simply tcng traffic control file. */ #define INTERFACE eth1 dev INTERFACE { egress { class( <$p2p> ) if tcp_sport =3D 4662 if udp_sport =3D 4672 if udp_sport =3D 4666 if tcp_sport =3D 6882 if tcp_sport =3D 6346 class ( <$ftp> ) if tcp_sport =3D 21 if tcp_sport =3D 22 || ip_tos_delay =3D 1 if tcp_sport =3D 6667 || tcp_dport =3D 7000; class ( <$def> ) if 1 ; htb () { class ( rate 256kbps, ceil 256kbps ) { $p2p =3D class ( rate 56kbps, ceil 128kbps ) { sfq; } ; $ftp =3D class ( rate 56kbps, ceil 128kbps ) { sfq; } ; $def =3D class ( rate 256kbps, ceil 256kbps ) { sfq; } ; } } } } ############################## =20 =20 -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f =20 Sponsor: Digitalpix: Il metodo pi=F9 comodo, veloce e conveniente * per stampare le tue foto digitali migliori. Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1523&d=14-5 _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc