SlideShare a Scribd company logo
1 of 17
Verona Docker Meetup 26/10/2016
Understanding Docker
Networking
Lorenzo Fontana
DevOps at Kiratech
@fntlnz
Null Network
Null Network
Network switch
eth0: 192.168.1.100
C1
lo
127.0.0.1
C3
docker0: 172.17.0.1
C2
lo
127.0.0.1
lo
127.0.0.1
$ docker run -it --network= none alpine sh
Host Network
Host Network
$ docker run -it --network= host alpine sh
Bridge Network
Bridge Network - docker0
Network switch
eth0: 192.168.1.100
veth2f54929
iptables NAT/port mapping
C1
eth0
172.17.0.2
C3
eth0
172.17.0.4
vethfd281a2
docker0: 172.17.0.1
C2
eth0
172.17.0.3
veth7c6c00b
$ docker run -it alpine sh
Custom Bridge Network
Custom Bridge Network - mybridge
Network switch
eth0: 192.168.1.100
veth439b754
iptables NAT/port mapping
C1
eth0
172.20.0.2
C3
eth0
172.20.0.4
vethd87c43d
mybridge: 172.20.0.1
C2
eth0
172.20.0.3
veth8f2c1d7
$ docker network create -d bridge -o com.docker.network.bridge.name=mybridge mybridge
$ docker run -it --net mybridge alpine sh
Custom Bridge Network
IPAM underlay
Custom Bridge Network IPAM underlay - myunderbr
Network switch
gateway 192.168.10.254
eth0: 192.168.10.10
veth029cee0
C1
eth0
192.168.10.90
C3
eth0
192.168.10.92
vethf583d4b
myunderbr: 192.168.10.254
C2
eth0
192.168.10.91
veth0eedd9d
$ docker network create -d bridge --subnet=192.168.10.0/24 --gateway=192.168.10.254 
--aux-address DefaultGatewayIPv4=192.168.10.1 -o com.docker.network.bridge.name=myunderbr myunderbr
$ brctl addif myunderbr enp5s0
$ docker run -it --net myunderbr alpine sh
$ docker run -it --net myunderbr --ip 192.168.10.90 nginx:1.9
Overlay Network
Overlay network - myoverlay
Network switch
eth0: 192.168.1.100
iptables NAT/port mapping
docker_gwbridge: 172.18.0.1
C1
eth1
172.18.0.3
vetha193f81
eth0
10.0.0.3
C2
eth1
172.18.0.4
vethee8511c
eth0
10.0.0.4
C3
eth1
172.18.0.5
veth89bbbe5
eth0
10.0.0.5
myoverlay - VNI 100
eth0: 192.168.1.110
iptables NAT/port mapping
docker_gwbridge: 172.18.0.1
C1
eth1
172.18.0.3
veth62e4b94
eth0
10.0.0.6
C2
eth1
172.18.0.4
veth4e85bca
eth0
10.0.0.7
C3
eth1
172.18.0.5
veth343fe37
eth0
10.0.0.8
myoverlay - VNI 100
eth0: 192.168.1.120
iptables NAT/port mapping
docker_gwbridge: 172.18.0.1
C1
eth1
172.18.0.3
veth218d196
eth0
10.0.0.9
C2
eth1
172.18.0.4
veth09fe1d8
eth0
10.0.0.10
C3
eth1
172.18.0.5
veth4000548
eth0
10.0.0.11
myoverlay - VNI 100
$ docker network create -d overlay myoverlay
$ docker service create --network myoverlay nginx
Overlay network
VXLAN tunnel
veth veth
VTEP VTEP
10.0.0.5 10.0.0.6
192.168.1.100 192.168.1.200
Macvlan & Ipvlan
Macvlan & Ipvlan
Network switch (gateway 172.16.1.1)
eth0: 172.16.1.253 (IP optional)
C1
eth0
172.16.1.10
C3C2
eth0
172.16.1.11
eth0
172.16.1.12
eth0: 172.16.1.254 (IP optional)
C4
eth0
172.16.1.13
C6C5
eth0
172.16.1.14
eth0
172.16.1.15

More Related Content

What's hot

What's hot (20)

Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking Overview
 
Docker introduction & benefits
Docker introduction & benefitsDocker introduction & benefits
Docker introduction & benefits
 
From Zero to Docker
From Zero to DockerFrom Zero to Docker
From Zero to Docker
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and Containers
 
Docker intro
Docker introDocker intro
Docker intro
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
Docker Swarm for Beginner
Docker Swarm for BeginnerDocker Swarm for Beginner
Docker Swarm for Beginner
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
Intro docker
Intro dockerIntro docker
Intro docker
 
Introduction To Docker
Introduction To  DockerIntroduction To  Docker
Introduction To Docker
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
Virtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management servicesVirtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management services
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes
KubernetesKubernetes
Kubernetes
 

Viewers also liked

Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak
 

Viewers also liked (20)

georchestra SDI: Project Status Report
georchestra SDI: Project Status Reportgeorchestra SDI: Project Status Report
georchestra SDI: Project Status Report
 
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinDeploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
 
moscmy2016: Extending Docker
moscmy2016: Extending Dockermoscmy2016: Extending Docker
moscmy2016: Extending Docker
 
Introduction to Docker - Learning containerization XP conference 2016
Introduction to Docker - Learning containerization  XP conference 2016Introduction to Docker - Learning containerization  XP conference 2016
Introduction to Docker - Learning containerization XP conference 2016
 
Using docker to develop NAS applications
Using docker to develop NAS applicationsUsing docker to develop NAS applications
Using docker to develop NAS applications
 
Containers for sensor web services, applications and research @ Sensor Web Co...
Containers for sensor web services, applications and research @ Sensor Web Co...Containers for sensor web services, applications and research @ Sensor Web Co...
Containers for sensor web services, applications and research @ Sensor Web Co...
 
Docker for the Brave
Docker for the BraveDocker for the Brave
Docker for the Brave
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
 
Docker Dhahran Nov 2016 meetup
Docker Dhahran Nov 2016 meetupDocker Dhahran Nov 2016 meetup
Docker Dhahran Nov 2016 meetup
 
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSSCordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS
 
DevOps FTW!, Will cloud and DevOps make you sleep peacefully?
DevOps FTW!, Will cloud and DevOps make you sleep peacefully?DevOps FTW!, Will cloud and DevOps make you sleep peacefully?
DevOps FTW!, Will cloud and DevOps make you sleep peacefully?
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
 
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Advanced Docker Developer Workflows on MacOS X and Windows
Advanced Docker Developer Workflows on MacOS X and WindowsAdvanced Docker Developer Workflows on MacOS X and Windows
Advanced Docker Developer Workflows on MacOS X and Windows
 
Jelastic - DevOps for Java with Docker Containers - Madrid 2015
Jelastic - DevOps for Java with Docker Containers - Madrid 2015Jelastic - DevOps for Java with Docker Containers - Madrid 2015
Jelastic - DevOps for Java with Docker Containers - Madrid 2015
 
Docker and java
Docker and javaDocker and java
Docker and java
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]
 
Ionic framework one day training
Ionic framework one day trainingIonic framework one day training
Ionic framework one day training
 
50 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
50 EJB 3 Best Practices in 50 Minutes - JavaOne 201450 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
50 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
 

Similar to Understanding docker networking

Chris Swan ONUG Academy - Container Networks Tutorial
Chris Swan ONUG Academy - Container Networks TutorialChris Swan ONUG Academy - Container Networks Tutorial
Chris Swan ONUG Academy - Container Networks Tutorial
Cohesive Networks
 

Similar to Understanding docker networking (20)

Deep dive in Docker Overlay Networks
Deep dive in Docker Overlay NetworksDeep dive in Docker Overlay Networks
Deep dive in Docker Overlay Networks
 
Deeper Dive in Docker Overlay Networks
Deeper Dive in Docker Overlay NetworksDeeper Dive in Docker Overlay Networks
Deeper Dive in Docker Overlay Networks
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksDeep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay Networks
 
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
 
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
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay Networks
 
Octo talk : docker multi-host networking
Octo talk : docker multi-host networking Octo talk : docker multi-host networking
Octo talk : docker multi-host networking
 
Deep Dive in Docker Overlay Networks - Laurent Bernaille - Architect, D2SI
Deep Dive in Docker Overlay Networks - Laurent Bernaille - Architect, D2SIDeep Dive in Docker Overlay Networks - Laurent Bernaille - Architect, D2SI
Deep Dive in Docker Overlay Networks - Laurent Bernaille - Architect, D2SI
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan Drivers
 
Docker SDN (software-defined-networking) JUG
Docker SDN (software-defined-networking) JUGDocker SDN (software-defined-networking) JUG
Docker SDN (software-defined-networking) JUG
 
Learning kubernetes
Learning kubernetesLearning kubernetes
Learning kubernetes
 
Chris Swan ONUG Academy - Container Networks Tutorial
Chris Swan ONUG Academy - Container Networks TutorialChris Swan ONUG Academy - Container Networks Tutorial
Chris Swan ONUG Academy - Container Networks Tutorial
 
Docker networking Tutorial 101
Docker networking Tutorial 101Docker networking Tutorial 101
Docker networking Tutorial 101
 
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachJDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
 
