SlideShare a Scribd company logo
1 of 21
Download to read offline
Designing scalable
Docker Networks
[March 15 2016]
[ Murat Mukhtarov ]
Zendesk
Contents
2
● Linux network namespaces
○ Introduction
○ Binding interface to namespace
● Docker networking
○ Namespaces
○ Inbound and Outbound traffic flows
○ Clustered environments
○ Challenges
● VXLAN
○ Introduction
○ VXLAN signalling
○ VXLAN and Docker
● BGP
○ Routing VXLAN with BGP
○ Scaling VXLAN based Docker networks with BGP
○ PoC
● What wasn’t covered in this presentation
Linux network namespaces
3
Network namespaces is a part of containerization
technology that used by Linux kernel
Network namespaces allows:
○ To create linux container network isolation
instances (namespaces)
○ With own routing table, virtual interfaces, L2
isolation
● The tool that is used to operate with network ns:
iproute2
● Network namespaces are stored in
○ /var/run/netns
● There two types of network namespaces:
○ Root namespace [ ip link ]
○ Non-root namespace [ ip netns .. ip link ]
Bind interface to network namespace
4
Change namespace for eth0-NAMESPACE1 from Root to NAMESPACE1
When network namespace is created it has only one interface Loopback:
We can create a pair of peered ip links in the root namespace:
Bringing namespaced interface UP
5
After bringing UP veth part of the pipe, interface inside NAMESPACE1 also becomes UP
We can rename interface inside namespace and try to bring it UP
Finally assign ip address on eth0 interface inside NAMESPACE1
Docker and network namespaces
6
Docker supports different format of containerisation:
● Libcontainer - own native go-lang implementation to use kernel containerisation
capabilities. Default (since 0.9)
● LXC was default before 0.9
Hence docker uses libcontainer every container that created with network namespace
would not be seen in ip netns output
However it is possible to expose it if you now docker container process pid:
PID=$(docker inspect -f '{{.State.Pid}}' $container_id)
ln -s /proc/$PID/ns/net /var/run/netns/$PID
Instead of PID you can use any name, container_id for example
Docker networking: introduction
7
Docker does for you:
- ip link pair: vethXXXXXX <-> eth0 inside the
container’s namespace
- Adds to docker0 (by default) bridge a vethXXXXX
interface (which is tunnel-end in Root namespaces).
- Sets up ip address from docker0 network range.
- Creates a rule in iptables that will organize for you
NAT (PAT) translation, masquerading containers’
network behind default eth0 interface
Docker networking: exposing ports
8
Docker can expose internal ports and even
interfaces:
- Network type: host. No network namespaces
isolation, root namespace will be used
- Supply port numbers to be exposed: iptables
rules would be created to allow given port(s)
number and create a port mapping (port
translation) rule.
Docker networking:
Clustered environments
9
Now docker offers multi host networking using Docker Swarm, KV store to signal
Network and Clustering using Docker Swarm. Overlay transport Requires Linux
Kernel version > 3.17
Current challenges
10
KV store approach is a great way to interconnect different docker-runnings nodes
for Docker only environments. But it still has scalability limitations for WAN, Multi-
Datacenters and not only Docker scenarios.
- Modern service-oriented applications consists of multiple processes. Sometimes
platform can be described as 30-40 applications, which would be great to
containerise
- Old networking child issues could return - broadcast domain problems,
segmentation and etc.
- Docker offers VXLAN support which allows you to scale to certain extent.
However how to distribute knowledge about VXLAN database for non-Docker
networks ?
VXLAN introduction
11
VXLAN overlay networking technology that allows to send Ethernet traffic encapsulated into UDP datagrams
over IP/GRE networks. Detailed description of VXLAN networking could be found in RFC7348
24 bit VNI field is VXLAN address field that could be
compared with 802.1q tag for Ethernet frames or MPLS
label.
Bare in mind MTU value when using VXLAN
VXLAN signalling
12
VXLAN network should be properly signalled otherwise participating hosts would not know about existence
of each other. In terms of signalling this particular information should be advertised:
- VXLAN Tunnel End-Point (VTEP) - identifies EndPoint, an entity that organizes and terminates VXLAN
tunnels
- VXLAN Network Identifier (VNI) - identifies the network, similar to 802.1q tag or MPLS label
- IP and MAC addresses
Ways of signalling VXLAN:
- Unicast way - dedicated controller
- Multicast way - using PIM and VNI:VTEP pairs
propagated as Multicast routes
- Docker has implementation with KV store
- OpenContrail can use XMPP
- BGP
VXLAN signalling with BGP: EVPN
13
Using BGP protocol to carry VXLAN and MAC/IP information is described at following RFCs:
- http://tools.ietf.org/html/rfc7432
- https://tools.ietf.org/html/draft-ietf-bess-evpn-overlay-02
- https://tools.ietf.org/html/rfc4684
BGP protocol is designed to be highly extensible and that is why it is possible to use NLRI
to carry other information than IPv4/IPv6 routes.
For EVPN following Address families were allocated:
● AFI 25 - which matches to L2VPN networks signalling over BGP (Kompella approach)
● SAFI 70 - subaddress family for EVPN (VXLAN)
Basicly VXLAN information is carried as BGP routes.
VXLAN and Docker
14
To create multi-tenant Docker networks with advanced isolation we can use VXLAN in the
following way:
- Create a dedicated interface that has type vxlan
- Create a bridge interface where we can stitch together vxlan interface and Root
namespace leg of container interface
- Create a forwarding table entry
bridge fdb add to 00:17:42:8a:b4:05 dst 192.19.0.2 dev vxlan0
- It would be signalled using multicast address 239.1.1.1 on port 4789 (mutlicast should be
supported)
OR
- Configure KV store parameters as daemon arguments and create overlay network
- docker network create --driver overlay my-multi-host-network
Docker and VXLAN traffic flow
15
Docker with EVPN and BGP
16
To achieve highly scalable network for Docker we can use:
- VXLAN as a forwarding plane to carry network traffic and isolate different
container groups and hosts
- Signal VXLAN using BGP to manage large Multi-datacenter networks
- CNI plugin to bring EVPN tunnels up automatically (Kubernetes)
Python written BGP implementation for VXLAN and BGP: bagpipe-BGP, code based
on ExaBGP
https://github.com/Orange-OpenSource/bagpipe-bgp
Go BGP implementation - GoBGP - Route Reflector https://github.com/osrg/gobgp
Stitching together Docker, BGP and VXLAN
17
18
Proof of concept:
Docker + VXLAN + BGP
DEMO
19
Description:
- 4 virtual machines: 3 - bagpipe-bgp and 1 goBGP route reflector
- Dockerbgp1, Dockerbgp2 and Dockerbgp3 establish BGP session to
goBGP RR: 192.168.33.30
- dockerbgp1: 192.168.33.10, runninng web server
- dckerbgp2: 192.168.33.20, running curl
- dockerbgp3: 192.168.33.30, just busybox for ping test
EVPN network: 192.168.10.0/24
IP network for hosts: 192.168.33.0/24
What we did not cover
20
- Another BGP project for Docker and Kubernetes IP networking:
https://www.projectcalico.org/why-bgp/
- CNI the Container Network Interface, is a proposed standard for
configuring network interfaces for Linux application containers.
https://github.com/appc/cni
- IP VPN networks using Bagpipe BGP and Open vSwitch
Q&A
mmukhtarov@zendesk.com
Links:
GoBGP project and EVPN: https://github.
com/osrg/gobgp/blob/master/docs/sources/evpn.md
BagPipe BGP:
https://github.com/Orange-OpenSource/bagpipe-bgp
BagPipe BGP Docker image:
https://hub.docker.com/r/yoshima/bagpipe-bgp/
VXLAN:
https://tools.ietf.org/html/rfc7348
EVPN:
https://tools.ietf.org/html/draft-ietf-bess-evpn-overlay-02
https://tools.ietf.org/html/rfc7432

