Then I did a simple performance test with iperf between two Dockers in different/same hosts.įirstly let’s see the native network performance between two hosts: iperf -c 192.168.236.130Ĭlient connecting to 192.168.236.130, TCP port 5001 Until now Flannel is setup for Docker and all the workers are connected with each other physically. Sudo docker exec worker- 1 ping All these pings should return successfully. Sudo docker exec worker- 1 ping -c4 10.10. On node1, test connectivity to worker-3: Test connectivity 1 Then use sudo docker exec worker-N ifconfig to get the IP of these workers (e.g. Sudo docker run -itd -name=worker- 3 ubuntu Sudo docker run -itd -name=worker- 2 ubuntu Sudo docker run -itd -name=worker- 1 ubuntu Run the following command on node1: Run Docker 1 etcd -name &Īfter Flannel set up, just start your docker without any differences without Flannel.
On each node download and run Etcd as follows: Download and run etcd 1Ĭurl -L. Assume that you have two Linux VM (or physical machine) with hostname node1/node2 and IP 192.168.236.130/131 seperately. Since Flannel depends on Etcd, you need to download, run and config Etcd before starting flanneld. I copied this architecture image from Flannel GitHub page to illustrate the details of the path a packet take as it tranverse the overlay network. Flannel uses etcd to store network configurations. Flannel runs an agent, flanneld, on each host and is responsible for allocating subnet lease out of a preconfigured address space. Introduction to Flannelįlannel, similar to Calico, VXLAN and Weave, provides a configurable virtual overlay network for Docker. On this post let’s focus on Flannel, a virtual network that creates subnet work Dockers across different hosts. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0Īll Docker installations have this network.In previous post, some overlay network technologies for Docker are analysised. If you use ifconfig command, you will also notice that this network interface is called "docker0": We can see it by typing docker network ls: Standalone Docker Networking Default Bridge NetworkĪfter a fresh Docker installation, you can find a default bridge network up and running. We also have resources on Kubernetes Networking and monitoring Docker containers with cAdvisor, for some great further reading. This article is the second part of a series.
We will see different types of networking, and finally, we will understand how to extend Docker networking using plugins. We are also going to study containers networking. In this tutorial, we are going to understand the different types of container networking. This depends on the use case and/or the adopted technologies. The user can use Docker containers with the default network, the host network, or other types of more advanced networks like overlays. Docker can be used in various use cases: the standalone mode, using Docker Compose, in a single host, or by deploying containers and connecting Docker engines across multiple hosts.