SlideShare une entreprise Scribd logo
1  sur  20
OpenStack Neutron
SPYRIDON DOSIS SPYRIDON.DOSIS@GMAIL.COM
7TH OPENSTACK USER GROUP NORDICS
Outline
 Neutron Architecture
 Neutron and Linux Networking
 Neutron and OpenvSwitch
 Network Packet Flows
 Distributed Virtual Router
Neutron Overview
 OpenStack’s networking component, networking-as-a-service
Create, configure, manage software-defined networks
First introduced in Havana release, renamed from ‘Quantum’
Pluggable architecture enabling additional services
e.g. load-balancing-as-a-service (LBaaS), VPN-as-a-service (VPNaaS), DNS-as-a-service (DNSaaS)
interface with L2 & L3 hardware, SDN controllers etc.
Neutron in OpenStack
 Neutron uses Keystone (Identity Service) for authenticating / authorizing all API requests
 Integration with Horizon enabling tenants to create networks / subnets and cloud users to
connect instances to tenant / provider networks through virtual NICs
 Interaction with Nova for the required ‘plugging’ of the virtual NICs to the VM instances
Neutron Terminology
 Provider Network
Networks defined in OpenStack that map to the existing data center’s physical network
Support for either flat or VLAN network types
Can be shared among the tenants
 Tenant Network
Networks defined by OpenStack tenants’ users
Support for VLAN and GRE
Route between tenant networks using the L3 agent and the Neutron routers
Image taken from https://developer.rackspace.com/blog/neutron-
networking-the-building-blocks-of-an-openstack-cloud/
A Basic Setup
Image taken from http://docs.openstack.org/havana/install-
guide/install/yum/content/figures/3/a/common/figures/Neutron-
• Demo Setup in VMWare Workstation
• Management Network (10.0.0.0/24)
• 10.0.0.51 controller
• 10.0.0.61 network
• 10.0.0.71 computeA
• 10.0.0.91 compute
• Data Network (10.0.1.0/24)
• 10.0.1.161 network
• 10.0.1.171 computeA
• 10.0.1.191 compute
• External Network (192.168.254.0/24)
• 192.168.254.129 controller
• 192.168.254.131 computeA
• 192.168.254.133 computeC
Tenant Network Features
• Support for Overlapping IPs
• Multiple Tenants having the same internal
subnets (e.g. 192.168.1.0/24) but still
remain isolated
• Configuration
• DHCP / Host routes / DNS name servers
• Metadata (e.g. SSH-key injection)
• Security Groups
• Ingress / Egress Rule Configuration
• Floating IPs (1:1 NAT)
• Support for IPv6
Neutron Component Communication
L2 Agent(s)
L3 / DHCP /
Other Agents
Message
Queue
neutron-
server Database
Neutron Components
 neutron-server
Implements the REST API (v2) calls
Interfaces with other OpenStack services via RPC calls
Database persistence
Translates between API and plugin calls
The plugin implements the core networking (network ports, networks and subnets, IP
addressing etc.)
Either implements directly or proxies to dedicated 3rd party hardware/software solution
ML2 Plugin
A modular framework replacing previous monolithic plugins (openvswitch, linuxbridge)
Network Type Drivers
Flat, GRE , VLAN, VXLAN TypeDrivers
Network Mechanism Drivers
OpenvSwitch , Linuxbridge, Cisco Nexus etc.
Allows multiple mechanisms to be used simultaneously
Open vSwitch
 An open source, software-based virtual switch
Supports distribution across multiple physical servers
 Supports many features
e.g. VLAN,GRE, VXLAN, NetFlow, sFlow, LACP
The OpenvSwitch plugin is loaded by the Neutron service
Receives API calls and stores the corresponding network data in a database backend
The OpenvSwitch agent that runs on each compute node
Reads the database and implements the network model / configures the network flows on the local vSwitch
instance.
GRE (Generic Routing Encapsulation)
 Used to create virtual point-to-point links over IP (L2-in-L3)
 The GRE Header
 It has some benefits over VLANs such as being a routable protocol and not requiring e.g.
802.1Q on physical switches / physical network interfaces
Linux Network Namespaces & Neutron
 The ability to create logical and separate network stacks assigned to group of processes
Each stack has its own routing table, firewall rules, network interfaces
L3 agent creates a network namespace per virtual router and dnsmasq process
Create and attach veth (virtual Ethernet interfaces) to a network namespace
 Connect the network namespaces to physical network interfaces via a bridge (e.g. linuxbridge
or Openvswitch bridge)
A Network Packet Flow through Neutron
Image taken from http://pinrojas.com/2014/07/29/theres-real-magic-
behind-openstack-neutron/
 Packet exits the VM’s ethX interface through a tap
virtual Ethernet interface that connects to a Linux Bridge
where iptables rules are applied.
 ipset optimization
 Connect the Linux Bridge with the OpenvSwitch br-int
using a veth pair (qvb & qvo) – VLAN tagging at br-int
 Pass traffic to br-tun through patch interfaces
 Reach network node through the GRE tunnel
 Pass traffic to br-int (network node) through patch
interfaces
 Deliver to virtual router and then exit though br-ex
Neutron @ Juno
 Distributed Virtual Router – DVR
 “router_distributed” configuration under neutron.conf
 agent_mode= dvr_snat for network node
 agent_mode = dvr for compute node(s)
 Need for l2population mechanism
 Compute node(s) connects to provider network
 SNAT still centralized for VMs without floating IPs
Neutron @ Juno
 North-South (floating IP)
DNAT per compute node when floatingIP is in use
Default route via FIP-NS
Point-to-point link between the router and the FIP namespaces
Proxy-ARP for floating IPs on br-ex
East-West traffic (tenant subnet-to-subnet)
 DVR router with the same IP and MAC address at each compute host
 Local DVR router maintains ARP cache of all the subnet hosts
 Avoid communication through the central L3 agent or ARP broadcasts
References
 http://docs.openstack.org/juno/install-guide/install/apt/content/section_neutron-networking.html
 http://pinrojas.com/2014/07/29/theres-real-magic-behind-openstack-neutron/
 http://www.slideshare.net/carlbaldwin/dvr-slides
 http://superuser.openstack.org/articles/bridges-and-tunnels-a-drive-through-openstack-networking
 http://docs.openstack.org/admin-guide-cloud/content/ch_networking.html
 https://www.openstack.org/summit/openstack-summit-hong-kong-2013/session-
videos/presentation/openstack-neutron-modular-layer-2-plugin-deep-dive
 https://openstack.redhat.com/Networking_in_too_much_detail
 http://www.slideshare.net/carlbaldwin/dvr-slides
http://kimizhang.wordpress.com/2014/11/25/building-redundant-and-distributed-l3-network-in-
juno
Thank You!
Appendix – Useful Commands
ps aux | grep ovs - Show running OpenvSwitch processes
virsh list -- Show running KVM instances
virsh dumpxml instance-XXXX | less -- Show KVM instance configuration
brctl show -- Show linux bridges and their connected interfaces
ipset list -- View the ipset defined
ethtool -S qvbXXXX - Print the interface index of the veth's peer
ip link list | grep ^XX - Print the veth's peer interface
ovs-vsctl list-br - Lists existing OVS bridges
ovs-vsctl list-ports br-int - Lists ports per OVS bridge
Appendix – Useful Commands
ovs-vsctl show - Brief overview of the database contents
ovs-ofctl show br-tun -- Switch information such as flow tables and ports
ovs-ofctl dump-flows br-tun -- Flows
ip netns ls - List network namespaces
ip netns exec $ROUTER1 ip addr - Network interfaces for a specific network
namespace
ip netns exec $ROUTER1 ip route - Routing table for a specific network
namespace
ip netns exec $ROUTER1 iptables -t nat - IP tables NAT rules for a specific network
namespace

Contenu connexe

Tendances

Openstack Neutron and SDN
Openstack Neutron and SDNOpenstack Neutron and SDN
Openstack Neutron and SDN
inakipascual
 

Tendances (20)

Inside Architecture of Neutron
Inside Architecture of NeutronInside Architecture of Neutron
Inside Architecture of Neutron
 
ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networking
ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack NetworkingONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networking
ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networking
 
Navigating OpenStack Networking
Navigating OpenStack NetworkingNavigating OpenStack Networking
Navigating OpenStack Networking
 
Linux Tag 2014 OpenStack Networking
Linux Tag 2014 OpenStack NetworkingLinux Tag 2014 OpenStack Networking
Linux Tag 2014 OpenStack Networking
 
Open Source Backends for OpenStack Neutron
Open Source Backends for OpenStack NeutronOpen Source Backends for OpenStack Neutron
Open Source Backends for OpenStack Neutron
 
Quantum (OpenStack Meetup Feb 9th, 2012)
Quantum (OpenStack Meetup Feb 9th, 2012)Quantum (OpenStack Meetup Feb 9th, 2012)
Quantum (OpenStack Meetup Feb 9th, 2012)
 
Network virtualization with open stack quantum
Network virtualization with open stack quantumNetwork virtualization with open stack quantum
Network virtualization with open stack quantum
 
