Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ttwthomas/c4deb6a20d62b402a26ec5947d9bb3f8 to your computer and use it in GitHub Desktop.
Save ttwthomas/c4deb6a20d62b402a26ec5947d9bb3f8 to your computer and use it in GitHub Desktop.
# Fortement inspiré de cet article: http://rabexc.org/posts/docker-networking
# Tester les performances réseaux de ses conteneurs docker
# avec docker-proxy
docker run -it --rm --name=iperf3-server -p 10000:5201 networkstatic/iperf3 -s
docker inspect --format "{{ .NetworkSettings.IPAddress }}" iperf3-server
iperf3 -c 172.17.0.2 ⇒ 37gbs
iperf3 -c localhost -p 10000
# désactiver docker-proxy
vi /etc/docker/daemon.json
{
"userland-proxy": false,
"iptables": true
}
/sbin/sysctl net.ipv4.conf.docker0.route_localnet=1
service docker restart
docker run -it --rm --name=iperf3-server -p 10000:5201 networkstatic/iperf3 -s
iperf3 -c 172.17.0.2
iperf3 -c localhost -p 10000
# host networking
docker run -it --rm --name=iperf3-server --network host networkstatic/iperf3 -s
iperf3 -c localhost -p 5201
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment