set-networking.sh 469 B

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