SlideShare a Scribd company logo
Inside the Architecture of Neutron
Mark McClain

mmcclain (at) yahoo-inc.com
Why Create Neutron?
• Rich Topologies
• Technology Agnostic
• Extensible
• Advance Services Support
• Load Balancing, VPN, Firewall
The Basics
What does the user see?
Compute API
Network API
Storage APIGUI, CLI, API Libs
KVM
ML2 Plugin
Ceph
Abstractions
Net1

10.0.0.0/24
Nova
Neutron
L2 virtual network
virtual port
virtual server
virtual interface (VIF)
virtual subnet
VM1

10.0.0.2
VM2

10.0.0.2
Architecture
Design Goals
• Unified API
• Small Core
• Pluggable Open Architecture
• Extensible
OpenStack The Operator View
Basic Deployment
neutron-server
L2 AgentL2 AgentL2 AgentL2 AgentL2 AgentL2 Agent
L3 AgentL3 Agent
L3 AgentL3 Agent
Database
L3 Agent
DHCP Agent
L2 Agent
Message
Queue
Adv Services
neutron-server
REST API
SERVICE
RPC SERVICE
PLUGIN
REST API
SERVICE
• REST API

• HTTP(S) Python WSGI Application

• Customary TCP port is 9696

• Exposes logical resources

• networks, subnets, ports, etc

• Request/Response Serialization
neutron-server
REST API
SERVICE
RPC SERVICE
PLUGIN
RPC SERVICE
• RPC Service

• AMQP via Oslo messaging modules

• Enables bidirectional agent
communication

• Optional
neutron-server
REST API
SERVICE
RPC SERVICE
PLUGIN
• PLUGIN

• Written in Python

• Only one active

• Must implement V2 API calls

• Optional database access

• Optional extension support
The Plugin
ML2Plugin
core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
The Plugin
NeutronPluginBaseV2
NeutronDbPluginV2
ML2Plugin
core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
Plugin Extensions
• Add logical resources to the REST API
• Discovered by server at startup
• REST: /v2.0/extensions
• Common Extensions
• Binding, DHCP, L3, Provider, Quota, Security Group
• Other Extensions
• Allowed Addresses, Extra Routes, Metering
Monolithic Plugin
• Full implementation of core resources
• Two types:
• Proxy
• Direct control PLUGIN
ML2: Modular Layer 2 Plugin
• Full V2 Plugin Implementation
• Delegates calls to proper L2 drivers
• Two kinds of drivers
• Type Driver
• Mechanism Driver Mech Mgr
PLUGIN
Type Mgr
L2 Agent
L2 Agent
• Runs on hypervisor
• Communicates with server via RPC
• Watch and notify when devices added/removed
• Wires new devices
• Proper network segment
• Security Group Rules
Dive Into the OVS Agent
• OVS
• What does it actually do?
• How do we get isolation?
• VLAN, Overlays: GRE, VXLAN
• Processing loop
Linux Network Namespace
• Isolated copy of network stack
• private loopback
• scope limited to namespace
• can reuse addresses
• Explicit configuration needed to connect
• Processes can spawn within namespace
lo
eth1
eth0
lo
eth1
eth0
lo
eth1
eth0
Host A B
br-int
L3 Agents
Network
Node
L3 Agent
• Run on Network Node
• Uses Namespaces
• Metadata Agent (if enabled)
Network
Node
Core
Hypervisor Hypervisor Hypervisor
L3 Agent How it’s implemented
• Manages Collection of Network Namespaces
• Isolated IP Stacks
• Forwarding Enabled
• net.ipv4.ip_forward=1
• Static Routing
• Metadata Proxy
lo
eth1
eth0
lo
qg-2
qr-1
lo
qg-b
qr-e
Host A B
br-ex
Configuration Agents
Configuration Agents: DHCP
• RPC based notifications
• dnsmasq
• Isolation Support via Network Namespaces
• Multiple copies for HA
Configuration Agents: Metadata Proxy
• Proxies Metadata requests to Nova
• Routed Networks
• process embedded in router
• Non-routed Networks
• static route redirects traffic running in DHCP namespace
Configuration Agents: Metadata Proxy
curl http://168.254.169.254/openstack/latest/meta_data.json
Tenant
VM
Nova
Metadata
Service
Meta NS Proxy
Metadata
Agent
Unix Domain Socket
Management Network
X-Router-Id: 2bc7c882-d612-438c-a334-0047f2b5c2d7
X-Forwarded-For: 10.0.0.1
X-Instance-ID: aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa
Booting a VM
• nova boot
Booting a VM
• nova boot