More Related Content

What's hot

How VXLAN works on Linux
How VXLAN works on LinuxHow VXLAN works on Linux
How VXLAN works on LinuxEtsuji Nakai
 
Pipework: Software-Defined Network for Containers and Docker
Pipework: Software-Defined Network for Containers and DockerPipework: Software-Defined Network for Containers and Docker
Pipework: Software-Defined Network for Containers and DockerJérôme Petazzoni
 
Single Host Docker Networking
Single Host Docker NetworkingSingle Host Docker Networking
Single Host Docker Networkingallingeek
 
Docker networking basics & coupling with Software Defined Networks
Docker networking basics & coupling with Software Defined NetworksDocker networking basics & coupling with Software Defined Networks
Docker networking basics & coupling with Software Defined NetworksAdrien Blind
 
Container Network Interface: Network Plugins for Kubernetes and beyond
Container Network Interface: Network Plugins for Kubernetes and beyondContainer Network Interface: Network Plugins for Kubernetes and beyond
Container Network Interface: Network Plugins for Kubernetes and beyondKubeAcademy
 
Docker Online Meetup #29: Docker Networking is Now GA
Docker Online Meetup #29: Docker Networking is Now GA Docker Online Meetup #29: Docker Networking is Now GA
Docker Online Meetup #29: Docker Networking is Now GA Docker, Inc.
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchTe-Yen Liu
 
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu VenugopalDocker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu VenugopalMichelle Antebi
 
