
What is it that makes people think you need a special application or tool to do these things? Here's my default gateway on my home LAN: sasha at mouse ~> ping -c 5 172.30.105.1 PING 172.30.105.1 (172.30.105.1) 56(84) bytes of data. 64 bytes from 172.30.105.1: icmp_seq=1 ttl=64 time=0.238 ms 64 bytes from 172.30.105.1: icmp_seq=2 ttl=64 time=0.618 ms 64 bytes from 172.30.105.1: icmp_seq=3 ttl=64 time=0.457 ms 64 bytes from 172.30.105.1: icmp_seq=4 ttl=64 time=0.474 ms 64 bytes from 172.30.105.1: icmp_seq=5 ttl=64 time=0.382 ms --- 172.30.105.1 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4052ms rtt min/avg/max/mdev = 0.238/0.433/0.618/0.126 ms And here's my default gateway on my home LAN with 300 ms of latency "injected": sasha at mouse ~> sudo tc qdisc add dev enp1s0 root netem delay 300ms sasha at mouse ~> ping -c 5 172.30.105.1 PING 172.30.105.1 (172.30.105.1) 56(84) bytes of data. 64 bytes from 172.30.105.1: icmp_seq=1 ttl=64 time=300 ms 64 bytes from 172.30.105.1: icmp_seq=2 ttl=64 time=300 ms 64 bytes from 172.30.105.1: icmp_seq=3 ttl=64 time=300 ms 64 bytes from 172.30.105.1: icmp_seq=4 ttl=64 time=301 ms 64 bytes from 172.30.105.1: icmp_seq=5 ttl=64 time=300 ms --- 172.30.105.1 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4005ms rtt min/avg/max/mdev = 300.841/300.902/301.038/0.605 ms And here's 300ms latency +/- variability of 40ms: sasha at mouse ~> sudo tc qdisc add dev enp1s0 root netem delay 300ms 40ms sasha at mouse ~> ping -c 5 172.30.105.1 PING 172.30.105.1 (172.30.105.1) 56(84) bytes of data. 64 bytes from 172.30.105.1: icmp_seq=1 ttl=64 time=299 ms 64 bytes from 172.30.105.1: icmp_seq=2 ttl=64 time=316 ms 64 bytes from 172.30.105.1: icmp_seq=3 ttl=64 time=324 ms 64 bytes from 172.30.105.1: icmp_seq=4 ttl=64 time=321 ms 64 bytes from 172.30.105.1: icmp_seq=5 ttl=64 time=326 ms --- 172.30.105.1 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4002ms rtt min/avg/max/mdev = 299.411/317.749/326.472/9.706 ms And here's back to normal: [root at mouse ~]# tc qdisc del dev enp1s0 root netem [root at mouse ~]# ping 172.30.105.1 PING 172.30.105.1 (172.30.105.1) 56(84) bytes of data. 64 bytes from 172.30.105.1: icmp_seq=1 ttl=64 time=0.342 ms ^C --- 172.30.105.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.342/0.342/0.342/0.000 ms And here's "loss insertion" of 5%: sasha at mouse ~> sudo tc qdisc add dev enp1s0 root netem loss 5% sasha at mouse ~> ping -c 5 172.30.105.1 PING 172.30.105.1 (172.30.105.1) 56(84) bytes of data. 64 bytes from 172.30.105.1: icmp_seq=2 ttl=64 time=0.514 ms 64 bytes from 172.30.105.1: icmp_seq=3 ttl=64 time=0.501 ms 64 bytes from 172.30.105.1: icmp_seq=4 ttl=64 time=0.546 ms 64 bytes from 172.30.105.1: icmp_seq=5 ttl=64 time=0.279 ms --- 172.30.105.1 ping statistics --- 5 packets transmitted, 4 received, 20% packet loss, time 4056ms rtt min/avg/max/mdev = 0.279/0.460/0.546/0.105 ms sasha at mouse ~> ping -c 5 172.30.105.1 PING 172.30.105.1 (172.30.105.1) 56(84) bytes of data. 64 bytes from 172.30.105.1: icmp_seq=1 ttl=64 time=0.732 ms 64 bytes from 172.30.105.1: icmp_seq=2 ttl=64 time=0.471 ms 64 bytes from 172.30.105.1: icmp_seq=3 ttl=64 time=0.474 ms 64 bytes from 172.30.105.1: icmp_seq=4 ttl=64 time=0.334 ms 64 bytes from 172.30.105.1: icmp_seq=5 ttl=64 time=0.367 ms --- 172.30.105.1 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4020ms rtt min/avg/max/mdev = 0.334/0.475/0.732/0.141 ms No, I'm not that brilliant. I Googled it: http://stackoverflow.com/questions/614795/simulate-delayed-and-dropped-packe... App to inject latency? You people kill me sometimes. -- Alex -- Alex Balashov | Principal | Evariste Systems LLC Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/