[LARTC] Ethloop?

Linux Advanced Routing and Traffic Control

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

 



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/

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