Application-Based Routing
Application-Based RoutingApplication-Based Routing
Application-Based RoutingHungWei Chiu
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking OverviewSreenivas Makam
 
Microservices Network Architecture 101
Microservices Network Architecture 101Microservices Network Architecture 101
Microservices Network Architecture 101Cumulus Networks
 
Docker summit : Docker Networking Control-plane & Data-Plane
Docker summit : Docker Networking Control-plane & Data-PlaneDocker summit : Docker Networking Control-plane & Data-Plane
Docker summit : Docker Networking Control-plane & Data-PlaneMadhu Venugopal
 
Kubernetes networking: Introduction to overlay networks, communication models...
Kubernetes networking: Introduction to overlay networks, communication models...Kubernetes networking: Introduction to overlay networks, communication models...
Kubernetes networking: Introduction to overlay networks, communication models...Murat Mukhtarov
 
Kubernetes networking in AWS
Kubernetes networking in AWSKubernetes networking in AWS
Kubernetes networking in AWSZvika Gazit
 
Virtualized network with openvswitch
Virtualized network with openvswitchVirtualized network with openvswitch
Virtualized network with openvswitchSim Janghoon
 
Writing the Container Network Interface(CNI) plugin in golang
Writing the Container Network Interface(CNI) plugin in golangWriting the Container Network Interface(CNI) plugin in golang
Writing the Container Network Interface(CNI) plugin in golangHungWei Chiu
 
Cilium - BPF & XDP for containers
 Cilium - BPF & XDP for containers Cilium - BPF & XDP for containers
Cilium - BPF & XDP for containersDocker, Inc.
 

What's hot (20)

How VXLAN works on Linux
How VXLAN works on LinuxHow VXLAN works on Linux
How VXLAN works on Linux
 
Pipework: Software-Defined Network for Containers and Docker
Pipework: Software-Defined Network for Containers and DockerPipework: Software-Defined Network for Containers and Docker
Pipework: Software-Defined Network for Containers and Docker
 
Docker networking
Docker networkingDocker networking
Docker networking
 
Single Host Docker Networking
Single Host Docker NetworkingSingle Host Docker Networking
Single Host Docker Networking
 
Docker networking
Docker networkingDocker networking
Docker networking
 
Docker networking basics & coupling with Software Defined Networks
Docker networking basics & coupling with Software Defined NetworksDocker networking basics & coupling with Software Defined Networks
Docker networking basics & coupling with Software Defined Networks
 
Container Network Interface: Network Plugins for Kubernetes and beyond
Container Network Interface: Network Plugins for Kubernetes and beyondContainer Network Interface: Network Plugins for Kubernetes and beyond
Container Network Interface: Network Plugins for Kubernetes and beyond
 
Docker Online Meetup #29: Docker Networking is Now GA
Docker Online Meetup #29: Docker Networking is Now GA Docker Online Meetup #29: Docker Networking is Now GA
Docker Online Meetup #29: Docker Networking is Now GA
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitch
 
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu VenugopalDocker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
 
