SlideShare a Scribd company logo
Developing production
OpenFlow controller with Trema
Apr. 20, 2013
Yasunobu Chiba
Part-time developer, Trema Project
Copyright (C) 2013 NEC Corporation
Agenda
• Provide tips and typical mistakes when
developing OpenFlow controller with Trema C
library
• Explain a production OpenFlow controller
development use case
Copyright (C) 2013 NEC Corporation
THINGS TO KNOW ABOUT OPENFLOW
AND TREMA BEFORE DEVELOPING
OPENFLOW CONTROLLER
Copyright (C) 2013 NEC Corporation
Trema is not an OpenFlow controller
• Trema is a programming framework and just a
building block for implementing OpenFlow
controllers
• You may use any other building blocks as well
as Trema
– For high availability, scalability, network protocol
support, and etc.
Copyright (C) 2013 NEC Corporation
OpenFlow switch is not a database
• OpenFlow switch is not a database and does not
have ACID properties
• Error messages are returned from switch
asynchronously
• Send a Barrier Request to complete a previously
sent Flow Mod (or any other) operation
• See and reuse Transaction Manager:
– https://github.com/trema/apps/tree/master/transacti
on_manager
Copyright (C) 2013 NEC Corporation
Asynchronous events happen before
features request/reply exchange
• You may receive asynchronous OpenFlow
events such as Packet-In from unknown
switches that features reply has not been
received
• In Trema, Switch Ready event is triggered
when a features reply is received
Copyright (C) 2013 NEC Corporation
send_openflow_message() does not
send message actually
• send_openflow_message() just pushes a given
message to an appropriate send queue
• The send queue is automatically flushed inside
the main loop
• Message ordering is NOT guaranteed among
switches
Copyright (C) 2013 NEC Corporation
libtrema is not fully thread-safe
• The followings may be thread-safe but not
guaranteed for all functions
– buffer, doubly linked list, hash, linked list, log,
match table, OpenFlow message, packet info,
packet parser, stat, utility, wrapper
• OpenFlow application interface is NOT thread-
safe
• Call send_openflow_message() from the main
thread that trema_run() is running
Copyright (C) 2013 NEC Corporation
Length of send queue is limited
• The maximum length of send queue (for
sending OpenFlow messages) is limited and
fixed
• send_openflow_message() may return false if
the send queue is full
Copyright (C) 2013 NEC Corporation
Do not call flush_messenger()
• flush_messenger() flushes all send queues and
receive queues immediately and
synchronously
• Calling it in an OpenFlow event handler may
recursively call the event handler!
• Call only if you known how it works very well
Copyright (C) 2013 NEC Corporation
start_trema() may call fork(2)
• start_trema() calls fork(2) if your controller is
to be daemonized
• Use caution if you call functions that may be
affected by fork(2)
Copyright (C) 2013 NEC Corporation
CONTROLLER DEVELOPMENT USE
CASE
Copyright (C) 2013 NEC Corporation
Requirements
• Functional Requirements
– Manage association among virtual networks (based
on non-OpenFlow technology) and switch ports
– Associate a switch port with MAC addresses located
on the switch port
– All operations above can be done via REST interface
• Non-functional Requirements
– 1K+ switches must be handled
– 10K+ active virtual networks must be managed
– 10K+ end hosts must be connected to virtual networks
Copyright (C) 2013 NEC Corporation
Requirements – cont’d
Copyright (C) 2013 NEC Corporation
Switch #1 Switch #2 Switch #3 Switch #X
Virtual Network #N
Virtual Network #2
Virtual Network #1
10,000+ Active
Virtual Networks
1,000+ Switches
10,000+ End Hosts
Physical Network
Virtual Networks
Design
• Load balancer + three-tiered architecture + α
Copyright (C) 2013 NEC Corporation
Dispatcher
(Load Balancer)
Worker
Worker
Worker
Backend
Database
Configuration
Interface
External Application
OpenFlow Switch
REST
OpenFlow
+ REST
OpenFlow
+ REST
Implementation
Copyright (C) 2013 NEC Corporation
REST I/FController Cluster
OpenFlow Load Balancer (LVS)
Virtual Network Manager Virtual Network Manager Virtual Network Manager
Configuration Frontend Configuration Frontend Configuration Frontend
REST Interface Load Balancer (LVS)
Backend DB (MySQL)
Watchdog
Trema Trema Trema
OpenFlow
Virtual Network
Agent
REST
VM
Legacy
Network
OpenFlow Switch
REST OpenFlow
VXLAN Tunnel End-Point
Virtual Networks
Legacy L2/L3 Network
VM
Legacy
Network
Virtual Network
Agent
OpenFlow Switch
VXLAN Tunnel End-Point
Evaluation setup
Copyright (C) 2013 NEC Corporation
Vnet Manager
+ Config.
Frontend
#1
Vnet Manager
+ Config.
Frontend
#2
Vnet Manager
+ Config.
Frontend
#N
Backend DB
Load
Balancer
eth0 eth0 eth0 eth0
eth1 eth2 eth2 eth2 eth2
Database Network192.168.17.0/24
192.168.16.1 192.168.16.2 192.168.16.N
192.168.48.16
192.168.17.64 192.168.17.1 192.168.17.2 192.168.17.N 192.168.16.254
eth1
80/tcp
6633/tcp
REST Client
eth1 eth1 eth1
InternalControlNetwork192.168.16.0/24
192.168.64.17 192.168.64.18 192.168.64.19 192.168.64.16
eth0
ManagementNetwork192.168.64.0/20
192.168.64.(17+N)
ControlandData Network192.168.48.0/20
eth0 - 192.168.65.1
VXLAN TEP
Vnet
Agent
VM Host #1
Open vSwitch
hp001
sp001
eth1 - 192.168.49.1
hp128
sp128
hp002
sp002
eth0 - 192.168.65.N
VXLAN TEP
Vnet
Agent
VM Host #N
Open vSwitch
hp001
sp001
eth1 - 192.168.49.N
hp128
sp128
hp002
sp002
192.168.63.253
Evaluation items and results
• # of switches that can be managed
– 410 - 412 switches per a single Virtual Network
Manager were connected and initialized properly
• Switch daemons were not able to run due to
insufficient memory (system memory was 2 GB)
– 1024 switches were connected and initialized with
three Virtual Network Managers
Copyright (C) 2013 NEC Corporation
Evaluation items and results
• # of virtual networks that can be managed
– 16384 virtual networks that have 8 ports (hosts)
each were successfully created with 1024 switches
and three Virtual Network Managers
• Virtual network setup time
– Setup time did not increase even if we have a
number of virtual networks
– Database access time was constant and a minor
factor
Copyright (C) 2013 NEC Corporation
To be continued…
Copyright (C) 2013 NEC Corporation

