Skip to contentSkip to conversation

Flakeway recipe

DISCUSSION Rich Brown 3 participants 5 messages May 19, 2020 – May 24, 2020

lore
Share & tools
lore

Rich Brown

author
#0 lore raw

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

#1 lore raw

You could try https://github.com/coreemu/core

It will do what you want but possibly not the way you want it.

Quoted 13 lines · Rich Brown

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

author
#2 lore raw
In reply to Rich Brown
Quoted 4 lines · tincanteksup

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).

Thanks again.

Quoted 9 lines · Rich Brown
Quoted 8 lines

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

#3 lore raw
In reply to Rich Brown
Quoted 11 lines · Rich Brown
Quoted 4 lines · tincanteksup

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

Quoted 12 lines

Thanks again.

Quoted 9 lines · Rich Brown
Quoted 8 lines

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, [email protected]

#4 lore raw
In reply to Rich Brown

Hi Rich

Quoted 6 lines · Rich Brown
Quoted 4 lines · tincanteksup

You could try https://github.com/coreemu/core

It will do what you want but possibly not the way you want it.

Quoted 18 lines

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).

Thanks again.

Quoted 9 lines · Rich Brown
Quoted 8 lines

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

FYI: coreemu does contain some reasonable examples of the scripts you are looking for.

What I like is, with some imagination, I can use them more-or-less anywhere.

And plug in my own too ;-)

A. N. Other Rich.