Ethloop is a user-friendly and flexible packet generator and measurement tool. It is primarily utilized for testing HTB qdisc, making it ideal for evaluating network performance.
One of the things I appreciated about Ethloop is that it accepts a controlling program at stdin. This program can be executed to produce a flow rate table at stdout. This rate is output on selected interface(s) and data are received on all interfaces in a system. At times, you may need to set the promisc flag on receiving interfaces.
The packets generated by Ethloop are ethernet frames with a protocol set to ETH_P_CUST. This allows you to safely inject them into existing LANs. Additionally, the MAC addresses are set to MACs of the sending/receiving interface (which may be the same).
The controlling program is a line-based text file, with each line having a fixed format. Comment lines begin with #. Lines are parsed by sscanf "%u %c %u %n". The first number indicates the time in milliseconds from program start, the second character determines the operation to perform, and the third number is the flow ID. The remaining part of the line is operation-dependent and can be text or numbers (which can be in decimal or hex). Numbers can end with k to multiply by 1024.
For example, the line "5000 R 2 4500000" means that at 5 seconds, the rate of flow 2 should be set to 4.5 MBps. It's important to note that the lines are read into struct progdata in memory for performance reasons and should be in increasing time order. Also, Ethloop does not sort the lines by time, so you need to be careful about that. Each line is executed at its time and can change ongoing traffic generators.
Overall, I found Ethloop to be a powerful and flexible tool. It's well worth considering if you need to test packet flow rates in your development work.