SlideShare a Scribd company logo
IPv6	&	Containers
Pieter	Lewyllie
Systems	Engineer	@	Cisco
Agenda
• Containers?
• IPv6	for	Docker
• IPv6	for	Kubernetes
Linux	Containers
• A	Linux	container	lets	you	run	a	Linux	system	
within	another	Linux	system.
• A	container	is	a	group	of	processes	on	a	Linux	
machine.
• Those	processes	form	an	isolated	environment.
• Inside	the	container,	it	(almost)	looks	like	a	VM.
• Outside	the	container,	it	looks	like	normal	
processes	running	on	the	machine.
• It	looks	like	a	VM,	but	it	is	more	efficient:	
Containers	=	Lightweight	Virtualization
Containers	and	Virtual	Machines
App	A
Bins/
Libs
Hypervisor	(Type	2)
Host	OS
Server
Host	OS
Server
App	A’
Bins/
Libs
Guest	OS
App	B
Bins/
Libs
Guest	OS
Bins/Libs Bins/Libs
Container
Control
App	
A
App	
A’
App	
B
App	
B’
App	
C’
App	
C’
VM
Container
Containers are isolated but share OS and where
appropriate bins/libraries
Guest	OS
Containers	are	almost	like	Virtual	Machines
• Containers	have	their	own	network	interface	(and	IP	address)
• Can	be	bridged,	routed...	just	like	with	KVM,	VMware	etc.
• Containers	have	their	own	filesystem
• For	example	a	Debian host	can	run	Fedora	container	(and	vice-versa)
• Security:	Containers	are	isolated	from	each	other
• Two	containers	can't	harm	(or	even	see)	each	other
• Resource	Control:	Containers	are	isolated	and	can	have	dedicated	resources
• Soft	&	hard	quotas	for	RAM,	CPU,	I/O...
• Though…
• Apps	in	Containers	share	the	kernel	of	the	host	OS	(i.e.	Linux	guests	only)
• Containers	are	light-weight,	fast	to	start,	allow	for	>10x	density	compared	to	VMs
Docker	networking
Docker	Containers	are	connected	using	a	bridge
docker0	bridge	(NAT)
172.17.0.1
veth5a88c7b0@if5																vetha23c2e8@if7
eth0
172.17.0.2
eth0
172.17.0.3
Host
Docker	bridge	with	IPv6
https://docs.docker.com/v17.09/engine/userguide/networking/default_network/ipv6
• No	more	NAT,	all	ports	are	exposed
• Docker	assigns	IPv6	addresses	
sequentially
• Default	GW	needs	to	be	in	same	
subnet
• Set	accept_ra to	2
Reaching	the	internet	with	NDP	Proxy
• sudo sysctl net.ipv6.conf.default.proxy_ndp=1
• sudo sysctl net.ipv6.conf.all.proxy_ndp=1
• docker network	create	testv6council	--ipv6	--subnet	2a02:2789:724:eb8:1::/80
• sudo ip -6	neigh	add	proxy	2a02:2789:724:eb8:1:ff:ff:ff	dev	br-e25957a13b1f
• sudo ip -6	neigh	add	proxy	2a02:2789:724:eb8:1::2	dev	ens33
Macvlan
eth0
192.168.0.2
eth0
192.168.0.3
Host
192.168.0.1/24
docker network	create	–d	macvlan
–subnet=192.168.0./24
–gateway=192.168.0.1	
–o	parent=eth0	ipv4_pubnet
IPv6	Macvlan
https://docs.docker.com/network/macvlan
Docker	Networking
• Bridge	network	driver		(--driver=bridge)	
• IPv6	can	be	enabled	(--ipv6)
• None	network	driver	(--driver=none)	
• Host	network	driver	(--driver=host)	
• Overlay	network	driver	(--driver=overlay)	– Multi-Host	using	VXLAN
• MACVLAN	network	driver	(--driver=macvlan)
• IPv6	can	be	enabled
• Remote	drivers	– compatible	with	CNM	(Container	Network	Model)
• Contiv,	Weave,	Calico…
Kubernetes
• Container	orchestrator	
• Runs	and	manages	containers	
• Supports	multiple	cloud	and	bare-metal	
environments	
• Inspired	and	informed	by	Google's	experiences	
and	internal	systems	
• 100%	Open	source,	written	in	Go	
• Manage	applications,	not	machines	
• Rich	ecosystem	of	plug-ins	for	scheduling,	
storage,	networking
Nodes,	Pods,	Containers
• Node:
• A	server
• Cluster:
• Collection	of	nodes
• Pod:
• Collection	of	containers;
• Nodes	can	run	multiple	Pods
Services	overview
• “Pods	can	come	and	go,	services	stay”	
• Define	a	single	IP/Port	combination	
that	provides	access	to	a	pool	of	pods	
• By	default	a	service	connects	the	
client	to	a	Pod	in	a	round- robin	
fashion	
• This	solves	the	dilemma	of	having	to	
keep	up	with	every	transient	IP	
address	assigned	by	Docker
Container	Network	Interface	(CNI)
• Proposed	by	CoreOS	as	part	of	appc	
specification
• Common	interface	between	
container	run	time	and	network	
plugin
• Gives	driver	freedom	to	manipulate	
network	namespace
• Network	described	by	JSON	config
• Plugins	support	two	commands:
- Add	Container	to	Network
- Remove	Container	from	Network
• Many	CNI	plugins	available:	
• Calico,	Flannel,	Weave,	Contiv…
Container
Network	
namespace
Driver	
plumbing
Kubernetes,	Rocket…
Container	Network	Interface
Plugins
• IPv4	Parity,	no	API	Changes
• CNI	0.6.0	Bridge	&	Host-Local	IPAM
• ip6tables	&	ipvs
• Kube-DNS	&	CoreDNS
• kubeadm
Rel 1.9	(Alpha)
• Dual-Stack,	parallel	
IPv4/IPv6
• Multiple	IPs	per	pod
• Multiple	IPs	per	service
IPv6	in	Kubernetes
Rel 1.11	(Beta)
Rel 1.12	(targeting)	
• SRv6
• Istio IPv6
• Multiprefix
Routing…
Planning	and	
Preparing
Source:	SRv6LB	@	Kubecon https://www.youtube.com/watch?v=RRKUeyFaqEA
IPv6	Containers	@	Facebook	(!k8s)
• Every	server	gets	a	/64
• Unique	IPv6	Address	per task
• Each	task	gets	its	own	IPv6	/128
• Each	task	gets	the	entire	port	space
• No	more	port	collisions	(!!!)
• Simpler	scheduling	and	accounting
• /54	per	Rack
• /44	per	Cluster	(/48	in	edge)
• /37	DC	Fabric
• No	NATs!
What	about	the	public	cloud?
• GCE/GKE	does	not	have	IPv6	support
• VPC	networks	only	support	IPv4	unicast	traffic.	They	do	not	support	broadcast,	multicast,	or	IPv6	traffic	within	
the	network.
• Can	use	IPv6	with	load-balancing:
• https://cloud.google.com/compute/docs/load-balancing/ipv6
• Azure,	no	IPv6	on	AKS
• IPv6	load-balancer:
• https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-ipv6-overview
• Long	list	of	limitations:
• A	single	IPv6	address	can	be	assigned	to	a	single	network	interface	in	each	VM.
• The	load	balancer	routes	the	IPv6	packets	to	the	private	IPv6	addresses	of	the	VMs	using	network	address	translation	
(NAT).
• Azure	VMs	cannot	connect	over	IPv6	to	other	VMs,	other	Azure	services,	or	on-premises	devices.	They	can	only	
communicate	with	the	Azure	load	balancer	over	IPv6.	However,	they	can	communicate	with	these	other	resources	
using	IPv4.
• Amazon
• Should	work	with	EC2	instances
• Each	VPC	is	given	a	unique	/56	address	prefix	from	within	Amazon’s	GUA	(Global	Unicast	Address);	you	can	
assign	a	/64	address	prefix	to	each	subnet	in	your	VPC
• Maximum	amount	of	IPv6	addresses	per	interface:	
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI
Why	IPv6	in	containers?
• Future-ready,	IPv6	is	coming	anyway…
• Less	configuration	(no	port	forwarding)
• Less	state	(no	remembering	which	port	for	which	service)
• Less	moving	parts	(easier	diagnosis	of	faults)
• Less	variation	between	deployments
• Forces	you	to	do	proper	security
The	scale	of	IPv6	for	containers
• Every	docker host	a	routed	/64
• Never re-use	IPv6	address	again
• How	long	would	it	take	to	burn	through	that	/64?
• How	about	10,000,000	per	second	?
• A	standard	/64	prefix	in	IPv6	is	18,446,744,073,709,600,000	addresses.
• 18,446,744,073,709,600,000	IPv6	addresses	/	(10,000,000	IPv6	addresses/second	*	60	sec/min	*	
60	min/hr *	24	hr/day	*	365	days/yr)	=	58,494	years
• A	single	/48	contains	65536	/64s
• 58,494	years	*	65536	=	3,833,478,626	(3.8	billion years)
Ed	Horley (VP	engineering	Groupware)
http://www.howfunky.com/2015/06/ipv6-docker-and-building-for-scale.html
References
• IPv6	and	containers	– a	horror	story
• Matt	Palmer	(Linux	bearded	guy)
• https://blog.apnic.net/2018/03/22/ipv6-and-containers-a-horror-story/
• SRv6LB	@	Kubecon
• Pierre	Pfister (Cisco	SE)	&	Mark	Townsley (Cisco	Fellow)
• https://www.youtube.com/watch?v=RRKUeyFaqEA
• BRKSDN-2115
• Frank	Brockners (Cisco	Distinguished	Engineer)
• https://www.ciscolive.com/global/on-demand-library/?search=BRKSDN-2115#/session/BRKSDN-2115
• Containers,	virtualisation and	IPv6
• Steve	Youell (JP	Morgan)
• http://www.ipv6.org.uk/2016/08/31/ipv6-council-meeting-october-2016/
• IPv6	in	cloud	deployments
• Shannon	McFarland	(Cisco	Distinguished	Engineer)
• http://www.rmv6tf.org/wp-content/uploads/2017/04/04-IPv6-Cloud-Deployment-RMv6tf-submit-min-1.pdf
• IPv6,	Docker	and	building	for	scale
• Ed	Horley (Groupware)
• http://www.howfunky.com/2015/06/ipv6-docker-and-building-for-scale.html
Thanks!

More Related Content

PPTX
Containers in the Cloud
PPTX
Performance comparison between Linux Containers and Virtual Machines
PPTX
Containers and Cloud: From LXC to Docker to Kubernetes
PDF
Introduction to Containers and Docker
PDF
Experiences porting KVM to SmartOS
PDF
Understand how docker works
PDF
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
Containers in the Cloud
Performance comparison between Linux Containers and Virtual Machines
Containers and Cloud: From LXC to Docker to Kubernetes
Introduction to Containers and Docker
Experiences porting KVM to SmartOS
Understand how docker works
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...

What's hot (20)

PDF
Docker Intro at the Google Developer Group and Google Cloud Platform Meet Up
PPTX
Docker introduction
PDF
Understanding LXC & Docker
PDF
Virtual Machines and Docker
PPTX
Virtualization, Containers, Docker and scalable container management services
PPTX
Docker-Intro
PDF
Docker introduction for Carbon IT
PDF
Docker basics
PDF
Scaling and Managing Cassandra with docker, CoreOS and Presto
PPTX
Central Iowa Linux Users Group: November Meeting -- Container showdown
PPTX
Hypervisor "versus" Linux Containers with Docker !
PDF
Docker and containers : Disrupting the virtual machine(VM)
PDF
Introduction to Docker
PDF
Intro to containerization
PDF
Docker Introduction
PPTX
Virtual Container - Docker
PPTX
Docker 101 - Nov 2016
PPTX
Start your adventure with docker
PDF
Containers technologies
PDF
Introduction to Docker - Docker workshop @Twitter
Docker Intro at the Google Developer Group and Google Cloud Platform Meet Up
Docker introduction
Understanding LXC & Docker
Virtual Machines and Docker
Virtualization, Containers, Docker and scalable container management services
Docker-Intro
Docker introduction for Carbon IT
Docker basics
Scaling and Managing Cassandra with docker, CoreOS and Presto
Central Iowa Linux Users Group: November Meeting -- Container showdown
Hypervisor "versus" Linux Containers with Docker !
Docker and containers : Disrupting the virtual machine(VM)
Introduction to Docker
Intro to containerization
Docker Introduction
Virtual Container - Docker
Docker 101 - Nov 2016
Start your adventure with docker
Containers technologies
Introduction to Docker - Docker workshop @Twitter
Ad

Similar to IPv6 & Containers (20)

PDF
7_OPEN17_Azure_Next-gen Development with PaaS & Containers
PPTX
Brief Introduction To Kubernetes
PPTX
Containers #101 Meetup: Containers & OpenStack
PDF
PDF
Introduction to Docker
PDF
Lxc- Linux Containers
PPTX
Containers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStack
PPTX
Introduction to automated environment management with Docker Containers - for...
PPTX
Containers #101 Meetup: Containers and OpenStack
PPTX
SummerStudent17_HandsOn Data Cloud Computing.pptx
PPTX
OpenStack Summit
PDF
Kubernetes overview and Exploitation
PPTX
Introduction to linux containers
PDF
Quick introduction to Kubernetes
PPT
Develop with linux containers and docker
PPT
2 Linux Container and Docker
PPTX
Intro Docker october 2013
PPTX
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
PDF
Kubernetes 架構與虛擬化之差異
PDF
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
7_OPEN17_Azure_Next-gen Development with PaaS & Containers
Brief Introduction To Kubernetes
Containers #101 Meetup: Containers & OpenStack
Introduction to Docker
Lxc- Linux Containers
Containers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStack
Introduction to automated environment management with Docker Containers - for...
Containers #101 Meetup: Containers and OpenStack
SummerStudent17_HandsOn Data Cloud Computing.pptx
OpenStack Summit
Kubernetes overview and Exploitation
Introduction to linux containers
Quick introduction to Kubernetes
Develop with linux containers and docker
2 Linux Container and Docker
Intro Docker october 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Kubernetes 架構與虛擬化之差異
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Ad

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Encapsulation theory and applications.pdf
PPT
Teaching material agriculture food technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
cuic standard and advanced reporting.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation_ Review paper, used for researhc scholars
Review of recent advances in non-invasive hemoglobin estimation
Chapter 3 Spatial Domain Image Processing.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Unlocking AI with Model Context Protocol (MCP)
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Encapsulation theory and applications.pdf
Teaching material agriculture food technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
NewMind AI Weekly Chronicles - August'25 Week I
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
cuic standard and advanced reporting.pdf
Electronic commerce courselecture one. Pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Understanding_Digital_Forensics_Presentation.pptx

IPv6 & Containers