4 ms·
The 2.6 Linux kernel includes the ability to create this sort of havoc on your network interfaces via netem[1]. Using the `tc` tool you can add latency, jitter
by luma 4y ago
The 2.6 Linux kernel includes the ability to create this sort of havoc on your network interfaces via netem[1]. Using the `tc` tool you can add latency, jitter, packet loss, packet reordering, corruption, duplication, or rate limiting. You can apply this to an entire interface or have it only apply to single IPs or ranges of IPs as it works through the existing QOS framework in Linux. Combined with a routing interface and you can leverage this to create a wan emulator for external hosts without much trouble.
This is incredibly useful when smoke testing large scale distributed systems or for test/development of protocols intended to be used over dicey connections.
[1] https://www.linux.org/docs/man8/tc-netem.html https://www.linux.org/docs/man8/tc-netem.html
- jeroenhd 4y agoThat's pretty much what this tool does, except that it also supports alternative command lines available on BSDs and macOS. The README even shows how to use tc and iptables to simulate a bad network!