Last active
October 9, 2024 13:41
-
-
Save ttwthomas/c4deb6a20d62b402a26ec5947d9bb3f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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