FreeBSD/VPC Virtual Private Cloud support (fka SDN) Virtualization - - PowerPoint PPT Presentation

freebsd vpc
SMART_READER_LITE
LIVE PREVIEW

FreeBSD/VPC Virtual Private Cloud support (fka SDN) Virtualization - - PowerPoint PPT Presentation

FreeBSD/VPC Virtual Private Cloud support (fka SDN) Virtualization Status bhyve(4) is a stable, performant hypervisor Network isolation is not core to bhyve(4) today Use of VNET(9) for manipulating FIBS for tap(4) interfaces is


slide-1
SLIDE 1

FreeBSD/VPC

Virtual Private Cloud support (fka SDN)

slide-2
SLIDE 2

Virtualization Status

  • bhyve(4) is a stable, performant hypervisor
  • Network isolation is not core to bhyve(4) today
  • Use of VNET(9) for manipulating FIBS for tap(4)

interfaces is possible, but limited and not performant

slide-3
SLIDE 3

Problem

  • bhyve(4) guests run customer workloads
  • Cloud providers need a single FIB for the underlay

network

  • Guests run in isolated overlay networks
  • How do you map guests to their respective overlay

network?

slide-4
SLIDE 4

Guest Workloads

em0 Guest 1 Customer A Guest 2 Customer B

slide-5
SLIDE 5

Guest Workloads

em0 Guest 1 Customer A Guest 3 Customer B Guest 2 Customer B bridge0 tap51 tap52

slide-6
SLIDE 6

FreeBSD

  • bhyve(4) guests run customer workloads
  • Cloud providers need a single FIB for the underlay

network

  • Guests run in isolated overlay networks
  • How do you map guests to their respective overlay

network?

slide-7
SLIDE 7

if_bridge(4) Approach

em0 Guest 1 Customer A Guest 3 Customer B Guest 2 Customer B tap51 bridge0 tap50 tap52 bridge2 bridge1

slide-8
SLIDE 8

Problems with Current Tools:
 tap(4)/bridge(4)/vxlan(4)/VNET(9)

  • tap(4) is slow
  • bridge(4) is slow
  • vxlan(4) sends received packets through ip_input()

twice (i.e. "sub-optimal")

  • VNET(9) virtualizes underlay networks, not overlay networks
  • How do you ARP across machines?
  • How do you perform vxlan(4) encap?
slide-9
SLIDE 9

FreeBSD/vpc

em0 Guest 1 Customer A Guest 3 Customer B Guest 2 Customer B vmnic1 vpclink0 vmnic0 vmnic2 vpcsw1 vpcsw0

slide-10
SLIDE 10

FreeBSD/vpc Multi-Host

em0 Guest 1 Customer A Guest 3 Customer B Guest 2 Customer B

vpclink0 vmnic0 vpcsw1 vpcsw0 vmnic1 vmnic2

em0 Guest 1 Customer A Guest 3 Customer B Guest 2 Customer B

vpclink0 vmnic0 vpcsw1 vpcsw0 vmnic1 vmnic2

???

slide-11
SLIDE 11

FreeBSD/vpc Multi-Host

em0 Guest 1 Customer A Guest 3 Customer B Guest 2 Customer B

vpclink0 vmnic0 vpcsw1 vpcsw0 vmnic1 vmnic2

em0 Guest 1 Customer A Guest 3 Customer B Guest 2 Customer B

vpclink0 vmnic0 vpcsw1 vpcsw0 vmnic1 vmnic2

VNI 123 VNI 987 VNI 123 VNI 987

VXLAN Packets

slide-12
SLIDE 12

VXLAN to the Rescue

  • Encapsulates all IP packets as UDP
  • Adds a preamble to IP packet
  • Tags packets and with a VXLAN ID, known as a VNI
  • VXLAN is similar to VLAN tagging, but embeds tagging in

the IP header, not in the L2 frame

slide-13
SLIDE 13

FreeBSD/vpc Multi-Host

em0 Guest 1 Customer A Guest 3 Customer B Guest 2 Customer B

vpclink0 vmnic0 vpcsw1 vpcsw0 vmnic1 vmnic2

em0 Guest 1 Customer A Guest 3 Customer B Guest 2 Customer B

vpclink0 vmnic0 vpcsw1 vpcsw0 vmnic1 vmnic2

VNI 123 VNI 987 VNI 123 VNI 987

VXLAN Packets

slide-14
SLIDE 14

vpc(4) Interfaces

  • vpcsw(4) - switches packets - one packet per customer, multiple

subnets supported in the same switch

  • vmnic(4) - dedicated guest NIC, looks like a virtio network device

to guests

  • vpcp(4) - plugs vmnic(4) ports into vpcsw(4) switches
  • vpci(4) - Non-bhyve(4) interface, usable in jails(2)
  • ethlink(4) - Performs unencapsulated packet forwarding, wraps

a cloned or physical ethernet interface

  • vpclink(4) - Performs VXLAN encapsulation
slide-15
SLIDE 15

New System Calls

  • vpc_open(2) - Creates a new VPC descriptor
  • vpc_ctl(2) - Manipulates VPC descriptors
  • Capsicum-like, intended for privilege separation
  • Intended for idempotent tooling
  • Makes aggressive use of UUIDs as operator handles to

be compatible with Triton

slide-16
SLIDE 16

Ongoing Work

  • Firewalling
  • Routing
  • NAT
  • Userland Control Plane (including setup and teardown of

bhyve(4) guests via something not a shell script)

slide-17
SLIDE 17

Code

  • Kernel:


https://github.com/joyent/freebsd/tree/projects/VPC

  • Kernel Libraries:


https://github.com/joyent/freebsd/tree/projects/VPC/ libexec/go/src/go.freebsd.org/sys/vpc

  • Userland tooling:


https://github.com/sean-/vpc

slide-18
SLIDE 18

Questions?