• create port

• notify DHCP of new port
Booting a VM
• nova boot

• create port

• notify DHCP of new port

• create device

• new in Icehouse wait
Booting a VM
• nova boot

• create port

• notify DHCP of new port

• libvirt create device

• new in Icehouse wait

• wire port
Booting a VM
• nova boot

• create port

• notify DHCP of new port

• libvirt create device

• new in Icehouse wait

• wire port

• boot
Load Balancer as a Service
• Service Plugin
• Driver based
• Agent w/Driver
• Agent communicates over RPC
• Open Source requires namespaces
• Others interact with other systems
LB Agent
HAProxy
VPN as a Service
• Service Plugin
• Driver based
• Agent w/Driver
• Communicates over RPC
• Openswan
L3 Agent
Router
Metadata Proxy
VPN Driver
Firewall as a Service
• Edgewall
• Service Plugin
• Driver based
• Agent w/Driver
• Communicates over RPC
• Experimental
L3 Agent
Router
Metadata Proxy
Firewall Driver
Differences
• Different Design Decisions
• Sync with backend system
• L2 Agent Optional
• Not all implement same extensions
Summary
Open vSwitch / Linux Bridge
Ryu OpenFlow	

Controller
• Unified API

• Small Core

• Pluggable Open Architecture

• Multiple Vendor Support

• Extensible
More Information
• Cloud Administrator Guide
• http://docs.openstack.org/admin-guide-cloud/content/ch_networking.html
• Network v2.0 API
• http://developer.openstack.org/api-ref-networking-v2.html
Questions?

More Related Content

PDF
Open vSwitch 패킷 처리 구조
PDF
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
PDF
QEMU Disk IO Which performs Better: Native or threads?
PDF
Service Function Chaining in Openstack Neutron
PPTX
OpenvSwitch Deep Dive
PDF
20150511 jun lee_openstack neutron 분석 (최종)
PPTX
OpenStackユーザ会資料 - Masakari
PDF
DPDK & Layer 4 Packet Processing
Open vSwitch 패킷 처리 구조
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
QEMU Disk IO Which performs Better: Native or threads?
Service Function Chaining in Openstack Neutron
OpenvSwitch Deep Dive
20150511 jun lee_openstack neutron 분석 (최종)
OpenStackユーザ会資料 - Masakari
DPDK & Layer 4 Packet Processing

What's hot (20)

