Docker1.12	
overs_5121
@overs_5121	
	NTT	SIC	
	
	
docker OSS
DockerCon16
h:ps://hd35468.wordpress.com/2016/06/27/docker-loadbalancer/
VTEP
IPVS
Container Container Container
NAT
Docker
Docker	1.12.0	commit	ID	8eab29e
LB
Container Container Container
$	docker	network	ls	
NETWORK	ID												NAME																								DRIVER											SCOPE	
1890dcf6f290										bridge																									bridge												local	
4a1038a14ad0								docker_gwbridge					bridge													local	
aabd231a94ce								host																													host																local	
3nebibe5c0zf										ingress																								overlay											swarm	
91fe5e69b7a6								none																												null																	local
libnetwork!
Docker libnetwork 	
h:ps://github.com/docker/libnetwork
Docker
veth macvlan ipvlan
VXLAN
ID
•  ID	:	$	docker	inspect	 |	grep	SandboxID	
•  ID	:		$	docker	inspect	 |grep	EndpointID	
•  ID	:					$	docker	network	ls	
	
/var/run/docker/netns/ 	
	
ip	netns
VTEP
IPVS
Container Container Container
NAT
=	
Docker
Ingress
VTEP
IPVS
Container Container Container
NAT -A	DOCKER-INGRESS	-p	tcp	-m	tcp	--dport	8080	-j	
DNAT	--to-descnacon	172.18.0.2:8080	
IPVS namespace
VTEP
IPVS
Container Container Container
NAT
->	ip-10-255-0-7.ap-northeast-1	Masq	1	0	0	
->	ip-10-255-0-8.ap-northeast-1	Masq	1	0	0	
->	ip-10-255-0-9.ap-northeast-1	Masq	1	0	0	
->	ip-10-255-0-10.ap-northeast-	Masq	1	0	1	
->	ip-10-255-0-11.ap-northeast-	Masq	1	0	0	
->	ip-10-255-0-12.ap-northeast-	Masq	1	0	0
VTEP
IPVS
Container Container Container
NAT
VXLAN
Container Container Container
Embedded	DNS	
127.0.0.11
Embedded	
DNS
VTEP
Round	Robbin
Container Container Container
Embedded	DNS	
127.0.0.11
Embedded	
DNS
VTEP
Round	Robbin
	
swarm	mode
ILB
ILB
vtep fdb
•  docker	1.12
	
• 
	
• 
$	docker	run	-itd	--net=backend	busybox	
docker:	Error	response	from	daemon:	swarm-scoped	network	(backend)	is	not	
compacble	with	`docker	create`	or	`docker	run`.	This	network	can	be	only	used	docker	
service.	
See	'docker	run	--help'.
OverlayDriver IPSEC
Ipsec	over	VXLAN
$	docker	network	created	-d	overlay	--opt	encrypted	<nw_name>	
IPSEC
VTEP
IPVS
Container Container Container
NAT
•  ILB IPVS	
•  L4 L7 (k8s
L7 )	
•  LB	(ELB )	 	
•  IPVS VTEP 	 	
•  swarm	mode	 	
•  docker	swarm

Docker1.12イングレスロードバランサ