You can try this (adapted from http://www.knowplace.org/shaper/examples.html): tc qdisc add dev ppp0 root handle 1: htb default 60 tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 10kbit ceil $MAXSPEEDkbit prio 0 tc filter add dev ppp0 protocol ip parent 1:0 protocol ip prio 1 u32 \ match ip dport 80 0xffff \ match ip src $SOMEIPADDRESS \ police rate 10kbit flowid 1:10 Antonio Luiz > -----Mensagem original----- > De: lartc-admin@xxxxxxxxxxxxxxx > [mailto:lartc-admin@xxxxxxxxxxxxxxx] Em nome de ncrfgs > Enviada em: quinta-feira, 25 de novembro de 2004 14:17 > Para: lartc@xxxxxxxxxxxxxxx > Assunto: kernel configuration and tc commands for > traffic shaping > > > Hi, > > I wished to shape the traffic that cross my ppp0 interface > so I asked around and google'd a bit and I headed in the > LARTC HOWTO. > > As stated in the early in the text, as the title implies, > that is an "Advanced" HOWTO and while by no means rocket > science, some prior knowledge is assumed. > > Unfortunately I found myself lost very soon and I'm > writing here in hope of some help. > > > What I'd like to do, if it were possible with some > iptables switch, would be something like the following. > > iptables --insert INPUT --in-interface ppp0 \ > --protocol tcp --destination-port 80 \ > --source $SOMEIPADDRESS \ > --jump SHAPING --limit-to 10KBs > > Of course the last line is pure fiction =) but I thought > it would have explained what I wished to do pretty well. > > Shaping the traffic according to some --source switch > isn't a priority at the moment but it would be nice to, > anyhow. > > > After some reading I found out that what I wished to do > is very likely called "traffic shaping". So I searched > the text for "shaping" and I found a note saying that, if > all I wanted to do is simple traffic shaping, I could have > skipped everything and headed to the Other possibilities > chapter, and readed about CBQ.init. > > Unforntunately, as stated below, by all means CBQ.init is > useful if the 'how and why' don't interest me, but they > do, actually. > > I tried both the CBQ.init and the HTB.init scripts but > they were huge, I wasn't able to understand them and I > didn't managed to find any information about how to > configure the kernel. > > Of course, I could check out everything in the QoS section > in menuconfig during the kernel configuration but I'd like > to understand which support I would actually use. > > > At least, after having tried to read them, I realized > that, if I understood well, what I wish to do should be > possible only using tc, not iptables. > > > Could you please help me to find out which commands to > type and how to configure the kernel in order to > accomplish my task? > > I'd need something in the middle between the "rocket > science" of LARTC and the "how and why don't interest you" > of CBQ.init. > > > > Scuse me if some of my questions are FAQs. > > Thanks in advance. > > Best regards. > -- > Value your freedom, or you will lose it, teaches history. > ``Don't bother us with politics,'' respond those who don't > want to learn. > > -- Richard M. Stallman > http://www.gnu.org/philosophy/linux-gnu-freedom.html > _______________________________________________ LARTC mailing list / LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/