Commit 47ac73df authored by Andreas Schmidt's avatar Andreas Schmidt

Extend Dockerfile to incorporate netem.

parent af1a8900
Pipeline #1220 passed with stages
in 51 seconds
......@@ -17,4 +17,8 @@ RUN cmake . \
ENV PATH /prrt/bin:$PATH
WORKDIR /prrt/bin
COPY entrypoint.sh /
VOLUME /output
ENTRYPOINT ["/entrypoint.sh"]
......@@ -4,3 +4,11 @@
sudo docker run --rm --name=prrt_recv --net=host prrt receiver 5000 127
sudo docker run --rm --name=prrt_send --net=host prrt sender 127.0.0.1 5000 127
bridge=docker network create --subnet="10.5.1.0/24" prrt | cut -c1-12
ovs-vsctl add-port of-switch br-$bridge
docker run --rm --name=prrt_recv --network="prrt" --ip=10.5.1.52 --cap-add NET_ADMIN prrt receiver 5000 127
docker run --rm --name=prrt_send --network="prrt" --ip=10.5.1.51 --cap-add NET_ADMIN prrt sender 10.50.1.52 5000 127 rate 1mbit
#!/bin/bash
dev=eth0
command=$1
shift
if [[ $command -eq "sender" ]];then
params=$1; shift # Add Host
elif [[ $command -eq "receiver" ]]; then
:
else
echo "Command should be either sender or receiver."
fi
params=$(echo $params $1); shift # Add Port
params=$(echo $params $1); shift # Add Rounds
tc qdisc add dev $dev root netem "$@"
/prrt/bin/$command $params
tc qdisc del dev $dev root
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment