Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux: packets reordering simulation

I would like to simulate packets reordering for UDP packets on Linux to measure the performance and fault tolerance of my application. Is there a simple way to do this?

like image 642
Dima Avatar asked Aug 28 '26 21:08

Dima


2 Answers

look into WANEM

WANem thus allows the application development team to setup a transparent application gateway which can be used to simulate WAN characteristics like Network delay, Packet loss, Packet corruption, Disconnections, Packet re-ordering, Jitter, etc.

like image 52
fseto Avatar answered Aug 31 '26 16:08

fseto


You can use the "netem" feature built-into the Linux kernel. It is shipped with most modern distributions. netem is a traffic control discipline module which deliberately delays, drops and reorders packets and is highly configurable.

This only works for sending packets (because the queues are outbound only), so you may wish to place a router host with netem between the two test machines, and run netem on both interfaces (with differing parameters if you like).

The easiest way to achieve this is to run netem in a VM to route between two VM networks. I've found this to be quite handy.

like image 34
MarkR Avatar answered Aug 31 '26 16:08

MarkR



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!