OpenStack Neutron Advanced Services by Akanda
OpenStack Neutron Advanced Services by AkandaOpenStack Neutron Advanced Services by Akanda
OpenStack Neutron Advanced Services by Akanda
 
Training open stack networking -neutron
Training open stack networking -neutronTraining open stack networking -neutron
Training open stack networking -neutron
 
Introduction to Openstack Network
Introduction to Openstack NetworkIntroduction to Openstack Network
Introduction to Openstack Network
 
Neutron high availability open stack architecture openstack israel event 2015
Neutron high availability  open stack architecture   openstack israel event 2015Neutron high availability  open stack architecture   openstack israel event 2015
Neutron high availability open stack architecture openstack israel event 2015
 
OpenStack Neutron Tutorial
OpenStack Neutron TutorialOpenStack Neutron Tutorial
OpenStack Neutron Tutorial
 
Whats new in neutron for open stack havana
Whats new in neutron for open stack havanaWhats new in neutron for open stack havana
Whats new in neutron for open stack havana
 
Openstack Neutron and SDN
Openstack Neutron and SDNOpenstack Neutron and SDN
Openstack Neutron and SDN
 
OpenStack networking - Neutron deep dive with PLUMgrid
OpenStack networking - Neutron deep dive with PLUMgridOpenStack networking - Neutron deep dive with PLUMgrid
OpenStack networking - Neutron deep dive with PLUMgrid
 
An Introduction to OpenStack Networking
An Introduction to OpenStack NetworkingAn Introduction to OpenStack Networking
An Introduction to OpenStack Networking
 
How to write a Neutron Plugin - if you really need to
How to write a Neutron Plugin - if you really need toHow to write a Neutron Plugin - if you really need to
How to write a Neutron Plugin - if you really need to
 
OpenStack Neutron Havana Overview - Oct 2013
OpenStack Neutron Havana Overview - Oct 2013OpenStack Neutron Havana Overview - Oct 2013
OpenStack Neutron Havana Overview - Oct 2013
 
Quantum - Virtual networks for Openstack
Quantum - Virtual networks for OpenstackQuantum - Virtual networks for Openstack
Quantum - Virtual networks for Openstack
 
Open stack networking_101_update_2014-os-meetups
Open stack networking_101_update_2014-os-meetupsOpen stack networking_101_update_2014-os-meetups
Open stack networking_101_update_2014-os-meetups
 

Similaire à Neutron behind the scenes

Similaire à Neutron behind the scenes (20)

neutron_icehouse_update
neutron_icehouse_updateneutron_icehouse_update
neutron_icehouse_update
 
CloudComp 2015 - SDN-Cloud Testbed with Hyper-convergent SmartX Boxes
CloudComp 2015 - SDN-Cloud Testbed with Hyper-convergent SmartX BoxesCloudComp 2015 - SDN-Cloud Testbed with Hyper-convergent SmartX Boxes
CloudComp 2015 - SDN-Cloud Testbed with Hyper-convergent SmartX Boxes
 
Openstack Workshop (Networking/Storage)
Openstack Workshop (Networking/Storage)Openstack Workshop (Networking/Storage)
Openstack Workshop (Networking/Storage)
 
Openstack Networking Internals - first part
Openstack Networking Internals - first partOpenstack Networking Internals - first part
Openstack Networking Internals - first part
 
7 - Introduction to OpenStack & SDN by Ady Saputra
7 - Introduction to OpenStack & SDN by Ady Saputra7 - Introduction to OpenStack & SDN by Ady Saputra
7 - Introduction to OpenStack & SDN by Ady Saputra
 
CloudStack and SDN
CloudStack and SDNCloudStack and SDN
CloudStack and SDN
 
Networking in Openstack - Neutron 101
Networking in Openstack - Neutron 101Networking in Openstack - Neutron 101
Networking in Openstack - Neutron 101
 
OpenStack and OpenDaylight Workshop: ONUG Spring 2014
OpenStack and OpenDaylight Workshop: ONUG Spring 2014OpenStack and OpenDaylight Workshop: ONUG Spring 2014
OpenStack and OpenDaylight Workshop: ONUG Spring 2014
 
Openstack Neutron Insights
Openstack Neutron InsightsOpenstack Neutron Insights
Openstack Neutron Insights
 
OpenStack sdn
OpenStack sdnOpenStack sdn
OpenStack sdn
 
Osnug meetup-tungsten fabric - overview.pptx
Osnug meetup-tungsten fabric - overview.pptxOsnug meetup-tungsten fabric - overview.pptx
Osnug meetup-tungsten fabric - overview.pptx
 
