02 - Virtualisation and Networking
02 - Virtualisation and Networking
Virtual machine #1 Virtual machine #2 Virtual machine #3 Virtual machine #1 Virtual machine #2 Virtual machine #3 Virtual machine #1 Virtual machine #2 Virtual machine #3
A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p
p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p
Operating System Operating System Operating System Operating System Operating System Operating System Operating System Operating System Operating System
Network virtualisation
Storage virtualisation
— Applications
— Timeshare several single-user OS
instances on expensive hardware
— Compatibility
host
guest
state mapping
instruction
sequence
guest host
write write
operation operation
— Innocuous
— The rest (klabbet)
Ericsson Internal | 2018-02-21
CPU virtualisation
Popek & Goldberg '74
Physical machine
ring 3 Most privileged
(System mode)
App App App App ring 2
ring 1
Libraries
ring 0
kernel
Operating System (kernel)
drivers
Hardware drivers
Least privileged
apps (User mode)
Libraries Libraries
ring 3
Most privileged
Operating System (kernel) Operating System (kernel) (System mode)
ring 2
ring 1
ring 0
kernel
drivers
Hypervisor/VMM
Hardware
Libraries Libraries
— Facilitates processor sharing using standard Operating System (kernel) Operating System (kernel)
Libraries
Hardware
privileged
instruction trap
emulates
— E.g., movl %eax, %cr3 ; invalidate the TLB
— Traps into VMM so the effect can be emulated Hypervisor/VMM
when possible
— E.g., addl %eax, %ex
Libraries
Hardware
Physical machine
Ericsson Internal | 2018-02-21
CPU virtualisation
Trap and emulate
VMM/Hypervisor VMM/Hypervisor
Physical
machine
Hardware Hardware Hardware
(host)
Process Process
0x0
— Each process has its own space (usually 0x0
physical memory
Physical memory
Virtual memory
Physical memory
Virtual memory
page table
Physical memory
Virtual memory
Real memory
page table
Physical memory
Virtual memory
Real memory
page table
Physical memory
VMM/Hypervisr
Hardware Hardware
machine
virtualisation, i.e. the whole machine is (guest) Operating System (kernel)
virtualised. Virtualising software
But that is not the only option! Physical Virtualising software Operating system
machine
(host) Hardware Hardware
System Process
virtual virtual
machine machine
• Low overhead
$ docker ps
$ docker ps --all
$ docker images
$ docker rmi $(docker images -q)
$ docker stop $(docker ps -q)
$ docker rm $(docker ps --all -q)
Ericsson Internal | 2018-02-21
Docker vs VMs
— Virtual machines have their own complete guest OS.
— Separate kernels. Takes time to boot.
— A small application we want to run quickly adds
up to much data.
— Consumes host resources
— Thorough isolation
— Docker
— Shares kernel with host OS.
— Runs as a process inside the host.
— Only applications and its dependencies.
— Efficiency, better reuse of host OS resources
— Docker contains OS, but runs natively
— Less isolation
Storage Networking
IBM Research, An Updated Performance Comparison of Virtual Machines and Linux Containers, 2014-07-21, http://
Ericsson Internal | 2018-02-21
domino.research.ibm.com/library/cyberdig.nsf/papers/0929052195DD819C85257D2300681E7B/ $File/rc25482.pdf
Containers empowering microservices
Isolated and abstracted runtime environments, that can be tailored for each module
GPU
Remark:
GPUs can only be used within
the node they are attached to
No GPU
Fahmy et al., "Virtualized FPGA Accelerators for Efficient Cloud Computing", IEEE 7th International
Conference on|Cloud
Ericsson Internal Computing Technology and Science (CloudCom), 2015
2018-02-21
Storage virtualisation Virtual machine
Block storage (virtual hard disk)
File system
Performance is an issue
Block device driver
App
VM#1
Hypervisor
Libraries
File system
Disk
Virtual machine
File system
App
VM#1
Hypervisor
Libraries Libraries
Network
Ericsson Internal | 2018-02-21
Cloud Native
#2b - Networking
Networking 101
The stack
HTTP, FTP
TCP, UDP
IP
Ethernet,
token ring
Source: Optimizing Network Performance with Content Switching: Server, Firewall, and By Matthew Sym
Network virtualisation
Libraries Libraries
10.0.0.12 10.0.0.27
00:1a:2c:2F:32:d1 01:2c:1a:4b:12:c2
Network virtualisation
S-MAC: 00:1A:2C:2F:32:D1
D-MAC: 01:2C:1A:4B:12:C2
S-IP: 10.0.0.12
D-IP: 10.0.0.27
<PAYLOAD>
Virtual network (10.0.0.0/24)
Libraries Libraries
10.0.0.12 10.0.0.27
00:1a:2c:2F:32:d1 01:2c:1a:4b:12:c2
Network virtualisation
Guest
Host
Network virtualisation
Virtual network (10.0.0.0/24)
Operating System (kernel) Operating System (kernel) Operating System (kernel) Operating System (kernel)
10.0.0.12 10.0.0.27
00:1a:2c:2F:32:d1 01:2c:1a:4b:12:c2
S-MAC: 00:1a:2c:2f:32:d1
D-MAC: 01:2c:1A:4b:12:c2
S-IP: 10.0.0.12
D-IP: 10.0.0.27
<PAYLOAD>
Tunneling
— Provides a network service that the underlying network cannot provide.
— IPv6 over IPv4
— VPN - Virtual Private Network, provide secure access to a network using non-secure networks. Uses IPSec
“encrypt an IP datagram and put it in an IP datagram”
— Usually violates the OSI model, i.e., the layer m payload contains layer n<m protocol data.
— Communication between data centers typically over tunnels.
— VXLAN
— VLAN on steroids.
— Addresses scalability problem of layer-2 networks.
— Allows 2^24 logical networks. Identified by VXLAN Network Identifier (VNI).
— Encapsulates layer-2 frame in UDP datagram. Layer 2 on top of layer 3!
— Connect separate layer-2 domains to create one domain.
— Machines are identified uniquely by the combination of their MAC address and VNI.
— VXLAN Tunnel End Points (VTEP) encapsulate/decapsulate layer-2 frames.
Cloud Networking
— Dynamics
—mobility, migration of VMs
—short lived services
—on demand scaling
— Scaling
—many VMs on many hosts
— Isolation
—tenants sharing the same physical resource
— Traffic
—North-south/East-west
—Not always on physical links
—Make DNS a bit more complicated (and important)
The Two Networking “Planes”
Forwarding Model
60
SDN
Software Defined Networking
Docker
VM
.....
Internet
Docker
Docker
VM
VM
Volume
Docker
VM