Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
* [LARTC] EF and BE
@ 2002-05-25 14:36 King Yung Tong
  2002-05-25 14:49 ` Martin Devera
  2002-05-25 15:25 ` King Yung Tong
  0 siblings, 2 replies; 3+ messages in thread
From: King Yung Tong @ 2002-05-25 14:36 UTC (permalink / raw)
  To: lartc

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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] EF and BE
  2002-05-25 14:36 [LARTC] EF and BE King Yung Tong
@ 2002-05-25 14:49 ` Martin Devera
  2002-05-25 15:25 ` King Yung Tong
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Devera @ 2002-05-25 14:49 UTC (permalink / raw)
  To: lartc

Hi,
you are right. If you create multi-root tree the subtrees
are independent and can't borrow. Also you don't need to
create 1.1, you can use 1.10 as root (if you don't want to
have other classes under 1.1 of course).
devik

On Sat, 25 May 2002, King Yung Tong wrote:

> 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/
>
>

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] EF and BE
  2002-05-25 14:36 [LARTC] EF and BE King Yung Tong
  2002-05-25 14:49 ` Martin Devera
@ 2002-05-25 15:25 ` King Yung Tong
  1 sibling, 0 replies; 3+ messages in thread
From: King Yung Tong @ 2002-05-25 15:25 UTC (permalink / raw)
  To: lartc

Dear devik,

Thank you, you are right, in my case,

My structure should look like that :

 		1.0 (1.5M)
 	       /    \
      (0.5M)1.1      1.2 (1M)
 	   /         /  \
 	1.10       1.15  1.20
 	(EF)	   (AF)  (BE)

If I add the following:
1) Give AF drop priority,
2) Allow AF (1.15) and BE (1.20) sharing 1M (both under 1.2 sharing
   between 1.2),
3) EF (1.10) is strickly allocate certain BW (0.5M) from 1.1 since it is
   different parent form 1.2).   

Do you think the above stucuture is similar to the differential service
in RFC?

Patrick


On Sat, 25 May 2002, Martin Devera wrote:

> Hi,
> you are right. If you create multi-root tree the subtrees
> are independent and can't borrow. Also you don't need to
> create 1.1, you can use 1.10 as root (if you don't want to
> have other classes under 1.1 of course).
> devik
> 
> On Sat, 25 May 2002, King Yung Tong wrote:
> 
> > 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.
> >
> >
> > 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?
> >

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-05-25 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-25 14:36 [LARTC] EF and BE King Yung Tong
2002-05-25 14:49 ` Martin Devera
2002-05-25 15:25 ` King Yung Tong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox