nithin raju, sairam venugopal, alin serdean, alin balutoiu

18
Nithin Raju, Sairam Venugopal VMware, Inc. Alin Serdean, Alin Balutoiu Cloudbase Solutions Srl OVS on Microsoft Hyper-V

Upload: hoangkien

Post on 13-Feb-2017

236 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Nithin Raju, Sairam VenugopalVMware, Inc.

Alin Serdean, Alin BalutoiuCloudbase Solutions Srl

OVS on Microsoft Hyper-V

Page 2: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Agenda

• Introduction & Architecture

• Stateful firewall & Demo

• Container support

• Roadmap

• Questions

Page 3: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

What is it?

• Full fledged OVS solution for Microsoft Hyper-V

• Windows 8 / Server 2012+

• Collaboration b/n VMware Inc. and Cloudbase

Solutions Srl

• Consists of:

– Ported OVS userspace code

– Windows datapath as an NDIS driver (OVSEXT)

• Forwarding extension on Microsoft Hyper-V Switch

Page 4: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Architecture

Child Partitions (Guest)

OVS Forwarding Extension

I

N

G

R

E

S

S

E

G

R

E

S

S

Hyper-V extensible switch

Interface device

Flowtable

Packet

ProcessingWFP Callout

Driver

Virtual

Machine #1

Virtual

Machine #2

VIF VIFPhysical

NIC

ovs-vswitchd

netlink socket(emulation)User

NDIS Stack

Root Partition (Host)

ovs-*ctl

Netlink Message Impl.

Kernel

dpif-

netlink

netdev-

windowsHyper-V

Internal

NIC

vport table

Page 5: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Architecture

• Registered as a forwarding filter driver

• Registers callbacks for switch management and datapath functions

• Netlink messages over a pseudo device for user-kernel comm.

• Deep/Partial copy between NBLs with ref counting (NDIS limitation)

• Packet flow:– Packet from VM enters the switch ingress path and gets sent to OVSEXT driver

– OVSEXT does flow lookup and sends to userspace upon miss

– Flow gets added to kernel and packet gets forwarded to the NDIS stack

Page 6: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Architecture

Child Partitions (Guest)

OVS Forwarding Extension

I

N

G

R

E

S

S

E

G

R

E

S

S

Hyper-V extensible switch

Interface device

Flowtable

Packet

ProcessingWFP Callout

Driver

Virtual

Machine #1

Virtual

Machine #2

VIF VIFPhysical

NIC

ovs-vswitchd

netlink socket(emulation)User

NDIS Stack

Root Partition (Host)

ovs-*ctl

Netlink Message Impl.

Kernel

dpif-

netlink

netdev-

windowsHyper-V

Internal

NIC

vport table

1

2

3

4

5

67

Page 7: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Features

• Supports VLAN, STT, GRE, VXLAN and Geneve tunnels

• L2/L3 header overwrite

• Offloads: Checksum, TSO, STT (LSO & LRO)

• Sampling

• Recirculation

• Stateful Firewall using an internal connection tracker

• Multiple NICs, VTEPs and Bonding

• All OVS binaries work on Hyper-V

• Named pipes instead of Unix domain sockets

Page 8: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Stateful Firewall

• New Connection Tracker internal to OVS datapath

• Windows Filtering Platform– WFP applies the filters for creating the firewall

– Can be used to audit firewall connections

– Cannot track the status of the connection

– Incompatible architecture for OVS (flow based)

• FreeBSD - Packet Filter– Didn’t require a full blown packet filter

– conntrack-tcp parser is ported from FreeBSD

• Port of userspace connection tracker

• Supports a familiar netlink interface

Page 9: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Stateful Firewall

OVS Kernel

Conntrack ModuleOVS Flow table

Userspace (vswitchd) ovs-vsctl cmd

Netlink Socket (Emulation) - Netfilter like messages

conntrack action

(-trk)

(-trk)

new

est

rel(new/est/rel)

recirculation (matched

flow)

- ovs-dpctl dump-conntrack

- ovs-dpctl flush-conntrack

Page 10: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Stateful Firewall

• How does it work?– Maintains an expirable internal map to track connections

– Counters for tracking packet count and size per connection

– Netlink interface to Dump and Flush Conntrack entries

– Supports subscribing to Conntrack delete/create events

– Currently supports IPv4: TCP, UDP, ICMP packets

– Adding in support for ALGs and fragmented packets

Page 11: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Demo

• Stateful Firewall on Openstack with KVM & Hyper-V– Install devstack

– Setup Hyper-V as Compute Node

– Install neutron-ovs-agent on Hyper-V

– Create a VM on Hyper-V and KVM hypervisors

– Setup security groups for both VMs

– Display firewall policies for ICMP, TCP and UDP traffic

Page 12: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Demo – Stateful firewall with Openstack

Page 13: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Containers on Windows

• Prerequisites: Windows 10 / Server 2016 family

• Container types:– Windows Containers – runs as isolated process with shared

kernel (does not require Hyper-V feature enabled)

– Hyper-V Containers – runs in an optimized virtual machine

• Containers connect to a “VM Switch” for networking.

NAT service has a port called “HNS Internal NIC”.

Page 14: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Containers on Windows

• Windows Container network adapter– Represented as a Hyper-V Virtual Switch internal port

– Not visible on the host in the UI or ipconfig

• Hyper-V Container network adapter– Represented as a Hyper-V Virtual Switch synthetic port

• Requires integration with Docker (demo is part of PoC)

Page 15: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Demo – Containers

Page 16: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Roadmap

• Auto-addition of Hyper-V VIFs to OVSDB

• ALGs support for Connection Tracking

• IPv6 (tunnels, conntrack)

• Megaflows

• Containers

• Hardware Offloading for tunnels

• QoS

• Investigate OVN support

Page 17: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Questions

• Join our Hyper-V IRC meetings at 10 AM PST, Tuesdays

at #openvswitch

Page 18: Nithin Raju, Sairam Venugopal, Alin Serdean, Alin Balutoiu

Multiple Ports

• Multiple NICs

• Bonding

• Multiple VTEPs

• Internal ports (useful for testing)