Need some help

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all, I have read the larc howto and I need to apply a traffic shaper 
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 
tcng. I write the script belove. I want limit the p2p and ftp (ssh and 
irc) connection at 15 kBps (128 kbps) and the other type of traffic at 
32 kBps (256kbps). Is the script right?
Moreover I want understand better how htb work: I can shape the traffic 
router->lan but I can't shape traffic lan->router, is it right? In this 
way I can limit the bandwidht towards lan, but I have the bandwith 
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 == 4662
                        if udp_sport == 4672
                        if udp_sport == 4666
                        if tcp_sport == 6882
                        if tcp_sport == 6346

                        class ( <$ftp> )
                        if tcp_sport == 21
                        if tcp_sport == 22 || ip_tos_delay == 1
                        if tcp_sport == 6667 || tcp_dport == 7000;

                        class ( <$def> )
                        if 1 ;

                        htb () {
                                class ( rate 256kbps, ceil 256kbps ) {
                $p2p   = class ( rate  56kbps, ceil 128kbps ) { sfq; } ;
                $ftp   = class ( rate  56kbps, ceil 128kbps ) { sfq; } ;
               $def   = class ( rate  256kbps, ceil 256kbps ) { sfq; } ;
                                     }
                                }

                        }
              }

##############################
 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Digitalpix: Il metodo più 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@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux