tc and ntop inconsistent data flow

Linux Advanced Routing and Traffic Control

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

 



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@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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