set-networking 407 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 oram_C tc qdisc add dev eth0 root netem delay $latency rate $bw
  12. docker exec --privileged oram_D tc qdisc add dev eth0 root netem delay $latency rate $bw
  13. docker exec --privileged oram_E tc qdisc add dev eth0 root netem delay $latency rate $bw