SlideShare a Scribd company logo
Docker Networking
LAKSHMAN KUMAR
Agenda
• Docker networking with bridge
• libnetwork overview
• libnetwork goals
• libnetwork components
• libnetwork deployments
• Demo
Docker with linux bridge
• On startup Docker creates a Ethernet Bridge docker0 on the Linux Kernel
• docker0 creates a virtual subnet on the Docker host
• Docker creates a pair of virtual Ethernet interface on each container
• One of the Ethernet interface is the eth0 in the container
• Another Ethernet interface will have a unique name in the form of veth* (e.g.vethxxxx) and is
bind to docker0
• So linux bridge do a simple MAC level forwarding and its independent protocol
 without libnetwork networking handled by Docker Engine and libcontainer
•Docker Engine was responsible for providing the configuration for the container's networking stack.
•Libcontainer would then use this information to create the necessary networking devices
Docker Networking (Libnetwork) - Lakshman Kumar
libnetwork overview
• Modularize the networking logic in Docker Engine and libcontainer into a
single, reusable library
• "libnetwork" is a library that can provide native support for Docker
container and its function is to connect containers.
• Got open sourced in April
• libnetwork experimental in Docker 1.7
• Library for creating and managing network stacks for containers
• driver-based networking implements the container network model
Goals of libnetwork
•Make network and service as top class object
- controller.NewNetwork()
•Provide a pluggable network stack
•span network across multiple hosts (using overlay taking b/w containers in
different host)
Container network model
Components of Container network model
Endpoint
An Endpoint joins a Sandbox to a Network. An implementation of an Endpoint could be a veth pair, an Open vSwitch
internal port or similar. An Endpoint can belong to only one network but may only belong to one Sandbox.
SandBox
A Sandbox contains the configuration of a container's network stack. This includes management of the container's
interfaces, routing table and DNS settings. An implementation of a Sandbox could be a Linux Network Namespace. A
Sandbox may contain many endpoints from multiple networks.
Network
A Network is a group of Endpoints that are able to communicate with each-other directly. An implementation of a Network
could be a Linux bridge, a VLAN, etc. Networks consist of many endpoints.
Cluster
CNM Objects
• NetworkController object provides the entry-point into libnetwork that exposes simple APIs
for the users (such as Docker Engine) to allocate and manage Networks. libnetwork supports
multiple active drivers (both inbuilt and remote). NetworkController allows user to bind a
particular driver to a given network.
• libnetwork provides a RESTful API to perform CRUD on network and endpoints
• Endpoint represents a Service Endpoint. It provides the connectivity for services exposed by a
container in a network with other services provided by other containers in the network.
• Sandbox object represents container's network configuration such as ip-address, mac-address,
routes, DNS entries.
- Sandbox object is created when the user requests to create an endpoint on a network.
Drivers
•Drivers implement the driver API
•drivers provides the actual implementation that makes network work.
•Bridge driver
- created a linux bridge for each network
- creates veth pair for each endpoint
- one end is attached to the bridge the other appears as etho inside the container
- iptables rules created for NAT
•Overlay driver
References
Libnetwork overview: https://github.com/docker/libnetwork
Libnetwork configuration: https://github.com/docker/libnetwork/tree/master/docs
https://www.youtube.com/watch?v=LNUhVfufjZw
Docker Networking (Libnetwork) - Lakshman Kumar

More Related Content

What's hot (18)

PDF
"One network to rule them all" - OpenStack Summit Austin 2016
Phil Estes
 
PPTX
Networking in Docker Containers
Attila Kanto
 
PPTX
Docker Networking - Current Status and goals of Experimental Networking
Sreenivas Makam
 
PDF
Docker Online Meetup #22: Docker Networking
Docker, Inc.
 
PDF
DockerCon EU 2015: Docker Networking Deep Dive
Docker, Inc.
 
PDF
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Michelle Antebi
 
PDF
Container Network Interface: Network Plugins for Kubernetes and beyond
KubeAcademy
 
PPTX
DockerCon US 2016 - Docker Networking deep dive
Madhu Venugopal
 
PPTX
Docker Networking in OpenStack: What you need to know now
PLUMgrid
 
PPTX
Docker Networking
Kingston Smiler
 
PDF
Docker 1.12 networking deep dive
Madhu Venugopal
 
PDF
Docker network
Mohammadreza Amini
 
PDF
Octo talk : docker multi-host networking
Hervé Leclerc
 
PDF
Docker Networking – Running multi-host applications
Christina Rasimus
 
PDF
Docker: the road ahead
shykes
 
PDF
Unikernels: the rise of the library hypervisor in MirageOS
Docker, Inc.
 
