All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Ethloop?
@ 2002-06-06 23:02 King Yung Tong
  2002-06-07 18:02 ` Martin Devera
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: King Yung Tong @ 2002-06-06 23:02 UTC (permalink / raw)
  To: lartc

Dear all,

I copy a Ethloop script for tc script, but no response???
Does anyone know how to use ethloop?


Ethloop;
#1st parameter -- time in milliseconds from program start
#2nd parameter -- operation to do
#3rd parameter -- flow id
#4th parameter -- operation dependent
#
#e.g 5000 R 2 4500000
#means at time 5sec set rate of flow 2 to 4.5MBps
#Time should be in increasing time order
#Each line is executed at its time and will change the ongoing traffic
generators

#example1
#Two flow simulation
# Two flow simulation

# lo will be used to TX and RX
0       i       P 0x10010       lo
0       i       P 0x10020       lo

# set simulation packet size to 1k
0       S      P 0x10010        1k
0       S      P 0x10020   1k

# start both flows
0       R      P 0x10010        100k
0       R      P 0x10020        100k

# flow 1 to 50k and 10k later
2000    R      P 0x10010        50k
4000    R      P 0x10020        10k

# finish at 6sec
6000    X      0        0


tc script:

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

echo Core router

echo Create qdisc and set default to 1:30
./tc qdisc add dev eth1 root handle 1: htb default 30
./tc class add dev eth1 parent 1: classid 1:1 htb rate 1.5Mbit burst 50k

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

echo Create class for AF
./tc class add dev eth1 parent 1:2 classid 1:20 htb rate 0.5Mbit ceil
1Mbit burst 30K prio 1

echo Create class for BE
./tc class add dev eth1 parent 1:2 classid 1:30 htb rate 0.3Mbit ceil
1Mbit burst 30k prio 2
./tc qdisc add dev eth1 parent 1:30 red limit 1800KB min 150KB max 450KB
burst 200 avpkt 1000 bandwidth 1Mbit 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 filter add dev eth1 parent 1: protocol ip prio 3 u32 match ip tos
0x98 0xff classid 1:30


Thank you

Patrick

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

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

end of thread, other threads:[~2002-06-07 20:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-06 23:02 [LARTC] Ethloop? King Yung Tong
2002-06-07 18:02 ` Martin Devera
2002-06-07 18:36 ` King Yung Tong
2002-06-07 18:45 ` Martin Devera
2002-06-07 18:57 ` King Yung Tong
2002-06-07 19:06 ` Martin Devera
2002-06-07 19:47 ` Martin Devera
2002-06-07 19:47 ` King Yung Tong
2002-06-07 19:53 ` King Yung Tong
2002-06-07 20:03 ` Martin Devera
2002-06-07 20:17 ` King Yung Tong
2002-06-07 20:19 ` Martin Devera
2002-06-07 20:26 ` King Yung Tong
2002-06-07 20:48 ` Martin Devera
2002-06-07 20:53 ` King Yung Tong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.