set-networking 416 B

123456789101112131415
  1. #!/bin/bash
  2. latency=30ms
  3. bw=100mbit
  4. if [ "$1" != "" ]; then
  5. latency="$1"
  6. fi
  7. if [ "$2" != "" ]; then
  8. bw="$2"
  9. fi
  10. ./unset-networking
  11. docker exec --privileged duoram_p0 tc qdisc add dev eth0 root netem delay $latency rate $bw
  12. docker exec --privileged duoram_p1 tc qdisc add dev eth0 root netem delay $latency rate $bw
  13. docker exec --privileged duoram_p2 tc qdisc add dev eth0 root netem delay $latency rate $bw