4 ms·
I'd like to have something like this for Linux. Anyone got any tips how to set something like this up? Command line and kernel option hacking preferred to GUI g
by exDM69 15y ago
I'd like to have something like this for Linux. Anyone got any tips how to set something like this up? Command line and kernel option hacking preferred to GUI gadgets.
I would need to test my virtual-connection-over-UDP code with packet loss, latency and incorrect packet order delivery and I really wouldn't want to write code inside my app to test.
- nodata 15y agotc
- qqqqqq 15y agoGood lord, you really do learn something new every day with linux. Thanks!
- exDM69 15y agoExcellent. I sort of expected an utility like this to be part of a "standard installation". Are there good examples of using tc to emulate a crappy connection?
- obtu 15y agoSure. You can add jitter, packet loss, duplication, corruption, shaping, reordering, prioritisation. This page has examples: https://www.linuxfoundation.org/collaborate/workgroups/networking/netem https://www.linuxfoundation.org/collaborate/workgroups/netwo... (netem is the kernel framework, it is to tc what netfilter is to iptables). The examples apply to outgoing traffic, search for ifb0 for a way to apply them to incoming traffic.
- laverick 15y agoAlso worth being aware of - NIST Net: http://snad.ncsl.nist.gov/nistnet/ http://snad.ncsl.nist.gov/nistnet/ Lets you set up a linux box to act as a configurable router that does network emulation. Useful if you want to test devices that don't have their own emulation options.
- lrizzo 15y agoi believe this tool (and the one in Lion/XCode) uses ipfw+dummynet, which is available also for linux/openwrt and windows at http://info.iet.unipi.it/~luigi/dummynet/ http://info.iet.unipi.it/~luigi/dummynet/ (you can find also some documentation material there).