O'Reilly logo

Learning Docker Networking by Santosh Kumar Konduri, Vaibhav Kohli, Rajdeep Dua

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Open vSwitch

Docker uses the Linux bridge docker0 by default. However, there are cases where Open vSwitch (OVS) might be required instead of a Linux bridge. A single Linux bridge can only handle 1024 ports – this limits the scalability of Docker as we can only create 1024 containers, each with a single network interface.

Single host OVS

We will now install OVS on a single host, create two containers, and connect them to an OVS bridge.

Use this command to install OVS:

# sudo apt-get install openvswitch-switch

Install the ovs-docker utility with the following:

# cd /usr/bin
# wget https://raw.githubusercontent.com/openvswitch/ovs/master/utilities/ovs-docker
# chmod a+rwx ovs-docker

The following diagram shows the single-host OVS:

Creating an OVS bridge ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required