PPTX
Docker Networking Overview
Sreenivas Makam
 
PDF
Kubernetes Networking - Giragadurai Vallirajan
Neependra Khare
 
"One network to rule them all" - OpenStack Summit Austin 2016
Phil Estes
 
Networking in Docker Containers
Attila Kanto
 
Docker Networking - Current Status and goals of Experimental Networking
Sreenivas Makam
 
Docker Online Meetup #22: Docker Networking
Docker, Inc.
 
DockerCon EU 2015: Docker Networking Deep Dive
Docker, Inc.
 
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Michelle Antebi
 
Container Network Interface: Network Plugins for Kubernetes and beyond
KubeAcademy
 
DockerCon US 2016 - Docker Networking deep dive
Madhu Venugopal
 
Docker Networking in OpenStack: What you need to know now
PLUMgrid
 
Docker Networking
Kingston Smiler
 
Docker 1.12 networking deep dive
Madhu Venugopal
 
Docker network
Mohammadreza Amini
 
Octo talk : docker multi-host networking
Hervé Leclerc
 
Docker Networking – Running multi-host applications
Christina Rasimus
 
Docker: the road ahead
shykes
 
Unikernels: the rise of the library hypervisor in MirageOS
Docker, Inc.
 
Docker Networking Overview
Sreenivas Makam
 
Kubernetes Networking - Giragadurai Vallirajan
Neependra Khare
 

Similar to Docker Networking (Libnetwork) - Lakshman Kumar (20)

PDF
Networking in Docker
Knoldus Inc.
 
PDF
DockerCon SF 2015: Networking Breakout
Docker, Inc.
 
PPTX
DockerCon SF 2015: Networking Breakout
Docker, Inc.
 
PDF
Building a sdn solution for the deployment of web application stacks in docker
Jorge Juan Mendoza
 
PDF
Austin Docker Meetup May 2015
John Willis
 
PPTX
Docker network Present in VietNam DockerDay 2015
Van Phuc
 
PDF
KubernetesNetworkingAndImplementation-Lecture.pdf
AnkitShukla661141
 
PPTX
Docker Networking : 0 to 60mph slides
Docker, Inc.
 
PDF
OpenStack Tokyo 2015: Connecting the Dots with Neutron
Phil Estes
 
PDF
Docker Networking Deep Dive
Docker, Inc.
 
PPTX
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
Guillaume Morini
 
PPTX
Docker for Ops: Docker Networking Deep Dive, Considerations and Troubleshooti...
Docker, Inc.
 
PDF
Docker 101
Lâm Đào
 
PDF
Demystifying docker networking black magic - Lorenzo Fontana, Kiratech
Codemotion Tel Aviv
 
PDF
Magnum Networking Update
Daneyon Hansen
 
PPTX
Docker Networking: Control plane and Data plane
Docker, Inc.
 
PDF
Overlay/Underlay - Betting on Container Networking
Lee Calcote
 
PDF
Demystfying container-networking
Balasundaram Natarajan
 
PDF
Docker 1.11 Meetup: Networking Showcase
Docker, Inc.
 
PDF
Docker Meetup: Docker Networking 1.11 with Madhu Venugopal
Docker, Inc.
 
Networking in Docker
Knoldus Inc.
 
DockerCon SF 2015: Networking Breakout
Docker, Inc.
 
DockerCon SF 2015: Networking Breakout
Docker, Inc.
 
Building a sdn solution for the deployment of web application stacks in docker
Jorge Juan Mendoza
 
Austin Docker Meetup May 2015
John Willis
 
Docker network Present in VietNam DockerDay 2015
Van Phuc
 
KubernetesNetworkingAndImplementation-Lecture.pdf
AnkitShukla661141
 
Docker Networking : 0 to 60mph slides
Docker, Inc.
 
OpenStack Tokyo 2015: Connecting the Dots with Neutron
Phil Estes
 
Docker Networking Deep Dive
Docker, Inc.
 
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
Guillaume Morini
 
Docker for Ops: Docker Networking Deep Dive, Considerations and Troubleshooti...
Docker, Inc.
 
Docker 101
Lâm Đào
 
Demystifying docker networking black magic - Lorenzo Fontana, Kiratech
Codemotion Tel Aviv
 
Magnum Networking Update
Daneyon Hansen
 
Docker Networking: Control plane and Data plane
Docker, Inc.
 
Overlay/Underlay - Betting on Container Networking
Lee Calcote
 
Demystfying container-networking
Balasundaram Natarajan
 
Docker 1.11 Meetup: Networking Showcase
Docker, Inc.
 
