hasavid.blogg.se

Docker network address unavailab;e
Docker network address unavailab;e




Once we have run these commands on both docker0 and docker1, here is what we have: If we had created the interface inside the namespace (like we did for br0) we would not have been able to send traffic outside the namespace. This is necessary so the VXLAN interface can keep a link with our main host interface and send traffic over the network. Notice that we did not create the VXLAN interface inside the namespace but on the host and then moved it to the namespace. We will discuss the learning option later in this post. The proxy option allows the vxlan interface to answer ARP queries (we have seen it in part 2). We configured it to use VXLAN id 42 and to tunnel traffic on the standard VXLAN port. The most important command so far is the creation of the VXLAN interface. The next step is to create a VXLAN interface and attach it to the bridge: docker0:~$ sudo ip link add dev vxlan1 type vxlan id 42 proxy learning dstport 4789ĭocker0:~$ sudo ip link set vxlan1 netns overnsĭocker0:~$ sudo ip netns exec overns ip link set vxlan1 master br0ĭocker0:~$ sudo ip netns exec overns ip link set vxlan1 up Now we are going to create a bridge in this namespace, give it an IP address and bring the interface up: docker0:~$ sudo ip netns exec overns ip link add dev br0 type bridgeĭocker0:~$ sudo ip netns exec overns ip addr add dev br0 192.168.0.1/24ĭocker0:~$ sudo ip netns exec overns ip link set br0 up The first thing we are going to do now is to create an network namespace called “overns”: sudo ip netns add overns If you have tried the commands from the first two posts, you need to clean-up your Docker hosts by removing all our containers and the overlay network: docker0:~$ docker rm -f $(docker ps -aq) In this third post, we will see how we can create our own overlay with standard Linux commands. In part 2 we have looked in details at how Docker uses VXLAN to tunnel traffic between the hosts in the overlay.

docker network address unavailab;e

In part 1 of this blog post we have seen how Docker creates a dedicated namespace for the overlay and connect the containers to this namespace.

docker network address unavailab;e

Temps de lecture : 18 minutes Introduction






Docker network address unavailab;e