set-networking 324 B

1234567891011121314
  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 floram_p0 tc qdisc add dev eth0 root netem delay $latency rate $bw
  12. docker exec --privileged floram_p1 tc qdisc add dev eth0 root netem delay $latency rate $bw