PDF
[232] 성능어디까지쥐어짜봤니 송태웅
PDF
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
PDF
BPF / XDP 8월 세미나 KossLab
PDF
Ceph Block Devices: A Deep Dive
PDF
SDN입문 (Overlay and Underlay)
PPTX
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
PDF
Kvm performance optimization for ubuntu
PDF
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
PDF
A crash course in CRUSH
PDF
[KubeCon EU 2022] Running containerd and k3s on macOS
PDF
EBPF and Linux Networking
ODP
OpenStack Oslo Messaging RPC API Tutorial Demo Call, Cast and Fanout
PDF
An Introduction to OpenStack
PDF
Exploring the power of OpenTelemetry on Kubernetes
PDF
Alexei Vladishev - Zabbix - Monitoring Solution for Everyone
PDF
[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...
PDF
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
PDF
The linux networking architecture
PPTX
Kubernetes Basics
PDF
Network Automation with Ansible
[232] 성능어디까지쥐어짜봤니 송태웅
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
BPF / XDP 8월 세미나 KossLab
Ceph Block Devices: A Deep Dive
SDN입문 (Overlay and Underlay)
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
Kvm performance optimization for ubuntu
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
A crash course in CRUSH
[KubeCon EU 2022] Running containerd and k3s on macOS
EBPF and Linux Networking
OpenStack Oslo Messaging RPC API Tutorial Demo Call, Cast and Fanout
An Introduction to OpenStack
Exploring the power of OpenTelemetry on Kubernetes
Alexei Vladishev - Zabbix - Monitoring Solution for Everyone
[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
The linux networking architecture
Kubernetes Basics
Network Automation with Ansible
Ad

Similar to Inside Architecture of Neutron (20)

PDF
Open stack networking_101_update_2014
PPTX
OpenStack Networking and Automation
PDF
Bridges and Tunnels: A Drive Through OpenStack Networking
PDF
ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networking
PDF
neutron_icehouse_update
PPTX
Networking in Openstack - Neutron 101
PDF
OpenStack networking (Neutron)
PDF
Network as a Service, Assaf Muller
PPT
Neutrondev ppt
PDF
Agile OpenStack Networking with Cisco Solutions
PDF
Open stack networking_101_part-1
PPTX
Openstack Overview
PPTX
Modular Layer 2 In OpenStack Neutron
PDF
Open stack networking_101_update_2014-os-meetups
PDF
Open Source Backends for OpenStack Neutron
PDF
Open stack networking_101_part-2_tech_deep_dive
PPTX
BRKDCT-2445 Agile OpenStack Networking with Cisco Solutions - Cisco Live! US ...
PDF
Openstack Networking Internals - first part
PPTX
Neutron behind the scenes
PPTX
Openstack Basic with Neutron
Open stack networking_101_update_2014
OpenStack Networking and Automation
Bridges and Tunnels: A Drive Through OpenStack Networking
ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networking
neutron_icehouse_update
Networking in Openstack - Neutron 101
OpenStack networking (Neutron)
Network as a Service, Assaf Muller
Neutrondev ppt
Agile OpenStack Networking with Cisco Solutions
Open stack networking_101_part-1
Openstack Overview
Modular Layer 2 In OpenStack Neutron
Open stack networking_101_update_2014-os-meetups
Open Source Backends for OpenStack Neutron
Open stack networking_101_part-2_tech_deep_dive
BRKDCT-2445 Agile OpenStack Networking with Cisco Solutions - Cisco Live! US ...
Openstack Networking Internals - first part
Neutron behind the scenes
Openstack Basic with Neutron
Ad

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Modernizing your data center with Dell and AMD
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
cuic standard and advanced reporting.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Encapsulation theory and applications.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
A Presentation on Artificial Intelligence
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Electronic commerce courselecture one. Pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Digital-Transformation-Roadmap-for-Companies.pptx
Modernizing your data center with Dell and AMD
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
cuic standard and advanced reporting.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Encapsulation theory and applications.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Machine learning based COVID-19 study performance prediction
Diabetes mellitus diagnosis method based random forest with bat algorithm
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
A Presentation on Artificial Intelligence
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Electronic commerce courselecture one. Pdf

Inside Architecture of Neutron

  • 1. Inside the Architecture of Neutron Mark McClain mmcclain (at) yahoo-inc.com
  • 2. Why Create Neutron? • Rich Topologies • Technology Agnostic • Extensible • Advance Services Support • Load Balancing, VPN, Firewall
  • 4. What does the user see? Compute API Network API Storage APIGUI, CLI, API Libs KVM ML2 Plugin Ceph
  • 5. Abstractions Net1 10.0.0.0/24 Nova Neutron L2 virtual network virtual port virtual server virtual interface (VIF) virtual subnet VM1 10.0.0.2 VM2 10.0.0.2
  • 7. Design Goals • Unified API • Small Core • Pluggable Open Architecture • Extensible
  • 9. Basic Deployment neutron-server L2 AgentL2 AgentL2 AgentL2 AgentL2 AgentL2 Agent L3 AgentL3 Agent L3 AgentL3 Agent Database L3 Agent DHCP Agent L2 Agent Message Queue Adv Services
  • 10. neutron-server REST API SERVICE RPC SERVICE PLUGIN REST API SERVICE • REST API • HTTP(S) Python WSGI Application • Customary TCP port is 9696 • Exposes logical resources • networks, subnets, ports, etc • Request/Response Serialization
  • 11. neutron-server REST API SERVICE RPC SERVICE PLUGIN RPC SERVICE • RPC Service • AMQP via Oslo messaging modules • Enables bidirectional agent communication • Optional
  • 12. neutron-server REST API SERVICE RPC SERVICE PLUGIN • PLUGIN • Written in Python • Only one active • Must implement V2 API calls • Optional database access • Optional extension support
  • 13. The Plugin ML2Plugin core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
  • 15. Plugin Extensions • Add logical resources to the REST API • Discovered by server at startup • REST: /v2.0/extensions • Common Extensions • Binding, DHCP, L3, Provider, Quota, Security Group • Other Extensions • Allowed Addresses, Extra Routes, Metering
  • 16. Monolithic Plugin • Full implementation of core resources • Two types: • Proxy • Direct control PLUGIN
  • 17. ML2: Modular Layer 2 Plugin • Full V2 Plugin Implementation • Delegates calls to proper L2 drivers • Two kinds of drivers • Type Driver • Mechanism Driver Mech Mgr PLUGIN Type Mgr
  • 19. L2 Agent • Runs on hypervisor • Communicates with server via RPC • Watch and notify when devices added/removed • Wires new devices • Proper network segment • Security Group Rules
  • 20. Dive Into the OVS Agent • OVS • What does it actually do? • How do we get isolation? • VLAN, Overlays: GRE, VXLAN • Processing loop
  • 21. Linux Network Namespace • Isolated copy of network stack • private loopback • scope limited to namespace • can reuse addresses • Explicit configuration needed to connect • Processes can spawn within namespace lo eth1 eth0 lo eth1 eth0 lo eth1 eth0 Host A B br-int
  • 23. Network Node L3 Agent • Run on Network Node • Uses Namespaces • Metadata Agent (if enabled) Network Node Core Hypervisor Hypervisor Hypervisor
  • 24. L3 Agent How it’s implemented • Manages Collection of Network Namespaces • Isolated IP Stacks • Forwarding Enabled • net.ipv4.ip_forward=1 • Static Routing • Metadata Proxy lo eth1 eth0 lo qg-2 qr-1 lo qg-b qr-e Host A B br-ex
  • 26. Configuration Agents: DHCP • RPC based notifications • dnsmasq • Isolation Support via Network Namespaces • Multiple copies for HA
  • 27. Configuration Agents: Metadata Proxy • Proxies Metadata requests to Nova • Routed Networks • process embedded in router • Non-routed Networks • static route redirects traffic running in DHCP namespace
  • 28. Configuration Agents: Metadata Proxy curl http://168.254.169.254/openstack/latest/meta_data.json Tenant VM Nova Metadata Service Meta NS Proxy Metadata Agent Unix Domain Socket Management Network X-Router-Id: 2bc7c882-d612-438c-a334-0047f2b5c2d7 X-Forwarded-For: 10.0.0.1 X-Instance-ID: aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa
  • 29. Booting a VM • nova boot
  • 30. Booting a VM • nova boot • create port • notify DHCP of new port
  • 31. Booting a VM • nova boot • create port • notify DHCP of new port • create device • new in Icehouse wait
  • 32. Booting a VM • nova boot • create port • notify DHCP of new port • libvirt create device • new in Icehouse wait • wire port
  • 33. Booting a VM • nova boot • create port • notify DHCP of new port • libvirt create device • new in Icehouse wait • wire port • boot
  • 34. Load Balancer as a Service • Service Plugin • Driver based • Agent w/Driver • Agent communicates over RPC • Open Source requires namespaces • Others interact with other systems LB Agent HAProxy
  • 35. VPN as a Service • Service Plugin • Driver based • Agent w/Driver • Communicates over RPC • Openswan L3 Agent Router Metadata Proxy VPN Driver
  • 36. Firewall as a Service • Edgewall • Service Plugin • Driver based • Agent w/Driver • Communicates over RPC • Experimental L3 Agent Router Metadata Proxy Firewall Driver
  • 37. Differences • Different Design Decisions • Sync with backend system • L2 Agent Optional • Not all implement same extensions
  • 38. Summary Open vSwitch / Linux Bridge Ryu OpenFlow Controller • Unified API • Small Core • Pluggable Open Architecture • Multiple Vendor Support • Extensible
  • 39. More Information • Cloud Administrator Guide • http://docs.openstack.org/admin-guide-cloud/content/ch_networking.html • Network v2.0 API • http://developer.openstack.org/api-ref-networking-v2.html