More Related Content

What's hot

Ieee 1588 ptp
Ieee 1588 ptpIeee 1588 ptp
Ieee 1588 ptp
Tasuka Hsu
 
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/NeutronOverview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
vivekkonnect
 
IEEE1588-v2
IEEE1588-v2IEEE1588-v2
IEEE1588-v2
Guider Lee
 
Real time data processing with kafla spark integration
Real time data processing with kafla spark integrationReal time data processing with kafla spark integration
Real time data processing with kafla spark integration
TCS
 
LF_DPDK17_Implementation and Testing of Soft Patch Panel
LF_DPDK17_Implementation and Testing of Soft Patch PanelLF_DPDK17_Implementation and Testing of Soft Patch Panel
LF_DPDK17_Implementation and Testing of Soft Patch Panel
LF_DPDK
 
Troubleshooting Tracebacks
Troubleshooting TracebacksTroubleshooting Tracebacks
Troubleshooting Tracebacks
James Denton
 
TLDK - FD.io Sept 2016
TLDK - FD.io Sept 2016 TLDK - FD.io Sept 2016
TLDK - FD.io Sept 2016
Benoit Hudzia
 
Pipeline Mechanism
Pipeline MechanismPipeline Mechanism
Pipeline Mechanism
Ashik Iqbal
 
Userspace networking
Userspace networkingUserspace networking
Userspace networking
Stephen Hemminger
 
Interface between kernel and user space
Interface between kernel and user spaceInterface between kernel and user space
Interface between kernel and user space
Susant Sahani
 
Integrating Active Networking and Commercial-Grade Routing Platforms
Integrating Active Networking and Commercial-Grade Routing PlatformsIntegrating Active Networking and Commercial-Grade Routing Platforms
Integrating Active Networking and Commercial-Grade Routing Platforms
Tal Lavian Ph.D.
 