Intro to OpenStack Astara (Spring '16)
Intro to OpenStack Astara (Spring '16)Intro to OpenStack Astara (Spring '16)
Intro to OpenStack Astara (Spring '16)
 
Cloud computing and OpenStack
Cloud computing and OpenStackCloud computing and OpenStack
Cloud computing and OpenStack
 
An Introduce of OPNFV (Open Platform for NFV)
An Introduce of OPNFV (Open Platform for NFV)An Introduce of OPNFV (Open Platform for NFV)
An Introduce of OPNFV (Open Platform for NFV)
 
Midokura OpenStack Day Korea Talk: MidoNet Open Source Network Virtualization...
Midokura OpenStack Day Korea Talk: MidoNet Open Source Network Virtualization...Midokura OpenStack Day Korea Talk: MidoNet Open Source Network Virtualization...
Midokura OpenStack Day Korea Talk: MidoNet Open Source Network Virtualization...
 
VMworld 2013: Deploying VMware NSX Network Virtualization
VMworld 2013: Deploying VMware NSX Network Virtualization VMworld 2013: Deploying VMware NSX Network Virtualization
VMworld 2013: Deploying VMware NSX Network Virtualization
 
OpenStack SDN
OpenStack SDNOpenStack SDN
OpenStack SDN
 
OpenVirtex (OVX) Tutorial
OpenVirtex (OVX) TutorialOpenVirtex (OVX) Tutorial
OpenVirtex (OVX) Tutorial
 
OpenFlow tutorial
OpenFlow tutorialOpenFlow tutorial
OpenFlow tutorial
 
SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014
SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014
SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014
 

Dernier

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Neutron behind the scenes

  • 1. OpenStack Neutron SPYRIDON DOSIS SPYRIDON.DOSIS@GMAIL.COM 7TH OPENSTACK USER GROUP NORDICS
  • 2. Outline  Neutron Architecture  Neutron and Linux Networking  Neutron and OpenvSwitch  Network Packet Flows  Distributed Virtual Router
  • 3. Neutron Overview  OpenStack’s networking component, networking-as-a-service Create, configure, manage software-defined networks First introduced in Havana release, renamed from ‘Quantum’ Pluggable architecture enabling additional services e.g. load-balancing-as-a-service (LBaaS), VPN-as-a-service (VPNaaS), DNS-as-a-service (DNSaaS) interface with L2 & L3 hardware, SDN controllers etc.
  • 4. Neutron in OpenStack  Neutron uses Keystone (Identity Service) for authenticating / authorizing all API requests  Integration with Horizon enabling tenants to create networks / subnets and cloud users to connect instances to tenant / provider networks through virtual NICs  Interaction with Nova for the required ‘plugging’ of the virtual NICs to the VM instances
  • 5. Neutron Terminology  Provider Network Networks defined in OpenStack that map to the existing data center’s physical network Support for either flat or VLAN network types Can be shared among the tenants  Tenant Network Networks defined by OpenStack tenants’ users Support for VLAN and GRE Route between tenant networks using the L3 agent and the Neutron routers Image taken from https://developer.rackspace.com/blog/neutron- networking-the-building-blocks-of-an-openstack-cloud/
  • 6. A Basic Setup Image taken from http://docs.openstack.org/havana/install- guide/install/yum/content/figures/3/a/common/figures/Neutron- • Demo Setup in VMWare Workstation • Management Network (10.0.0.0/24) • 10.0.0.51 controller • 10.0.0.61 network • 10.0.0.71 computeA • 10.0.0.91 compute • Data Network (10.0.1.0/24) • 10.0.1.161 network • 10.0.1.171 computeA • 10.0.1.191 compute • External Network (192.168.254.0/24) • 192.168.254.129 controller • 192.168.254.131 computeA • 192.168.254.133 computeC
  • 7. Tenant Network Features • Support for Overlapping IPs • Multiple Tenants having the same internal subnets (e.g. 192.168.1.0/24) but still remain isolated • Configuration • DHCP / Host routes / DNS name servers • Metadata (e.g. SSH-key injection) • Security Groups • Ingress / Egress Rule Configuration • Floating IPs (1:1 NAT) • Support for IPv6
  • 8. Neutron Component Communication L2 Agent(s) L3 / DHCP / Other Agents Message Queue neutron- server Database
  • 9. Neutron Components  neutron-server Implements the REST API (v2) calls Interfaces with other OpenStack services via RPC calls Database persistence Translates between API and plugin calls The plugin implements the core networking (network ports, networks and subnets, IP addressing etc.) Either implements directly or proxies to dedicated 3rd party hardware/software solution
  • 10. ML2 Plugin A modular framework replacing previous monolithic plugins (openvswitch, linuxbridge) Network Type Drivers Flat, GRE , VLAN, VXLAN TypeDrivers Network Mechanism Drivers OpenvSwitch , Linuxbridge, Cisco Nexus etc. Allows multiple mechanisms to be used simultaneously
  • 11. Open vSwitch  An open source, software-based virtual switch Supports distribution across multiple physical servers  Supports many features e.g. VLAN,GRE, VXLAN, NetFlow, sFlow, LACP The OpenvSwitch plugin is loaded by the Neutron service Receives API calls and stores the corresponding network data in a database backend The OpenvSwitch agent that runs on each compute node Reads the database and implements the network model / configures the network flows on the local vSwitch instance.
  • 12. GRE (Generic Routing Encapsulation)  Used to create virtual point-to-point links over IP (L2-in-L3)  The GRE Header  It has some benefits over VLANs such as being a routable protocol and not requiring e.g. 802.1Q on physical switches / physical network interfaces
  • 13. Linux Network Namespaces & Neutron  The ability to create logical and separate network stacks assigned to group of processes Each stack has its own routing table, firewall rules, network interfaces L3 agent creates a network namespace per virtual router and dnsmasq process Create and attach veth (virtual Ethernet interfaces) to a network namespace  Connect the network namespaces to physical network interfaces via a bridge (e.g. linuxbridge or Openvswitch bridge)
  • 14. A Network Packet Flow through Neutron Image taken from http://pinrojas.com/2014/07/29/theres-real-magic- behind-openstack-neutron/  Packet exits the VM’s ethX interface through a tap virtual Ethernet interface that connects to a Linux Bridge where iptables rules are applied.  ipset optimization  Connect the Linux Bridge with the OpenvSwitch br-int using a veth pair (qvb & qvo) – VLAN tagging at br-int  Pass traffic to br-tun through patch interfaces  Reach network node through the GRE tunnel  Pass traffic to br-int (network node) through patch interfaces  Deliver to virtual router and then exit though br-ex
  • 15. Neutron @ Juno  Distributed Virtual Router – DVR  “router_distributed” configuration under neutron.conf  agent_mode= dvr_snat for network node  agent_mode = dvr for compute node(s)  Need for l2population mechanism  Compute node(s) connects to provider network  SNAT still centralized for VMs without floating IPs
  • 16. Neutron @ Juno  North-South (floating IP) DNAT per compute node when floatingIP is in use Default route via FIP-NS Point-to-point link between the router and the FIP namespaces Proxy-ARP for floating IPs on br-ex East-West traffic (tenant subnet-to-subnet)  DVR router with the same IP and MAC address at each compute host  Local DVR router maintains ARP cache of all the subnet hosts  Avoid communication through the central L3 agent or ARP broadcasts
  • 17. References  http://docs.openstack.org/juno/install-guide/install/apt/content/section_neutron-networking.html  http://pinrojas.com/2014/07/29/theres-real-magic-behind-openstack-neutron/  http://www.slideshare.net/carlbaldwin/dvr-slides  http://superuser.openstack.org/articles/bridges-and-tunnels-a-drive-through-openstack-networking  http://docs.openstack.org/admin-guide-cloud/content/ch_networking.html  https://www.openstack.org/summit/openstack-summit-hong-kong-2013/session- videos/presentation/openstack-neutron-modular-layer-2-plugin-deep-dive  https://openstack.redhat.com/Networking_in_too_much_detail  http://www.slideshare.net/carlbaldwin/dvr-slides http://kimizhang.wordpress.com/2014/11/25/building-redundant-and-distributed-l3-network-in- juno
  • 19. Appendix – Useful Commands ps aux | grep ovs - Show running OpenvSwitch processes virsh list -- Show running KVM instances virsh dumpxml instance-XXXX | less -- Show KVM instance configuration brctl show -- Show linux bridges and their connected interfaces ipset list -- View the ipset defined ethtool -S qvbXXXX - Print the interface index of the veth's peer ip link list | grep ^XX - Print the veth's peer interface ovs-vsctl list-br - Lists existing OVS bridges ovs-vsctl list-ports br-int - Lists ports per OVS bridge
  • 20. Appendix – Useful Commands ovs-vsctl show - Brief overview of the database contents ovs-ofctl show br-tun -- Switch information such as flow tables and ports ovs-ofctl dump-flows br-tun -- Flows ip netns ls - List network namespaces ip netns exec $ROUTER1 ip addr - Network interfaces for a specific network namespace ip netns exec $ROUTER1 ip route - Routing table for a specific network namespace ip netns exec $ROUTER1 iptables -t nat - IP tables NAT rules for a specific network namespace