Application-Based Routing
Application-Based RoutingApplication-Based Routing
Application-Based Routing
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking Overview
 
Microservices Network Architecture 101
Microservices Network Architecture 101Microservices Network Architecture 101
Microservices Network Architecture 101
 
Docker summit : Docker Networking Control-plane & Data-Plane
Docker summit : Docker Networking Control-plane & Data-PlaneDocker summit : Docker Networking Control-plane & Data-Plane
Docker summit : Docker Networking Control-plane & Data-Plane
 
Kubernetes networking: Introduction to overlay networks, communication models...
Kubernetes networking: Introduction to overlay networks, communication models...Kubernetes networking: Introduction to overlay networks, communication models...
Kubernetes networking: Introduction to overlay networks, communication models...
 
macvlan and ipvlan
macvlan and ipvlanmacvlan and ipvlan
macvlan and ipvlan
 
Kubernetes networking in AWS
Kubernetes networking in AWSKubernetes networking in AWS
Kubernetes networking in AWS
 
Virtualized network with openvswitch
Virtualized network with openvswitchVirtualized network with openvswitch
Virtualized network with openvswitch
 
Writing the Container Network Interface(CNI) plugin in golang
Writing the Container Network Interface(CNI) plugin in golangWriting the Container Network Interface(CNI) plugin in golang
Writing the Container Network Interface(CNI) plugin in golang
 
Cilium - BPF & XDP for containers
 Cilium - BPF & XDP for containers Cilium - BPF & XDP for containers
Cilium - BPF & XDP for containers
 

Similar to Designing scalable Docker networks

Docker Meetup: Docker Networking 1.11 with Madhu Venugopal
Docker Meetup: Docker Networking 1.11 with Madhu VenugopalDocker Meetup: Docker Networking 1.11 with Madhu Venugopal
Docker Meetup: Docker Networking 1.11 with Madhu VenugopalDocker, Inc.
 
Docker 1.11 Meetup: Networking Showcase
Docker 1.11 Meetup: Networking ShowcaseDocker 1.11 Meetup: Networking Showcase
Docker 1.11 Meetup: Networking ShowcaseDocker, Inc.
 
Managing multicast/igmp stream on Docker
Managing multicast/igmp stream on DockerManaging multicast/igmp stream on Docker
Managing multicast/igmp stream on DockerThierry Gayet
 
AusNOG 2014 - Network Virtualisation: The Killer App for IPv6?
AusNOG 2014 - Network Virtualisation: The Killer App for IPv6?AusNOG 2014 - Network Virtualisation: The Killer App for IPv6?
AusNOG 2014 - Network Virtualisation: The Killer App for IPv6?Mark Smith
 
Docker meetup
Docker meetupDocker meetup
Docker meetupsyed1
 
Octo talk : docker multi-host networking
Octo talk : docker multi-host networking Octo talk : docker multi-host networking
Octo talk : docker multi-host networking Hervé Leclerc
 
Building a sdn solution for the deployment of web application stacks in docker
Building a sdn solution for the deployment of web application stacks in dockerBuilding a sdn solution for the deployment of web application stacks in docker
Building a sdn solution for the deployment of web application stacks in dockerJorge Juan Mendoza
 
VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話upaa
 
Osnug meetup-tungsten fabric - overview.pptx
Osnug meetup-tungsten fabric - overview.pptxOsnug meetup-tungsten fabric - overview.pptx
Osnug meetup-tungsten fabric - overview.pptxM.Qasim Arham
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksLaurent Bernaille
 
Network Design patters with Docker
Network Design patters with DockerNetwork Design patters with Docker
Network Design patters with DockerDaniel Finneran
 
Meetup docker using software defined networks
Meetup docker   using software defined networksMeetup docker   using software defined networks
Meetup docker using software defined networksOCTO Technology
 
Container network security
Container network securityContainer network security
Container network securityDaisuke Nakajima
 
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking ShapeBlue
 
Interconnecting Neutron and Network Operators' BGP VPNs
Interconnecting Neutron and Network Operators' BGP VPNsInterconnecting Neutron and Network Operators' BGP VPNs
Interconnecting Neutron and Network Operators' BGP VPNsThomas Morin
 