Docker Meetup: Docker Networking 1.11 with Madhu Venugopal
Docker, Inc.
 
Ad

More from Neependra Khare (9)

PDF
002 a solooverviewjul2020-ceposta
Neependra Khare
 
PPTX
Service Discovery with Consul - Arunvel Arunachalam
Neependra Khare
 
PDF
User authentication and authorizarion in Kubernetes
Neependra Khare
 
PDF
Containarized Gluster Storage in Kubernetes
Neependra Khare
 
PPTX
Securing modern infrastructure
Neependra Khare
 
PDF
DevOps India Days' 17 Keynote
Neependra Khare
 
PDF
CNCF Projects Overview
Neependra Khare
 
PDF
Project Moby
Neependra Khare
 
ODP
Performance characterization in large distributed file system with gluster fs
Neependra Khare
 
002 a solooverviewjul2020-ceposta
Neependra Khare
 
Service Discovery with Consul - Arunvel Arunachalam
Neependra Khare
 
User authentication and authorizarion in Kubernetes
Neependra Khare
 
Containarized Gluster Storage in Kubernetes
Neependra Khare
 
Securing modern infrastructure
Neependra Khare
 
DevOps India Days' 17 Keynote
Neependra Khare
 
CNCF Projects Overview
Neependra Khare
 
Project Moby
Neependra Khare
 
Performance characterization in large distributed file system with gluster fs
Neependra Khare
 
Ad

Recently uploaded (20)

PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
July Patch Tuesday
Ivanti
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 

Docker Networking (Libnetwork) - Lakshman Kumar

  • 2. Agenda • Docker networking with bridge • libnetwork overview • libnetwork goals • libnetwork components • libnetwork deployments • Demo
  • 3. Docker with linux bridge • On startup Docker creates a Ethernet Bridge docker0 on the Linux Kernel • docker0 creates a virtual subnet on the Docker host • Docker creates a pair of virtual Ethernet interface on each container • One of the Ethernet interface is the eth0 in the container • Another Ethernet interface will have a unique name in the form of veth* (e.g.vethxxxx) and is bind to docker0 • So linux bridge do a simple MAC level forwarding and its independent protocol  without libnetwork networking handled by Docker Engine and libcontainer •Docker Engine was responsible for providing the configuration for the container's networking stack. •Libcontainer would then use this information to create the necessary networking devices
  • 5. libnetwork overview • Modularize the networking logic in Docker Engine and libcontainer into a single, reusable library • "libnetwork" is a library that can provide native support for Docker container and its function is to connect containers. • Got open sourced in April • libnetwork experimental in Docker 1.7 • Library for creating and managing network stacks for containers • driver-based networking implements the container network model
  • 6. Goals of libnetwork •Make network and service as top class object - controller.NewNetwork() •Provide a pluggable network stack •span network across multiple hosts (using overlay taking b/w containers in different host)
  • 8. Components of Container network model Endpoint An Endpoint joins a Sandbox to a Network. An implementation of an Endpoint could be a veth pair, an Open vSwitch internal port or similar. An Endpoint can belong to only one network but may only belong to one Sandbox. SandBox A Sandbox contains the configuration of a container's network stack. This includes management of the container's interfaces, routing table and DNS settings. An implementation of a Sandbox could be a Linux Network Namespace. A Sandbox may contain many endpoints from multiple networks. Network A Network is a group of Endpoints that are able to communicate with each-other directly. An implementation of a Network could be a Linux bridge, a VLAN, etc. Networks consist of many endpoints. Cluster
  • 9. CNM Objects • NetworkController object provides the entry-point into libnetwork that exposes simple APIs for the users (such as Docker Engine) to allocate and manage Networks. libnetwork supports multiple active drivers (both inbuilt and remote). NetworkController allows user to bind a particular driver to a given network. • libnetwork provides a RESTful API to perform CRUD on network and endpoints • Endpoint represents a Service Endpoint. It provides the connectivity for services exposed by a container in a network with other services provided by other containers in the network. • Sandbox object represents container's network configuration such as ip-address, mac-address, routes, DNS entries. - Sandbox object is created when the user requests to create an endpoint on a network.
  • 10. Drivers •Drivers implement the driver API •drivers provides the actual implementation that makes network work. •Bridge driver - created a linux bridge for each network - creates veth pair for each endpoint - one end is attached to the bridge the other appears as etho inside the container - iptables rules created for NAT •Overlay driver
  • 11. References Libnetwork overview: https://github.com/docker/libnetwork Libnetwork configuration: https://github.com/docker/libnetwork/tree/master/docs https://www.youtube.com/watch?v=LNUhVfufjZw