FD.io - The Universal Dataplane
FD.io - The Universal DataplaneFD.io - The Universal Dataplane
FD.io - The Universal Dataplane
Open Networking Summit
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)
Andriy Berestovskyy
 
Precision Time Protocol
Precision Time ProtocolPrecision Time Protocol
Precision Time Protocol
Steven Kreuzer
 
rtnetlink
rtnetlinkrtnetlink
rtnetlink
Taku Fukushima
 
pipelining and hazards occure in assembly language.
pipelining and hazards occure in assembly language.pipelining and hazards occure in assembly language.
pipelining and hazards occure in assembly language.
Zohaib Arshid
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Adam Dunkels
 
Danger of Proxy ARP in IX environment
Danger of Proxy ARP in IX environmentDanger of Proxy ARP in IX environment
Danger of Proxy ARP in IX environment
Maksym Tulyuk
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Adam Dunkels
 
Concept of Pipelining
Concept of PipeliningConcept of Pipelining
Concept of Pipelining
SHAKOOR AB
 

What's hot (20)

Ieee 1588 ptp
Ieee 1588 ptpIeee 1588 ptp
Ieee 1588 ptp
 
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/NeutronOverview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
 
IEEE1588-v2
IEEE1588-v2IEEE1588-v2
IEEE1588-v2
 
Real time data processing with kafla spark integration
Real time data processing with kafla spark integrationReal time data processing with kafla spark integration
Real time data processing with kafla spark integration
 
LF_DPDK17_Implementation and Testing of Soft Patch Panel
LF_DPDK17_Implementation and Testing of Soft Patch PanelLF_DPDK17_Implementation and Testing of Soft Patch Panel
LF_DPDK17_Implementation and Testing of Soft Patch Panel
 
Troubleshooting Tracebacks
Troubleshooting TracebacksTroubleshooting Tracebacks
Troubleshooting Tracebacks
 
TLDK - FD.io Sept 2016
TLDK - FD.io Sept 2016 TLDK - FD.io Sept 2016
TLDK - FD.io Sept 2016
 
Pipeline Mechanism
Pipeline MechanismPipeline Mechanism
Pipeline Mechanism
 
Userspace networking
Userspace networkingUserspace networking
Userspace networking
 
Interface between kernel and user space
Interface between kernel and user spaceInterface between kernel and user space
Interface between kernel and user space
 
Integrating Active Networking and Commercial-Grade Routing Platforms
Integrating Active Networking and Commercial-Grade Routing PlatformsIntegrating Active Networking and Commercial-Grade Routing Platforms
Integrating Active Networking and Commercial-Grade Routing Platforms
 
FD.io - The Universal Dataplane
FD.io - The Universal DataplaneFD.io - The Universal Dataplane
FD.io - The Universal Dataplane
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)
 
Precision Time Protocol
Precision Time ProtocolPrecision Time Protocol
Precision Time Protocol
 
rtnetlink
rtnetlinkrtnetlink
rtnetlink
 
pipelining and hazards occure in assembly language.
pipelining and hazards occure in assembly language.pipelining and hazards occure in assembly language.
pipelining and hazards occure in assembly language.
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
Danger of Proxy ARP in IX environment
Danger of Proxy ARP in IX environmentDanger of Proxy ARP in IX environment
Danger of Proxy ARP in IX environment
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
Concept of Pipelining
Concept of PipeliningConcept of Pipelining
Concept of Pipelining
 

Similar to Developing production OpenFlow controller with Trema

Mr201304 open flow_security_eng
Mr201304 open flow_security_engMr201304 open flow_security_eng
Mr201304 open flow_security_eng
FFRI, Inc.
 
SDN Controller - Programming Challenges
SDN Controller - Programming ChallengesSDN Controller - Programming Challenges
SDN Controller - Programming Challenges
snrism
 
OpenStack Neutron Dragonflow l3 SDNmeetup
OpenStack Neutron Dragonflow l3 SDNmeetupOpenStack Neutron Dragonflow l3 SDNmeetup
OpenStack Neutron Dragonflow l3 SDNmeetup
Eran Gampel
 
Tempest scenariotests 20140512
Tempest scenariotests 20140512Tempest scenariotests 20140512
Tempest scenariotests 20140512
Masayuki Igawa
 
Introduction to Software Defined Networking (SDN) presentation by Warren Finc...
Introduction to Software Defined Networking (SDN) presentation by Warren Finc...Introduction to Software Defined Networking (SDN) presentation by Warren Finc...
Introduction to Software Defined Networking (SDN) presentation by Warren Finc...
APNIC
 
Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)
Bangladesh Network Operators Group
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium
Julien Vermillard
 
btNOG 9 presentation Introduction to Software Defined Networking
btNOG 9 presentation Introduction to Software Defined NetworkingbtNOG 9 presentation Introduction to Software Defined Networking
btNOG 9 presentation Introduction to Software Defined Networking
APNIC
 
Ebs performance tuning session feb 13 2013---Presented by Oracle
Ebs performance tuning session  feb 13 2013---Presented by OracleEbs performance tuning session  feb 13 2013---Presented by Oracle
Ebs performance tuning session feb 13 2013---Presented by Oracle
Akash Pramanik
 
Osdc2014 openstack networking yves_fauser
Osdc2014 openstack networking yves_fauserOsdc2014 openstack networking yves_fauser
Osdc2014 openstack networking yves_fauser
yfauser
 
OSDC 2014: Yves Fauser - OpenStack Networking (Neutron) - Overview of network...
OSDC 2014: Yves Fauser - OpenStack Networking (Neutron) - Overview of network...OSDC 2014: Yves Fauser - OpenStack Networking (Neutron) - Overview of network...
OSDC 2014: Yves Fauser - OpenStack Networking (Neutron) - Overview of network...
NETWAYS
 
Container Orchestration from Theory to Practice
Container Orchestration from Theory to PracticeContainer Orchestration from Theory to Practice
Container Orchestration from Theory to Practice
Docker, Inc.
 
CampusSDN2017 - Jawdat: SDN Technology Evolvement
CampusSDN2017 - Jawdat: SDN Technology EvolvementCampusSDN2017 - Jawdat: SDN Technology Evolvement
CampusSDN2017 - Jawdat: SDN Technology Evolvement
JawdatTI
 
Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Services
mattjive
 
Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...
Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...
Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...
GetInData
 
ECI OpenFlow 2.0 the Future of SDN
ECI OpenFlow 2.0 the Future of SDN ECI OpenFlow 2.0 the Future of SDN
ECI OpenFlow 2.0 the Future of SDN
ECI – THE ELASTIC NETWORK™
 
Introduction to Apache Apex
Introduction to Apache ApexIntroduction to Apache Apex
Introduction to Apache Apex
Apache Apex
 
FlowER Erlang Openflow Controller
FlowER Erlang Openflow ControllerFlowER Erlang Openflow Controller
FlowER Erlang Openflow Controller
Holger Winkelmann
 
Container orchestration from theory to practice
Container orchestration from theory to practiceContainer orchestration from theory to practice
Container orchestration from theory to practice
Docker, Inc.
 
Implementing MPLS Services using Openflow
Implementing MPLS Services using OpenflowImplementing MPLS Services using Openflow
Implementing MPLS Services using Openflow
APNIC
 

Similar to Developing production OpenFlow controller with Trema (20)

Mr201304 open flow_security_eng
Mr201304 open flow_security_engMr201304 open flow_security_eng
Mr201304 open flow_security_eng
 
SDN Controller - Programming Challenges
SDN Controller - Programming ChallengesSDN Controller - Programming Challenges
SDN Controller - Programming Challenges
 
OpenStack Neutron Dragonflow l3 SDNmeetup
OpenStack Neutron Dragonflow l3 SDNmeetupOpenStack Neutron Dragonflow l3 SDNmeetup
OpenStack Neutron Dragonflow l3 SDNmeetup
 
Tempest scenariotests 20140512
Tempest scenariotests 20140512Tempest scenariotests 20140512
Tempest scenariotests 20140512
 
Introduction to Software Defined Networking (SDN) presentation by Warren Finc...
Introduction to Software Defined Networking (SDN) presentation by Warren Finc...Introduction to Software Defined Networking (SDN) presentation by Warren Finc...
Introduction to Software Defined Networking (SDN) presentation by Warren Finc...
 
Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium
 
btNOG 9 presentation Introduction to Software Defined Networking
btNOG 9 presentation Introduction to Software Defined NetworkingbtNOG 9 presentation Introduction to Software Defined Networking
btNOG 9 presentation Introduction to Software Defined Networking
 
