Open-source network emulators and simulators
brianlinkletter.com
brianlinkletter.com
I would swap it in an instant for an equally user-friendly open-source one though, if there was anything comparable, as some of the features lacking in eve-NG Community were really annoying to deal with (e.g. no connection to a real, physical network and/or the internet)
I also wrote a now somewhat out of date cautionary note about all the pitfalls you can land into here: https://www.bufferbloat.net/projects/codel/wiki/Best_practic...
And over here, while we convinced systemd to adopt fq_codel by default, I cautioned against drawing conclusions from within the box simulations verses the general internet's behaviors: https://github.com/systemd/systemd/issues/9725#issuecomment-...
I am perversely glad measuring this stuff irks so many other people besides me!
I remember it was pretty cool. If I recall correctly, I could run several instances of all kinds of networking gear, configure wireless interfaces, place physical barriers, roads, etc... then I could see how packets and routing tables would behave while the emulated instances of routers/switches/APs moved around the physical world.
Pausing the would, clicking on a little car, and serialing into a particular router that was running Cisco IOS was always pretty mind blowing to me though.
They had all kinds of custom protocols that could route network traffic depending on which direction the traffic was flowing: you didn't want packets to get stuck in loops, hopping back and forth between oncoming traffic. Especially in sparse environments.
I don't know what happened to it, it looks like it got spun off into a commercial company:
https://chromedevtools.github.io/devtools-protocol/tot/Netwo...
GitHub - https://github.com/coreemu/core
Community Discord - https://discord.gg/AKd7kmP
Not sure about other os.
https://www.pico.net/kb/how-can-i-simulate-delayed-and-dropp...
Couple this with inserting pf as a transparent firewall and you can make a good hop become all sorts of crappy. And you can do this on very low end hardware with just a pair of NICs.
My personal favorite is IMUNES. Works very nicely as VM and its lightweight. You can run 100s of instances without problem.
I am looking for any reliable way of simulating user application working on mobile phone.
From the provided list, I think the most promising and realistic open source network simulator and emulator is Mininet due to its lightweight approach capable of running off-the-shelf Linux OS and software. In addition it has thriving eco-system that made it unique, accessible and prime for wide adoption for examples:
a) It's currently actively being used to simulate and emulate smart city project by its original author to improve urban networking [1],[2].
b) It has open learning materials resources from open source book (Mininet-WiFi) and open lab instructions manual (Mininet-SDN) [3],[4].
c) Its lightweight feature enabling it to simulate very large number of nodes using the nested containers capability as demonstrated by extensions created by third party simulation tools namely NestedNet and ComNetsEmu [5],[6],[7],[8].
[1] SigComm 2022 Cosmos Testbed Tutorial:
https://wiki.cosmos-lab.org/wiki/Workshops/SigComm2022
[2] Reconfigurable topology testbeds: A new approach to optical system experiments:
https://www.sciencedirect.com/science/article/pii/S106852002...
[3] Mininet Wi-Fi book:
https://github.com/ramonfontes/mn-wifi-ebook
[4] SDN Labs using Mininet manual:
http://ce.sc.edu/cyberinfra/workshops/Material/SDN/SDN_Labs....
[5] Network Virtualization and Emulation using Docker, OpenvSwitch and Mininet-based Link Emulation:
https://scholarworks.umass.edu/masters_theses_2/985/
[6] NestedNet: A Container-based Prototyping Tool for Hierarchical Software Defined Networks:
https://ieeexplore.ieee.org/document/9244858
[7] ComNetsEmu: A Lightweight Emulator:
https://www.sciencedirect.com/science/article/abs/pii/B97801...
[8] A virtual emulator/testbed designed for the book: Computing in Communication Networks: From Theory to Practice (2020):
I just want an IPv4/IPv6 proxy that does nothing other than delay, rate-limit, and/or drop packets.
This is a critical aspect of application performance that all developers just ignore because it's such a PITA to simulate.
Your loopback adapter has a latency of 30 microseconds, but that same web-to-database connection might traverse multiple switches, routers, firewalls, and load balancers and have a latency of over 1,000 microseconds (1ms) in production. That's thirty times worse, and I'm not even talking about zone-redundant deployments, regional-to-region failover, or any such thing!
Ditto with web apps, where every developer mistakenly believes that their Angular or React monstrosity is "performant"... because it is... on their own machine. With loopback networking. Try that over a 3G connection... in rural India. Not Indiana. India.
It seems to be storing stuff directly on disk, on the same host that the software itself runs on.
So you're right if you consider the filesystem a sort of database, but otherwise no :)
Perhaps one of the linked projects can help with it?
Anyone know of something similar for Linux that can be configured via config/env vars/cli?
you could probably achieve something similar with bpf today.
About 15 years ago I needed to emulate a network over a satellite link. We had limited amount of time on the dish and it was a fairly costly affair. We had a small rack of hardware together with a bunch of measuring instruments that would be in the field for data acquisition. It would be sending back data home where it would be processed and then sent back into the field. The (limited) bandwidth reserved and the inherent latency on the link gave us some interesting issues to deal with, but it required a few iterations to get things working smoothly.
The rack had a Linux box which acted as a router (among other things), and while it was in the office we'd just hook it up via ethernet. So I used tc[0] on there to introduce a fixed latency on transmission and cap the outgoing bandwith to whatever was available on the link. I did the same on the homestation for outgoing traffic but there I just used an old box with two ethernet ports and set it up as a bridge.
For dropping packets I used iptables, and some other things.
It requires some familiarity with the LARTC[1], which isn't the most readable document, and how things work in Linux. It gave us exactly what we needed without having to pay for time on the dish for testing.
It's been over a decade and the details are extremely vague, but I'm sure that if you want to you could mark certain packets with netfilter and then delay those packets somehow, rather than just delay the entire network device. I remember that with iptables we used to mark packets from SSH in the mangle table and then use that mark with tc to give traffic marked priority on the outgoing device.
It's not exactly a proxy, but back in the day it worked for that specific use case.
This is my BGP troll lab for some testing ;)
"AWS Fault Injection Simulator supports chaos engineering experiments on Amazon EKS Pods" - https://aws.amazon.com/blogs/containers/aws-fault-injection-...
https://github.com/Shopify/toxiproxy
If you have Docker all you need is a few terminal commands
Built-in into linux kernel, althought it's per interface unless you get dirty with traffic shaping tools.
Also you probably dont want proxy as support for proxy servers can be pretty iffy across software stack.
> Your loopback adapter has a latency of 30 microseconds, but that same web-to-database connection might traverse multiple switches, routers, firewalls, and load balancers and have a latency of over 1,000 microseconds (1ms) in production. That's thirty times worse, and I'm not even talking about zone-redundant deployments, regional-to-region failover, or any such thing!
Reminds me of a time when COVID hit and the suddenly-remote developers were suprised the time to start of their application went from 5 to 30 minutes (they connected their app to DB server on dev environment to not carry big-ass database with them)...
> Ditto with web apps, where every developer mistakenly believes that their Angular or React monstrosity is "performant"... because it is... on their own machine. With loopback networking. Try that over a 3G connection... in rural India. Not Indiana. India.
And that reminds me of this time frontend developers loading 700MB of data to load the site and not noticing that, but sending ticket to ops "server is a bit slow, could you give it more cores?". Said developers were working in office that had direct connection to data center 500m away with sub-ms latency and plenty of bandwidth.
I had many times pondered traffic shaping frontend devs connection to like 10Mbit after that... maybe 56kbit for repeat offenders.
"The netem queue discipline provides Network Emulation functionality for testing protocols by emulating the properties of real-world networks.
The queue discipline provides one or more network impairments to packets such as: delay, loss, duplication, and packet corruption."
I mean this in the sense that it can’t even emulate a “long cable” properly.
I’ve tried both the Linux and BSD tools mentioned by others here and they’re all very old, weird, and difficult.
Luigi Rizzo is a top notch hacker.