DeveloperWeek 2015: A Practical Introduction to Docker
DeveloperWeek 2015: A Practical Introduction to DockerDeveloperWeek 2015: A Practical Introduction to Docker
DeveloperWeek 2015: A Practical Introduction to Docker
 
Docker practice
Docker practiceDocker practice
Docker practice
 
Docker Networking
Docker NetworkingDocker Networking
Docker Networking
 
Cloud RPI4 tomcat ARM64
Cloud RPI4 tomcat ARM64Cloud RPI4 tomcat ARM64
Cloud RPI4 tomcat ARM64
 
DCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker CaptainsDCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker Captains
 

Recently uploaded

Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
Health
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 

Recently uploaded (20)

Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 

Understanding docker networking

  • 1. Verona Docker Meetup 26/10/2016 Understanding Docker Networking
  • 2. Lorenzo Fontana DevOps at Kiratech @fntlnz
  • 4. Null Network Network switch eth0: 192.168.1.100 C1 lo 127.0.0.1 C3 docker0: 172.17.0.1 C2 lo 127.0.0.1 lo 127.0.0.1 $ docker run -it --network= none alpine sh
  • 6. Host Network $ docker run -it --network= host alpine sh
  • 8. Bridge Network - docker0 Network switch eth0: 192.168.1.100 veth2f54929 iptables NAT/port mapping C1 eth0 172.17.0.2 C3 eth0 172.17.0.4 vethfd281a2 docker0: 172.17.0.1 C2 eth0 172.17.0.3 veth7c6c00b $ docker run -it alpine sh
  • 10. Custom Bridge Network - mybridge Network switch eth0: 192.168.1.100 veth439b754 iptables NAT/port mapping C1 eth0 172.20.0.2 C3 eth0 172.20.0.4 vethd87c43d mybridge: 172.20.0.1 C2 eth0 172.20.0.3 veth8f2c1d7 $ docker network create -d bridge -o com.docker.network.bridge.name=mybridge mybridge $ docker run -it --net mybridge alpine sh
  • 12. Custom Bridge Network IPAM underlay - myunderbr Network switch gateway 192.168.10.254 eth0: 192.168.10.10 veth029cee0 C1 eth0 192.168.10.90 C3 eth0 192.168.10.92 vethf583d4b myunderbr: 192.168.10.254 C2 eth0 192.168.10.91 veth0eedd9d $ docker network create -d bridge --subnet=192.168.10.0/24 --gateway=192.168.10.254 --aux-address DefaultGatewayIPv4=192.168.10.1 -o com.docker.network.bridge.name=myunderbr myunderbr $ brctl addif myunderbr enp5s0 $ docker run -it --net myunderbr alpine sh $ docker run -it --net myunderbr --ip 192.168.10.90 nginx:1.9
  • 14. Overlay network - myoverlay Network switch eth0: 192.168.1.100 iptables NAT/port mapping docker_gwbridge: 172.18.0.1 C1 eth1 172.18.0.3 vetha193f81 eth0 10.0.0.3 C2 eth1 172.18.0.4 vethee8511c eth0 10.0.0.4 C3 eth1 172.18.0.5 veth89bbbe5 eth0 10.0.0.5 myoverlay - VNI 100 eth0: 192.168.1.110 iptables NAT/port mapping docker_gwbridge: 172.18.0.1 C1 eth1 172.18.0.3 veth62e4b94 eth0 10.0.0.6 C2 eth1 172.18.0.4 veth4e85bca eth0 10.0.0.7 C3 eth1 172.18.0.5 veth343fe37 eth0 10.0.0.8 myoverlay - VNI 100 eth0: 192.168.1.120 iptables NAT/port mapping docker_gwbridge: 172.18.0.1 C1 eth1 172.18.0.3 veth218d196 eth0 10.0.0.9 C2 eth1 172.18.0.4 veth09fe1d8 eth0 10.0.0.10 C3 eth1 172.18.0.5 veth4000548 eth0 10.0.0.11 myoverlay - VNI 100 $ docker network create -d overlay myoverlay $ docker service create --network myoverlay nginx
  • 15. Overlay network VXLAN tunnel veth veth VTEP VTEP 10.0.0.5 10.0.0.6 192.168.1.100 192.168.1.200
  • 17. Macvlan & Ipvlan Network switch (gateway 172.16.1.1) eth0: 172.16.1.253 (IP optional) C1 eth0 172.16.1.10 C3C2 eth0 172.16.1.11 eth0 172.16.1.12 eth0: 172.16.1.254 (IP optional) C4 eth0 172.16.1.13 C6C5 eth0 172.16.1.14 eth0 172.16.1.15