[LARTC] EF and BE

Linux Advanced Routing and Traffic Control

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

 



Dear Stef,

Can you take a look of my script:
1. I would like to create root 1 with classid 1:1 and 1:2 and default 1:2.
2. 1:10 is under 1:1 with htb ceil 1Mbit for EF traffic.
3. 1:2 is directly under 1:0 and 1:20 is under 1:2 for default. 
4. I would like to complete seperate 1:1 and 1:2, so that they can't
borrow to each other.

The structure is:

		1.0
	      /     \	
	   1.1     1.2	
	  /           \
	1.10           1.20
	(EF)	      (BE)

Since 1.10 and 1.20 have different parent, they can't borrow to each
other. Do you think I can differentiate the class in this way?

###################################################################

echo Clean all the tc setup
./tc qdisc del dev eth1 root

# edge router
#echo Coloring the packet at Samwise (not working yet to testing based on address)
iptables -A PREROUTING -t mangle -s 192.168.35.2 -j FTOS --set-ftos 0Xb8

# Create qdisc (set default to 1:3)
./tc qdisc add dev eth1 root handle 1: htb default 2

./tc class add dev eth1 parent 1: classid 1:1 htb rate 1.5Mbit burst 50k

# echo classid 1:1 is for EF
./tc class add dev eth1 parent 1:1 classid 1:10 htb rate 1Mbit ceil 1Mbit
burst 50k prio 1

# echo  classid 1:2 is for BE
./tc class add dev eth1 parent 1:2 classid 1:20 htb rate 0.5Mbit ceil0.5Mbit burst 30k prio 2
./tc qdisc add dev eth1 parent 1:20 red limit 500KB min 150KB max 450KB 
burst 200 avpkt 1000 bandwidth 0.5Mbit probability 0.4

# echo Filter
./tc filter add dev eth1 parent 1: protocol ip prio 1 u32 match ip tos
0xb8 0xff classid 1:10
./tc filter add dev eth1 parent 1: protocol ip prio 2 u32 match ip tos 0x0
0xff classid 1:20

######################################################################
./tc qdisc show
qdisc red 8001: dev eth1 limit 500Kb min 150Kb max 450Kb 
qdisc htb 1: dev eth1 r2q 10 default 2 direct_packets_stat 0

./tc -s -d class show dev eth1
class htb 1:1 root rate 1536Kbit ceil 1536Kbit burst 50Kb/8 mpu 0b cburst
3565b/8 mpu 0b level 7 
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 
 lended: 0 borrowed: 0 giants: 0
 tokens: 213332 ctokens: 14857

class htb 1:10 parent 1:1 prio 1 quantum 13107 rate 1Mbit ceil 1Mbit burst
50Kb/8 mpu 0b cburst 2909b/8 mpu 0b level 0 
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 
 lended: 0 borrowed: 0 giants: 0
 tokens: 320000 ctokens: 18187

class htb 1:20 root leaf 8001: prio 2 quantum 6553 rate 512Kbit ceil
512Kbit burst 30Kb/8 mpu 0b cburst 2254b/8 mpu 0b level 0 
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 
 lended: 0 borrowed: 0 giants: 0
 tokens: 384000 ctokens: 28187

#######################################################################

Traffic Generator

By the way, in your web page, I don't think using Iperf to generate
traffic is good idea since Iperf seems to output all the UDP stream at
once. It is good for find the BW, but not for load the network. In my
case, before TC, I use MGEN with using different packet sizes to load
thenetwork. I found that the key issues to load the network is the ratio

	data packet size/traffic packet size

if the ratio is equal to 1, it is very difficult to load the packet
whatever the rate is. If the ratio is greater than 1 (e.g 3.5), it is
quite easy to load the network. 

Does any one know how to load the network easily, whtat tools are you
using?


Patrick

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
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