Dear List, Sorry for the dublicated email but I couldn''t get any answer. I am trying to limit some IP blocs with tc with following three step. # interface tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth 256kbit # class tc class add dev eth0 parent 1: classid 1:1 cbq rate 64kbit \ allot 1500 prio 5 bounded isolated # rules # download tc filter add dev eth0 parent 1: protocol ip prio 16 u32 \ match ip dst 10.0.1.0/24 flowid 1:1 # upload tc filter add dev eth0 parent 1: protocol ip prio 16 u32 \ match ip src 10.0.1.0/24 flowid 1:1 Problem is when I try to measure traffic with ntop (www.ntop.org), it is seen that overall traffic which that ip block limited to is much higher then 64kbit, actually it is about 500Kbps which signifies that tc do not limit properly. What could be the reason of this inconsistancy? How could I limit 64 Kbps? Is the above configuration correct? Many thanks for any kind of comment why it is different? -Mehmet PS: tc -s class show dev eth0 shows that I got the following [root@nat root]# /usr/local/sbin/traffic-limit.sh status class cbq 1: root rate 168Kbit (bounded,isolated) prio no-transmit Sent 6068639 bytes 5841 pkts (dropped 0, overlimits 0) borrowed 0 overactions 0 avgidle 38094 undertime 0 class cbq 1:1 parent 1: rate 8Kbit (bounded,isolated) prio 5 Sent 1460691 bytes 3174 pkts (dropped 0, overlimits 12339) borrowed 0 overactions 1372 avgidle -115477 undertime -33146 class cbq 1:2 parent 1: rate 8Kbit (bounded,isolated) prio 5 Sent 2336291 bytes 3192 pkts (dropped 0, overlimits 32606) borrowed 0 overactions 2376 avgidle 38094 undertime 0 class cbq 1:3 parent 1: rate 84Kbit (bounded,isolated) prio 5 Sent 3125820 bytes 4851 pkts (dropped 0, overlimits 1053) borrowed 0 overactions 521 avgidle 2631 undertime 0 class cbq 1:4 parent 1: rate 8Kbit (bounded,isolated) prio 5 Sent 217663 bytes 496 pkts (dropped 0, overlimits 3553) borrowed 0 overactions 363 avgidle -195655 undertime -8.22928e+08 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thursday 06 January 2005 16:33, Mehmet Ali Suzen wrote:> Dear List, > Sorry for the dublicated email but I couldn''t get any answer. > > I am trying to limit some IP blocs with tc with following three step. > > # interface > tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth 256kbit # > class tc class add dev eth0 parent 1: classid 1:1 cbq rate 64kbit \ > allot 1500 prio 5 bounded isolated > # rules > # download > tc filter add dev eth0 parent 1: protocol ip prio 16 u32 \ > match ip dst 10.0.1.0/24 flowid 1:1 > # upload > tc filter add dev eth0 parent 1: protocol ip prio 16 u32 \ > match ip src 10.0.1.0/24 flowid 1:1 > > > Problem is when I try to measure traffic with ntop (www.ntop.org), it is > seen that overall traffic which that ip block limited to is > much higher then 64kbit, actually it is about 500Kbps which > signifies that tc do not limit properly. What could be the reason > of this inconsistancy? How could I limit 64 Kbps? Is the above > configuration correct?Remove the isolated parameter and try it again. I have some working cbq scripts on http://docum.org on the test pages. Stef _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Dear Stef Coene, Many thanks for the tip. Seems like it is working now. But I have restrict 2 way traffic with 42 Kbit, that is correspond to 64 Kbit. Is it logical? What is the proportion between dowload and upload in an ideal data flow? Best Regards, Mehmet. PS: Thanx for your effort in your web site. sharing info you have with the community.> On Thursday 06 January 2005 16:33, Mehmet Ali Suzen wrote: >> Dear List, >> Sorry for the dublicated email but I couldn''t get any answer. >> >> I am trying to limit some IP blocs with tc with following three step. >> >> # interface >> tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth 256kbit # >> class tc class add dev eth0 parent 1: classid 1:1 cbq rate 64kbit \ >> allot 1500 prio 5 bounded isolated >> # rules >> # download >> tc filter add dev eth0 parent 1: protocol ip prio 16 u32 \ >> match ip dst 10.0.1.0/24 flowid 1:1 >> # upload >> tc filter add dev eth0 parent 1: protocol ip prio 16 u32 \ >> match ip src 10.0.1.0/24 flowid 1:1 >> >> >> Problem is when I try to measure traffic with ntop (www.ntop.org), it is >> seen that overall traffic which that ip block limited to is >> much higher then 64kbit, actually it is about 500Kbps which >> signifies that tc do not limit properly. What could be the reason >> of this inconsistancy? How could I limit 64 Kbps? Is the above >> configuration correct? > Remove the isolated parameter and try it again. > I have some working cbq scripts on http://docum.org on the test pages. > > Stef > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Friday 07 January 2005 17:29, Mehmet Ali Suzen wrote:> Dear Stef Coene, > Many thanks for the tip. Seems like it is working now. But > I have restrict 2 way traffic with 42 Kbit, that is correspond > to 64 Kbit. Is it logical?I don''t undestand what you want to say ....> What is the proportion between > dowload and upload in an ideal data flow?That depends on the type dateflow. Stef _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/