Ebs performance tuning session feb 13 2013---Presented by Oracle
Ebs performance tuning session  feb 13 2013---Presented by OracleEbs performance tuning session  feb 13 2013---Presented by Oracle
Ebs performance tuning session feb 13 2013---Presented by Oracle
 
Osdc2014 openstack networking yves_fauser
Osdc2014 openstack networking yves_fauserOsdc2014 openstack networking yves_fauser
Osdc2014 openstack networking yves_fauser
 
OSDC 2014: Yves Fauser - OpenStack Networking (Neutron) - Overview of network...
OSDC 2014: Yves Fauser - OpenStack Networking (Neutron) - Overview of network...OSDC 2014: Yves Fauser - OpenStack Networking (Neutron) - Overview of network...
OSDC 2014: Yves Fauser - OpenStack Networking (Neutron) - Overview of network...
 
Container Orchestration from Theory to Practice
Container Orchestration from Theory to PracticeContainer Orchestration from Theory to Practice
Container Orchestration from Theory to Practice
 
CampusSDN2017 - Jawdat: SDN Technology Evolvement
CampusSDN2017 - Jawdat: SDN Technology EvolvementCampusSDN2017 - Jawdat: SDN Technology Evolvement
CampusSDN2017 - Jawdat: SDN Technology Evolvement
 
Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Services
 
Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...
Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...
Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...
 
ECI OpenFlow 2.0 the Future of SDN
ECI OpenFlow 2.0 the Future of SDN ECI OpenFlow 2.0 the Future of SDN
ECI OpenFlow 2.0 the Future of SDN
 
Introduction to Apache Apex
Introduction to Apache ApexIntroduction to Apache Apex
Introduction to Apache Apex
 
FlowER Erlang Openflow Controller
FlowER Erlang Openflow ControllerFlowER Erlang Openflow Controller
FlowER Erlang Openflow Controller
 
Container orchestration from theory to practice
Container orchestration from theory to practiceContainer orchestration from theory to practice
Container orchestration from theory to practice
 
Implementing MPLS Services using Openflow
Implementing MPLS Services using OpenflowImplementing MPLS Services using Openflow
Implementing MPLS Services using Openflow
 

Recently uploaded

Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
maazsz111
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 

Recently uploaded (20)

Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 

