hi all, Iam using the following CBQs to limit the FTP bandwidth pease tell what changes are rquired to make it work.... 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
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 / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/-- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net
On Fri, May 03, 2002 at 12:21:13PM +0200, Stef Coene wrote: [...]> 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.I searched for this a while back, and didn''t see it in the standard patch-o-matic stuff... Do you know where it can be found (the patch for marking ftp-packets)? -- Adrian Chung (adrian at enfusion-group dot com) http://www.enfusion-group.com/~adrian GPG Fingerprint: C620 C8EA 86BA 79CC 384C E7BE A10C 353B 919D 1A17 [toad.enfusion-group.com] up 40 days, 20:27, 20 users