OpenNebulaConf 2016 - Networking, NFVs and SDNs Hands-on Workshop by Rubén S....
OpenNebulaConf 2016 - Networking, NFVs and SDNs Hands-on Workshop by Rubén S....OpenNebulaConf 2016 - Networking, NFVs and SDNs Hands-on Workshop by Rubén S....
OpenNebulaConf 2016 - Networking, NFVs and SDNs Hands-on Workshop by Rubén S....OpenNebula Project
 
OpenStack Tokyo 2015: Connecting the Dots with Neutron
OpenStack Tokyo 2015: Connecting the Dots with NeutronOpenStack Tokyo 2015: Connecting the Dots with Neutron
OpenStack Tokyo 2015: Connecting the Dots with NeutronPhil Estes
 
Conatiner Networking with MidoNet
Conatiner Networking with MidoNetConatiner Networking with MidoNet
Conatiner Networking with MidoNetMidokuraUSA
 
How to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratchHow to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratchAll Things Open
 

Similar to Designing scalable Docker networks (20)

Docker Meetup: Docker Networking 1.11 with Madhu Venugopal
Docker Meetup: Docker Networking 1.11 with Madhu VenugopalDocker Meetup: Docker Networking 1.11 with Madhu Venugopal
Docker Meetup: Docker Networking 1.11 with Madhu Venugopal
 
Docker 1.11 Meetup: Networking Showcase
Docker 1.11 Meetup: Networking ShowcaseDocker 1.11 Meetup: Networking Showcase
Docker 1.11 Meetup: Networking Showcase
 
Managing multicast/igmp stream on Docker
Managing multicast/igmp stream on DockerManaging multicast/igmp stream on Docker
Managing multicast/igmp stream on Docker
 
AusNOG 2014 - Network Virtualisation: The Killer App for IPv6?
AusNOG 2014 - Network Virtualisation: The Killer App for IPv6?AusNOG 2014 - Network Virtualisation: The Killer App for IPv6?
AusNOG 2014 - Network Virtualisation: The Killer App for IPv6?
 
Docker meetup
Docker meetupDocker meetup
Docker meetup
 
Octo talk : docker multi-host networking
Octo talk : docker multi-host networking Octo talk : docker multi-host networking
Octo talk : docker multi-host networking
 
Building a sdn solution for the deployment of web application stacks in docker
Building a sdn solution for the deployment of web application stacks in dockerBuilding a sdn solution for the deployment of web application stacks in docker
Building a sdn solution for the deployment of web application stacks in docker
 
VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話
 
Osnug meetup-tungsten fabric - overview.pptx
Osnug meetup-tungsten fabric - overview.pptxOsnug meetup-tungsten fabric - overview.pptx
Osnug meetup-tungsten fabric - overview.pptx
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay Networks
 
Network Design patters with Docker
Network Design patters with DockerNetwork Design patters with Docker
Network Design patters with Docker
 
Networking in Openstack - Neutron 101
Networking in Openstack - Neutron 101Networking in Openstack - Neutron 101
Networking in Openstack - Neutron 101
 
Meetup docker using software defined networks
Meetup docker   using software defined networksMeetup docker   using software defined networks
Meetup docker using software defined networks
 
Container network security
Container network securityContainer network security
Container network security
 
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
 
Interconnecting Neutron and Network Operators' BGP VPNs
Interconnecting Neutron and Network Operators' BGP VPNsInterconnecting Neutron and Network Operators' BGP VPNs
Interconnecting Neutron and Network Operators' BGP VPNs
 
OpenNebulaConf 2016 - Networking, NFVs and SDNs Hands-on Workshop by Rubén S....
OpenNebulaConf 2016 - Networking, NFVs and SDNs Hands-on Workshop by Rubén S....OpenNebulaConf 2016 - Networking, NFVs and SDNs Hands-on Workshop by Rubén S....
OpenNebulaConf 2016 - Networking, NFVs and SDNs Hands-on Workshop by Rubén S....
 