Developing production OpenFlow controller with Trema

  • 1. Developing production OpenFlow controller with Trema Apr. 20, 2013 Yasunobu Chiba Part-time developer, Trema Project Copyright (C) 2013 NEC Corporation
  • 2. Agenda • Provide tips and typical mistakes when developing OpenFlow controller with Trema C library • Explain a production OpenFlow controller development use case Copyright (C) 2013 NEC Corporation
  • 3. THINGS TO KNOW ABOUT OPENFLOW AND TREMA BEFORE DEVELOPING OPENFLOW CONTROLLER Copyright (C) 2013 NEC Corporation
  • 4. Trema is not an OpenFlow controller • Trema is a programming framework and just a building block for implementing OpenFlow controllers • You may use any other building blocks as well as Trema – For high availability, scalability, network protocol support, and etc. Copyright (C) 2013 NEC Corporation
  • 5. OpenFlow switch is not a database • OpenFlow switch is not a database and does not have ACID properties • Error messages are returned from switch asynchronously • Send a Barrier Request to complete a previously sent Flow Mod (or any other) operation • See and reuse Transaction Manager: – https://github.com/trema/apps/tree/master/transacti on_manager Copyright (C) 2013 NEC Corporation
  • 6. Asynchronous events happen before features request/reply exchange • You may receive asynchronous OpenFlow events such as Packet-In from unknown switches that features reply has not been received • In Trema, Switch Ready event is triggered when a features reply is received Copyright (C) 2013 NEC Corporation
  • 7. send_openflow_message() does not send message actually • send_openflow_message() just pushes a given message to an appropriate send queue • The send queue is automatically flushed inside the main loop • Message ordering is NOT guaranteed among switches Copyright (C) 2013 NEC Corporation
  • 8. libtrema is not fully thread-safe • The followings may be thread-safe but not guaranteed for all functions – buffer, doubly linked list, hash, linked list, log, match table, OpenFlow message, packet info, packet parser, stat, utility, wrapper • OpenFlow application interface is NOT thread- safe • Call send_openflow_message() from the main thread that trema_run() is running Copyright (C) 2013 NEC Corporation
  • 9. Length of send queue is limited • The maximum length of send queue (for sending OpenFlow messages) is limited and fixed • send_openflow_message() may return false if the send queue is full Copyright (C) 2013 NEC Corporation
  • 10. Do not call flush_messenger() • flush_messenger() flushes all send queues and receive queues immediately and synchronously • Calling it in an OpenFlow event handler may recursively call the event handler! • Call only if you known how it works very well Copyright (C) 2013 NEC Corporation
  • 11. start_trema() may call fork(2) • start_trema() calls fork(2) if your controller is to be daemonized • Use caution if you call functions that may be affected by fork(2) Copyright (C) 2013 NEC Corporation
  • 12. CONTROLLER DEVELOPMENT USE CASE Copyright (C) 2013 NEC Corporation
  • 13. Requirements • Functional Requirements – Manage association among virtual networks (based on non-OpenFlow technology) and switch ports – Associate a switch port with MAC addresses located on the switch port – All operations above can be done via REST interface • Non-functional Requirements – 1K+ switches must be handled – 10K+ active virtual networks must be managed – 10K+ end hosts must be connected to virtual networks Copyright (C) 2013 NEC Corporation
  • 14. Requirements – cont’d Copyright (C) 2013 NEC Corporation Switch #1 Switch #2 Switch #3 Switch #X Virtual Network #N Virtual Network #2 Virtual Network #1 10,000+ Active Virtual Networks 1,000+ Switches 10,000+ End Hosts Physical Network Virtual Networks
  • 15. Design • Load balancer + three-tiered architecture + α Copyright (C) 2013 NEC Corporation Dispatcher (Load Balancer) Worker Worker Worker Backend Database Configuration Interface External Application OpenFlow Switch REST OpenFlow + REST OpenFlow + REST
  • 16. Implementation Copyright (C) 2013 NEC Corporation REST I/FController Cluster OpenFlow Load Balancer (LVS) Virtual Network Manager Virtual Network Manager Virtual Network Manager Configuration Frontend Configuration Frontend Configuration Frontend REST Interface Load Balancer (LVS) Backend DB (MySQL) Watchdog Trema Trema Trema OpenFlow Virtual Network Agent REST VM Legacy Network OpenFlow Switch REST OpenFlow VXLAN Tunnel End-Point Virtual Networks Legacy L2/L3 Network VM Legacy Network Virtual Network Agent OpenFlow Switch VXLAN Tunnel End-Point
  • 17. Evaluation setup Copyright (C) 2013 NEC Corporation Vnet Manager + Config. Frontend #1 Vnet Manager + Config. Frontend #2 Vnet Manager + Config. Frontend #N Backend DB Load Balancer eth0 eth0 eth0 eth0 eth1 eth2 eth2 eth2 eth2 Database Network192.168.17.0/24 192.168.16.1 192.168.16.2 192.168.16.N 192.168.48.16 192.168.17.64 192.168.17.1 192.168.17.2 192.168.17.N 192.168.16.254 eth1 80/tcp 6633/tcp REST Client eth1 eth1 eth1 InternalControlNetwork192.168.16.0/24 192.168.64.17 192.168.64.18 192.168.64.19 192.168.64.16 eth0 ManagementNetwork192.168.64.0/20 192.168.64.(17+N) ControlandData Network192.168.48.0/20 eth0 - 192.168.65.1 VXLAN TEP Vnet Agent VM Host #1 Open vSwitch hp001 sp001 eth1 - 192.168.49.1 hp128 sp128 hp002 sp002 eth0 - 192.168.65.N VXLAN TEP Vnet Agent VM Host #N Open vSwitch hp001 sp001 eth1 - 192.168.49.N hp128 sp128 hp002 sp002 192.168.63.253
  • 18. Evaluation items and results • # of switches that can be managed – 410 - 412 switches per a single Virtual Network Manager were connected and initialized properly • Switch daemons were not able to run due to insufficient memory (system memory was 2 GB) – 1024 switches were connected and initialized with three Virtual Network Managers Copyright (C) 2013 NEC Corporation
  • 19. Evaluation items and results • # of virtual networks that can be managed – 16384 virtual networks that have 8 ports (hosts) each were successfully created with 1024 switches and three Virtual Network Managers • Virtual network setup time – Setup time did not increase even if we have a number of virtual networks – Database access time was constant and a minor factor Copyright (C) 2013 NEC Corporation
  • 20. To be continued… Copyright (C) 2013 NEC Corporation