The standard way to delay and drop packets in Linux is with the netem scheduling policy; this can be applied to any network device, whether an interface or a bridge, using the tc command from the iproute2 set of tools: https://wiki.linuxfoundation.org/networking/iproute2 A few examples of how to do so are: • Add 10ms of delay to every packet transmitted on eth0: • Add 10ms of delay and 20ms of jitter to every packet bridged by br0: • Randomly drop approximately one percent of packets transmitted on eth1: The netem scheduler has evolved to be a very sophisticated emulator with a rich variety of possible behaviors. The iproute2 man page tc-netem.8 provides more details, while the definitive documentation is in the source code linux-4.XX.X/net/sched/sch_netem.c. This describes in detail the Markov model used, and provides references for further reading.
How can I simulate delayed and dropped packets in Linux?
The standard way to delay and drop packets in Linux is with the netem scheduling policy; this can be applied to any network device, whether an interface or a bridge, using the tc command from the ipro…