Advanced OpenStack Networking
Advanced OpenStack Networking
Advanced OpenStack Networking
OpenStack
Networking
Moatasem ELMOGY
Content
Chapter.1 Introducing Software-Defined Networking
Chapter.2 OpenStack Component – Neutron
Orange Restricted
Content
Chapter.1 Introducing Software-Defined Networking
SDN Introduction
OpenFlow Basics
Introducing Open vSwitch
Chapter.2 OpenStack Component – Neutron
Orange Restricted
Introducing Software-Defined Networking
SDN Introduction
Before Starting explaining Neutron, let’s have a quick look at SDN:
Orange Restricted
Introducing Software-Defined Networking
SDN Introduction
Controller
Control plane
• Distributed protocols used
• OSPF, STP, etc.
Control plane • Populates the data plane with forward entries
• Distributed protocols used
• OSPF, STP, etc.
• Populates the data plane with forward entries
Data plane
• Hardware specific
• Bound by ASIC/TCAM limits in physical devices
Data plane
• Hardware specific
• Bound by ASIC/TCAM limits in physical devices
Orange Restricted
Introducing Software-Defined Networking
SDN Introduction
Network Virtualization is
an “SDN Application”
Orange Restricted
Introducing Software-Defined Networking
SDN Introduction
Orange Restricted
Introducing Software-Defined Networking
SDN Introduction
Network virtualization is:
• A fully isolated environment:
Q: Could two tenants decide to use the same RFC 1918 private IP space?
• Physical network location independent:
Q: Can two VMs be on the same L2 logical network, while in different physical L2 networks?
Q: Can a VM migrate without disrupting its security policies, packet counters, or flow state?
• Physical network state independent:
Q: Do physical devices need to be updated when a new network/workloads is provisioned?
Q: If a physical device died and was replaced, would application be impacted?
• Network virtualization is NOT:
Running network functionality in a VM (e.g., Router or Load-- ‐balancer VM)
Orange Restricted
Content
Chapter.1 Introducing Software-Defined Networking
SDN Introduction
OpenFlow Basics
Introducing Open vSwitch
Chapter.2 OpenStack Component – Neutron
Orange Restricted
Introducing Software-Defined Networking
OpenFlow Basics
Switch VLAN VLAN MAC MAC Eth IP Src IP Dst IP ToS IP Prot L4 L4
Port ID PCP src dst type s-port d-port
10
Orange Restricted
Introducing Software-Defined Networking
OpenFlow Basics
11
Orange Restricted
Introducing Software-Defined Networking
OpenFlow Basics
12
Orange Restricted
Content
Chapter.1 Introducing Software-Defined Networking
SDN Introduction
OpenFlow Basics
Introducing Open vSwitch
Chapter.2 OpenStack Component – Neutron
13
Orange Restricted
Introducing Software-Defined Networking
Introducing OVS - What is Virtual Switch?
Hypervisor
Virtual Network
vNIC L2
VM VM VM
VIF
Virtual Switch
Physical Switch
Data Flow
14
Orange Restricted
Introducing Software-Defined Networking
Introducing OVS - Why Open vSwitch?
15
Orange Restricted
Introducing Software-Defined Networking
Introducing OVS
16
Orange Restricted
Introducing Software-Defined Networking
Introducing OVS – The Main Components
ovsdb-tool
Management
ovs-dpctl ovs-ofctl ovs-vsctl
17
Orange Restricted
Introducing Software-Defined Networking
Introducing OVS – The Main Components
ovs-ofctl ovsdb-tool
Management
ovs-dpctl ovs-vsctl
OpenFlow
DB operation
upcall
Save changes
reinject ovs-vswitchd Apply changes ovsdb-server user
netlink
Flow Table
Orange Restricted
Introducing Software-Defined Networking
Introducing OVS – Forwarding Flow
ovs-vswitchd
user
Kernel
From Net Device OVS Kernal Module BRIDGE Kernal
Module
First Packet
subsequent Packets
19
Orange Restricted
Texte avec illustration
Demo Time
20
Orange Restricted
Content
Chapter.1 Introducing Software-Defined Networking
Chapter.2 OpenStack Component – Neutron
Networking before Neutron
Why Neutron?
Neutron Basics
Position of Neutron in OpenStack
Neutron Architecture
Neutron Architecture – with OVS
Neutron Architecture – with OVN
Traffic Flow
DVR
21
Orange Restricted
OpenStack Component – Neutron
Networking before Neutron
Nova-Networking
22
Orange Restricted
Content
Chapter.1 Introducing Software-Defined Networking
Chapter.2 OpenStack Component – Neutron
Networking before Neutron
Why Neutron?
Neutron Basics
Position of Neutron in OpenStack
Neutron Architecture
Neutron Architecture – with OVS
Neutron Architecture – with OVN
Traffic Flow
DVR
23
Orange Restricted
OpenStack Component – Neutron
Why Neutron?
24
Orange Restricted
OpenStack Component – Neutron
What is Neutron?
• Provides REST APIs to manage network connections for the resources managed
by other OpenStack Services (e.g. Nova)
• Technology Agnostic: (framework based on “plug-ins”) to allow a variety of
backend providers
• Multi-tenancy: Isolation, Abstraction, full control over virtual networks
• Modular Design: API specifies service, vendor provides its implementation.
Extensions for vendor-specific features.
• Exposes vendor-specific network virtualization and SDN technologies
• Standalone Service : It is not exclusive to OpenStack. Neutron is an
autonomous service
25
Orange Restricted
Content
Chapter.1 Introducing Software-Defined Networking
Chapter.2 OpenStack Component – Neutron
Networking before Neutron
Why Neutron?
Neutron Basics
Position of Neutron in OpenStack
Neutron Architecture
Neutron Architecture – with OVS
Neutron Architecture – with OVN
Traffic Flow
DVR
26
Orange Restricted
OpenStack Component – Neutron
Neutron Basics
Nova Neutron
Support different back-end virt-drivers for KVM, Plugins for ML2, OVS,
technologies XenServer, Hyper-v, Ryu, cisco UCS, Linux
VMWare ESX bridge, Nicira NVP …
API extensibility for new or Keypairs, instance rescue, QoS, port statistics,
back-end specific features volumes, etc. security groups, etc.
27
Orange Restricted
OpenStack Component – Neutron
Neutron Basics
With the development of Neutron project, a variety of L2 to L4 network services, such as LBaaS, VPNaaS,
FWaaS, have been extended based on basic services.
28
Orange Restricted
Content
Chapter.1 Introducing Software-Defined Networking
Chapter.2 OpenStack Component – Neutron
Networking before Neutron
Why Neutron?
Neutron Basics
Position of Neutron in OpenStack
Neutron Architecture
Neutron Architecture – with OVS
Neutron Architecture – with OVN
Traffic Flow
DVR
29
Orange Restricted
Introducing Software-Defined Networking
Position of Neutron in OpenStack
30
Orange Restricted
Content
Chapter.1 Introducing Software-Defined Networking
Chapter.2 OpenStack Component – Neutron
Networking before Neutron
Why Neutron?
Neutron Basics
Position of Neutron in OpenStack
Neutron Architecture – Plugin concept
Neutron Architecture – with OVS
Neutron Architecture – with OVN
Traffic Flow
DVR
31
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture - Plugin Concept
REST API
Neutron-server
Neutron Agents
Neutron Plugin Message Queue
RPC RPC
SQL SQL
Database
32
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture - Plugin Concept
REST API
Neutron Agents
Adv service
Agent
SQL
SQL
Database
33
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture - Plugin Concept
34
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture - Plugin Concept
Modular Plugins
Mechanism
Drivers
Drivers
Type
35
Orange Restricted
Content
Chapter.1 Introducing Software-Defined Networking
Chapter.2 OpenStack Component – Neutron
Networking before Neutron
Why Neutron?
Neutron Basics
Position of Neutron in OpenStack
Neutron Architecture – Plugin concept
Neutron Architecture – with OVS
Neutron Architecture – with OVN
Traffic Flow
DVR
36
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – with OVS
REST API
Neutron Agents
SQL
SQL
Database
37
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – with OVS
Neutron-OVS-plugin-Agent Neutron-OVS-plugin-Agent
Neutron-L3-Agent
Neutron-
Neutron-DHCP-Agent server
ML2 plugin
Neutron-*-Agent
38
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – with OVS
39
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – with OVS
40
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – with OVS
41
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – OVS – Security Group Design
42
Orange Restricted
Texte avec illustration
Demo Time
43
Orange Restricted
Content
Chapter.1 Introducing Software-Defined Networking
Chapter.2 OpenStack Component – Neutron
Networking before Neutron
Why Neutron?
Neutron Basics
Position of Neutron in OpenStack
Neutron Architecture – Plugin concept
Neutron Architecture – with OVS
Neutron Architecture – with OVN
Traffic Flow
DVR
44
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – with OVN
Introduction to OVN. What and why?
• Opensource Virtual Networking for OVS. • Will not require any additional agents for functionality
• Provides L2/L3 virtual Networking • for simplified deployment and debugging.
• Security groups using new in-kernel conntrack integration.
• Logical Switches and Routers. • More secure and faster than other methods.
• Security groups • OVN eliminates the need for Linux bridges, dnsmasq
instances, and namespaces.
• L2/L3/L4 ACLs • OVN has around 71% to 79.8% higher performance than OVS
• Multiple tunnel overlays (Geneve, STT and VxLAN)
• Work on same platforms as OVS
• Linux (KVM and XEN).
• Containers
• Speaks OVSDB to configure OVN via its Northbound
database. Results for Nova VM Creation time with OVN:
45
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – with OVN
ovn-northd
OVN-controller
OVN-controller
OVN-controller
Neutron plugin OVSDB OVSDB
ovsdb-server OVN-controller
ML2
OVN-controller
Plugin/OVN
RPC
Message Queue neutron-*aaS
RPC
46
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – with OVN
OVN ML2 Plugin
OVSDB
OVN Northbound DB
OVSDB
OVN-northd
OVSDB
OVN Southbound DB
OVSDB OVSDB
OVN-controller OVN-controller
openflow OVSDB
openflow OVSDB
receives information about the logical network the center of the entire system.
configuration from the Neutron plug-in.
It has two clients, the Neutron plug-in and It has two clients, ovn-northd and the ovn-
ovn-northd controller services
48
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – OVN
49
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – OVN – Security Group Design
50
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – OVN – DHCP and DNS Design
DHCP
• OVN implements DHCPv4 support, which removes the need for a DHCP agent.
• Virtual networks no longer require a DHCP namespace or a dnsmasq process.
• DHCPv4 options are configured on each compute node running ovn-controller. This means
that DHCP support is fully distributed.
• DHCP requests from the instances are also handled by ovn-controller.
• The database creates a new entry when a subnet is created. The ovn-northd service adds
the logical flows for each logical port where DHCP options are defined.
DNS
•Native implementation. Since the version 2.8 OVN contains a built-in DNS implementation
51
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – OVN – L2 and L3 Desgin
Layer 3 (Routing)
• Native support for IPv4 and IPv6
• Distributed
• Flow caching improves performance
• Without OVN: multiple per-packet routing layers
• With OVN: cache sets dest mac, decrements TTL
• No L3 agent
Layer-2 (switching)
• Native implementation. Replaces the conventional Open vSwitch (OVS) agent.
52
Orange Restricted
Texte avec illustration
Demo Time
53
Orange Restricted
Content
Chapter.1 Introducing Software-Defined Networking
Chapter.2 OpenStack Component – Neutron
Networking before Neutron
Why Neutron?
Neutron Basics
Position of Neutron in OpenStack
Neutron Architecture – Plugin concept
Neutron Architecture – with OVS
Neutron Architecture – with OVN
Traffic Flow
DVR
54
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – OVS – Traffic Flow
55
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – OVS – Traffic Flow
56
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – OVS – Traffic Flow
57
Orange Restricted
OpenStack Component – Neutron
Neutron Architecture – OVN – Logical Flows
58
Orange Restricted
Content
Chapter.1 Introducing Software-Defined Networking
Chapter.2 OpenStack Component – Neutron
Networking before Neutron
Why Neutron?
Neutron Basics
Position of Neutron in OpenStack
Neutron Architecture – Plugin concept
Neutron Architecture – with OVS
Neutron Architecture – with OVN
Traffic Flow
DVR
59
Orange Restricted
OpenStack Component – Neutron
DVR
60
Orange Restricted
OpenStack Component – Neutron
DVR-Traffic Flow
61
Orange Restricted
Reference
• https://docs.openstack.org
• Networking Guide Red Hat OpenStack Platform 16.0 | Red Hat Customer Portal
• https://www.openvswitch.org/
• OpenStack Networking by Yves Fauser
• Inside the Architecture of Neutron by Mark McClain
• OpenStack Neutron & Software Defined Networks (SDN) by Iñaki Pascual
• Intro to OpenStack Quantum by Dan Wendlandt
• Neutron L2 and L3 agents by Carl Baldwin, Rossella Sblendido
62
Orange Restricted
Thanks
Moatasem ELMOGY