Rich Brown <richb.hanover@xxxxxxxxx> wrote: >On May 19, 2020, at 11:24 AM, tincanteksup <tincanteksup@xxxxxxxxx> wrote: >> >> You could try https://github.com/coreemu/core >> >> It will do what you want but possibly not the way you want it. > >Ahah! This is a fascinating solution to the question I asked. (Thank you.) Unfortunately, the question I asked isn't what I really wanted. Let me start again. > >I am looking for a script/set of scripts that will disrupt traffic as described below. > >I envision it would contain a combination of tc + iptables commands to modify the parameters. Bonus points if it can run on an OpenWrt router (Linux kernel 4.14 or newer). I've used tc netem for this type of thing (packet loss, induced delay, etc). "man tc-netem" for the documentation, and the "deBloat" [0] github repository has some complicated examples, and you can find simpler ones via google. The tc bits are all in the kernel, so as long as your kernel has netem configured, it should be good to go, e.g., tc qdisc add dev ethX root netem delay 20ms for a simple 20ms delay, or tc qdisc add dev ethX root netem loss gemodel 0.5% 10% 50% 0.01% for the Gilbert-Elliot model with probability-based loss bursts. -J [0] https://github.com/dtaht/deBloat >Thanks again. > >> On 19/05/2020 11:58, Rich Brown wrote: >>> Folks, >>> I frequently want to create a flakey gateway ("flakeway") that disrupts network traffic for testing. It would: >>> - Drop a specified fraction of packets >>> - Delay packets >>> - Limit bandwidth >>> - etc. >>> Does anyone have a script that can be invoked/turned on and off for an experiment? Thanks. >>> Rich > --- -Jay Vosburgh, jay.vosburgh@xxxxxxxxxxxxx