testingethernettrafficshaping

Slow down Ethernet connection


I have an Ethernet based device that I need to do some network connection testing on.

Ideally I would like to both reduce the bandwidth (down to 10s of Kb/s) and if possible introduce lag (a second or so) into the network connection between the device under test and a server.

Any ideas as to how I would do this? I was thinking of perhaps a router with QoS as a starting point, but not sure if I can get one that would introduce lag as well as reduce bandwidth.


Solution

  • You should use a traffic shaper (either directly on the machine, or up-stream). Modern shaping services like dummynet for FreeBSD, or on Linux tc come directly with common OSes, and they should be able to accommodate your needs:

    The dummynet system facility permits the control of traffic going through the various network interfaces, by applying bandwidth and queue size lim- itations, implementing different scheduling and queue management poli- cies, and emulating delays and losses.

    The big advantage over e.g. the hub is that you can exactly configure different scenarios.