CBQ's weird behavior

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

 



Hi there, 

	I'm using Linux (Debian), kernel version 2.4.17 on Pentium III
based PC and have a NIC 3com EtherLink 10/100 PCI (3c905b) on eth0
interface.
	I've done some tests on CBQ. The class hierarchy was pretty simple
- I've created only one class (100kbit/s) except root class and it was
"bounded isolated". (Commands are shown at the end of this message.) I'
ve used an UDP traffic generator, which has been generating (in this
example) UDP packets with interpacket time of 20 miliseconds and sending
them from  "host A" to "host B". 
For all tests I did the number of generated packets was 5000. For 
different packet sizes I got these results:

p_size (bytes)	10	 50	  100	   200	    300	      400	
g (kbit/s)	20,8	 36,8	  56,8	   96,8	    136,8     176,8	
m (kbit/s)	20,7997	 36,7995  56,7993  96,7987  105,2356  104,0127  
num_of_rec_p	5000	 5000	  5000	   5000	    3947      3043	


p_size (bytes)	500	  800	    1000
g (kbit/s)	216,8	  336,8     416,8
m (kbit/s)	105,7655  103,6437  102,9431
num_of_rec_p	5000	  5000	    5000



p_size ... generated packet size

g ... bit-rate at which packets are sent to the interface ("host A"),
calculated from the following formula:
	 g=p_size+UDP header (bit)/generated_interpacket_time (s)
(generated_interpacket_time in shown example was 20 ms)

m ... packets are received at this rate ("host B"), calculated from the
following formula:
	 m=p_size+UDP header (bit)/measured_interpacket_time (s)
(measured_interpacket_time is average value of all received packets'
interpacket time)

num_of_rec_p ... number of received packets (on "host B") 



-> My first problem is that I can't figure out why (for the packet size
greater than a 400 bytes) the packets that should be dropped go overlimit
and don't get dropped by qdisc or class?
For the packets smaller (or equal) than a 400 bytes this works normal.
-> The second one is: Why the class isn't limited exactly as I defined
(100 kbit/s)?



Hardware configuration was as follows:

["host A" eth0]------[ switch ]---------[eth0 "host B"]
192.168.19.203				192.168.19.204



CBQ definition in my example was: (the commands were started on "host A")


tc qdisc add dev eth0 root handle 1: cbq bandwidth 100Mbit avpkt 1000

tc class add dev eth0 parent 1:0 classid 1:10 cbq bandwidth 100Mbit rate 
100kbit allot 1514 avpkt 1000 prio 5 bounded isolated

tc filter add dev eth0 parent 1: protocol ip prio 5 u32 match ip src 
192.168.19.203/24 classid 1:10



Have I done anything wrong? Anyone has an idea? Please HELP ME.
I will be really greatful if anyone can solve this.

Thank You in advance!

			Bruno

---------
Bruno Jurcic,

Faculty of Electrical Engineering and Computing, University of Zagreb
Department of Telecommunications

e-mail:bruno.jurcic@fer.hr (bj35492@pinus.cc.fer.hr)

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux