On Friday 03 May 2002 11:09, Nandan Kaushik wrote:
> hi all,
> Iam using the following CBQs to limit the FTP bandwidth
> pease tell what changes are rquired to make it work....
You are only matching port 21.  This is only the command path.  There is also 
a data-path in an ftp-channel.  But the data-channel has no fixed ports.  So 
you can't match them.   But there is a iptables-hack that can mark all 
ftp-packets and after that you can use that mark with the fw filter to put 
all packets in a class.

Stef

>
> tc qdisc del dev eth0  root
> tc qdisc add dev eth0 root handle 1:0 cbq allot 1514 avpkt 1000
> bandwidth 100Mbit
> tc class add dev eth0 parent 1:0 classid 1:1 cbq allot 1514
> bandwidth 100Mbit rate .4Mbit  weight .4 prio 2   maxburst 20 cell
> 8 avpkt 1000
>
> tc class add dev eth0 parent 1:0  classid 1:2 cbq allot 1514
> bandwidth 100Mbit rate .6Mbit weight .4 prio 4   cell 8 maxburst
> 20 avpkt 1000
>
> tc qdisc add dev eth0 parent 1:1 handle 10:1 sfq
>
> tc qdisc add dev eth0 parent 1:2 handle 20:1 sfq
>
> tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip
> sport 21  0xffff match ip dport 21 0xffff flowid 1:1
>
> ip route add    172.17.1.0/24 via 172.17.1.0 dev eth0 realm 10
>
> tc filter add dev eth0 parent 1:0 prio 2 protocol ip route to 10
> flowid 1:2
>
> Thanks
> NAndan
> _________________________________________________________
> Click below to visit monsterindia.com and review jobs in India or
> Abroad
> http://monsterindia.rediff.com/jobs
>
> _______________________________________________
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

-- 

[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

Reply via email to