OpenStack Tokyo 2015: Connecting the Dots with Neutron
OpenStack Tokyo 2015: Connecting the Dots with NeutronOpenStack Tokyo 2015: Connecting the Dots with Neutron
OpenStack Tokyo 2015: Connecting the Dots with Neutron
 
Conatiner Networking with MidoNet
Conatiner Networking with MidoNetConatiner Networking with MidoNet
Conatiner Networking with MidoNet
 
How to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratchHow to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratch
 

Recently uploaded

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Designing scalable Docker networks

  • 1. Designing scalable Docker Networks [March 15 2016] [ Murat Mukhtarov ] Zendesk
  • 2. Contents 2 ● Linux network namespaces ○ Introduction ○ Binding interface to namespace ● Docker networking ○ Namespaces ○ Inbound and Outbound traffic flows ○ Clustered environments ○ Challenges ● VXLAN ○ Introduction ○ VXLAN signalling ○ VXLAN and Docker ● BGP ○ Routing VXLAN with BGP ○ Scaling VXLAN based Docker networks with BGP ○ PoC ● What wasn’t covered in this presentation
  • 3. Linux network namespaces 3 Network namespaces is a part of containerization technology that used by Linux kernel Network namespaces allows: ○ To create linux container network isolation instances (namespaces) ○ With own routing table, virtual interfaces, L2 isolation ● The tool that is used to operate with network ns: iproute2 ● Network namespaces are stored in ○ /var/run/netns ● There two types of network namespaces: ○ Root namespace [ ip link ] ○ Non-root namespace [ ip netns .. ip link ]
  • 4. Bind interface to network namespace 4 Change namespace for eth0-NAMESPACE1 from Root to NAMESPACE1 When network namespace is created it has only one interface Loopback: We can create a pair of peered ip links in the root namespace:
  • 5. Bringing namespaced interface UP 5 After bringing UP veth part of the pipe, interface inside NAMESPACE1 also becomes UP We can rename interface inside namespace and try to bring it UP Finally assign ip address on eth0 interface inside NAMESPACE1
  • 6. Docker and network namespaces 6 Docker supports different format of containerisation: ● Libcontainer - own native go-lang implementation to use kernel containerisation capabilities. Default (since 0.9) ● LXC was default before 0.9 Hence docker uses libcontainer every container that created with network namespace would not be seen in ip netns output However it is possible to expose it if you now docker container process pid: PID=$(docker inspect -f '{{.State.Pid}}' $container_id) ln -s /proc/$PID/ns/net /var/run/netns/$PID Instead of PID you can use any name, container_id for example
  • 7. Docker networking: introduction 7 Docker does for you: - ip link pair: vethXXXXXX <-> eth0 inside the container’s namespace - Adds to docker0 (by default) bridge a vethXXXXX interface (which is tunnel-end in Root namespaces). - Sets up ip address from docker0 network range. - Creates a rule in iptables that will organize for you NAT (PAT) translation, masquerading containers’ network behind default eth0 interface
  • 8. Docker networking: exposing ports 8 Docker can expose internal ports and even interfaces: - Network type: host. No network namespaces isolation, root namespace will be used - Supply port numbers to be exposed: iptables rules would be created to allow given port(s) number and create a port mapping (port translation) rule.
  • 9. Docker networking: Clustered environments 9 Now docker offers multi host networking using Docker Swarm, KV store to signal Network and Clustering using Docker Swarm. Overlay transport Requires Linux Kernel version > 3.17
  • 10. Current challenges 10 KV store approach is a great way to interconnect different docker-runnings nodes for Docker only environments. But it still has scalability limitations for WAN, Multi- Datacenters and not only Docker scenarios. - Modern service-oriented applications consists of multiple processes. Sometimes platform can be described as 30-40 applications, which would be great to containerise - Old networking child issues could return - broadcast domain problems, segmentation and etc. - Docker offers VXLAN support which allows you to scale to certain extent. However how to distribute knowledge about VXLAN database for non-Docker networks ?
  • 11. VXLAN introduction 11 VXLAN overlay networking technology that allows to send Ethernet traffic encapsulated into UDP datagrams over IP/GRE networks. Detailed description of VXLAN networking could be found in RFC7348 24 bit VNI field is VXLAN address field that could be compared with 802.1q tag for Ethernet frames or MPLS label. Bare in mind MTU value when using VXLAN
  • 12. VXLAN signalling 12 VXLAN network should be properly signalled otherwise participating hosts would not know about existence of each other. In terms of signalling this particular information should be advertised: - VXLAN Tunnel End-Point (VTEP) - identifies EndPoint, an entity that organizes and terminates VXLAN tunnels - VXLAN Network Identifier (VNI) - identifies the network, similar to 802.1q tag or MPLS label - IP and MAC addresses Ways of signalling VXLAN: - Unicast way - dedicated controller - Multicast way - using PIM and VNI:VTEP pairs propagated as Multicast routes - Docker has implementation with KV store - OpenContrail can use XMPP - BGP
  • 13. VXLAN signalling with BGP: EVPN 13 Using BGP protocol to carry VXLAN and MAC/IP information is described at following RFCs: - http://tools.ietf.org/html/rfc7432 - https://tools.ietf.org/html/draft-ietf-bess-evpn-overlay-02 - https://tools.ietf.org/html/rfc4684 BGP protocol is designed to be highly extensible and that is why it is possible to use NLRI to carry other information than IPv4/IPv6 routes. For EVPN following Address families were allocated: ● AFI 25 - which matches to L2VPN networks signalling over BGP (Kompella approach) ● SAFI 70 - subaddress family for EVPN (VXLAN) Basicly VXLAN information is carried as BGP routes.
  • 14. VXLAN and Docker 14 To create multi-tenant Docker networks with advanced isolation we can use VXLAN in the following way: - Create a dedicated interface that has type vxlan - Create a bridge interface where we can stitch together vxlan interface and Root namespace leg of container interface - Create a forwarding table entry bridge fdb add to 00:17:42:8a:b4:05 dst 192.19.0.2 dev vxlan0 - It would be signalled using multicast address 239.1.1.1 on port 4789 (mutlicast should be supported) OR - Configure KV store parameters as daemon arguments and create overlay network - docker network create --driver overlay my-multi-host-network
  • 15. Docker and VXLAN traffic flow 15
  • 16. Docker with EVPN and BGP 16 To achieve highly scalable network for Docker we can use: - VXLAN as a forwarding plane to carry network traffic and isolate different container groups and hosts - Signal VXLAN using BGP to manage large Multi-datacenter networks - CNI plugin to bring EVPN tunnels up automatically (Kubernetes) Python written BGP implementation for VXLAN and BGP: bagpipe-BGP, code based on ExaBGP https://github.com/Orange-OpenSource/bagpipe-bgp Go BGP implementation - GoBGP - Route Reflector https://github.com/osrg/gobgp
  • 17. Stitching together Docker, BGP and VXLAN 17
  • 19. DEMO 19 Description: - 4 virtual machines: 3 - bagpipe-bgp and 1 goBGP route reflector - Dockerbgp1, Dockerbgp2 and Dockerbgp3 establish BGP session to goBGP RR: 192.168.33.30 - dockerbgp1: 192.168.33.10, runninng web server - dckerbgp2: 192.168.33.20, running curl - dockerbgp3: 192.168.33.30, just busybox for ping test EVPN network: 192.168.10.0/24 IP network for hosts: 192.168.33.0/24
  • 20. What we did not cover 20 - Another BGP project for Docker and Kubernetes IP networking: https://www.projectcalico.org/why-bgp/ - CNI the Container Network Interface, is a proposed standard for configuring network interfaces for Linux application containers. https://github.com/appc/cni - IP VPN networks using Bagpipe BGP and Open vSwitch
  • 21. Q&A mmukhtarov@zendesk.com Links: GoBGP project and EVPN: https://github. com/osrg/gobgp/blob/master/docs/sources/evpn.md BagPipe BGP: https://github.com/Orange-OpenSource/bagpipe-bgp BagPipe BGP Docker image: https://hub.docker.com/r/yoshima/bagpipe-bgp/ VXLAN: https://tools.ietf.org/html/rfc7348 EVPN: https://tools.ietf.org/html/draft-ietf-bess-evpn-overlay-02 https://tools.ietf.org/html/rfc7432