Software Defined
Networking
SDN Controller
Building and Programming
Yotam Harchol
December 2013
Outline
• Floodlight SDN controller
Please ask
• Indigo OpenFlow Switch questions
during my talk
• Problems in controller development
• Real-life SDN applications
2
About Me
• Ph.D. student at the Hebrew University
• Advisers:
– Prof. Anat Bremler-Barr (IDC)
– Dr. David Hay (HUJI)
• Research areas: networking, middlebox
performance, SDN, network security
• Spent last summer at Big Switch Networks
3
Floodlight
General Architecture
4
System Architecture
5 Source: projectfloodlight.org
Controller Architecture
6 Source: projectfloodlight.org
Indigo
Open source OpenFlow switch
For software and hardware
implementations
7
Indigo Architecture
IVS
Indigo Virtual Switch
SwitchLight
Open source physical switch
8 Source: projectfloodlight.org
Problems
Problems in controller (and switch)
development
9
Testing and Verification
• Unit tests – every class has its own unit test.
All tests are executed before code is merged
into main branch
• External tests – these tests are more
comprehensive and use mininet and physical
switches to test that functionality is
maintained (runs after merge and rebuild)
• QA
10
Vendor Extensions
• OpenFlow is not enough
• Extensions should be supported by the data
plane
• Data plane is manufactured separately
• Possible solution: extend both controller and
switch software
11
Protocol Evolvement
• The OpenFlow protocol evolves quickly and
has dramatic changes between some of the
versions (e.g. 1.0 and 1.2, 1.3)
• This requires adaptations in controller,
applications, and the switches (virtual or
physical)
• Backward compatibility is a major concern as
well (e.g. new controller, old switches…)
12
LoxiGen
• LoxiGen is a tool that generates OpenFlow protocol libraries
for a number of languages
• Frontend parses wire protocol descriptions
(Currently, for versions 1.0, 1.1, 1.2, 1.3.1)
• Backend for each supported language (currently C, Python,
and Java, with an auto-generated wireshark dissector in Lua
on the way)
• Results with code for floodlight controller libraries, indigo
switch libraries
• Written in python, open-source
13
LoxiGen
14 Source: github.com/floodlight/loxigen
Applications (“Northbound”) API
• Currently –
Thin API, mainly exposes OpenFlow protocol
directly and event handler registration for
OpenFlow events
• Future –
Rich API with:
– Sophisticated flow table management and caching
– Virtualization and encapsulation of underlying
network
– More… (on next slides)
15
Multiple Applications
• Simple example:
– 2 applications
– First application sets:
(IP_DST = 192.168.1.* -> forward to port 3)
– Second application sets:
(TCP_DST = 80 -> forward to port 4)
• What will happen with a TCP packet to IP 192.168.1.1 port 80?
• Is expansion of all possible combinations a valid solution?
– Add higher priority rule:
(IP_DST=192.168.1.*, TCP_DST=80 -> forward to ports 3,4)
– Exponential growth in number of rules
• What if rules contradict?
– Third application: (TCP_DST=80 -> drop)
16
Fault Tolerance
• Application fault:
– Wrong logic
– Malicious logic
– Misconfiguration (e.g. creating loops)
• Controller fault
• Switch fault
– If switch went down or rebooted and “forgot” its flow
table – who is responsible?
• No good answers as of today…
17
Caching
(can be viewed as part of "fault tolerance")
• Prevent redundant flow_mod messages from
applications to the switches
• Allow recovery for applications and switches
• Cache results of queries to the switches
• Relates also to high availability issues,
replication, etc.
18
Transactional Models
• Allow rollback of previous
operations of the same
transaction in case of failure
– Controller-Switch channel
– Application-Controller-Switch
path
Source: projectfloodlight.org
19
Interesting SDN Architectures
and Applications
What's going on out there?
Overlay Networks
• Aim: inside a data center, have the flexibility of
SDN for hosted VMs
– Easily create tunnels
– Control endpoint routing
– Services: NAT, filtering, ACL, etc.
• Problem: hypervisor machines are connected on
a non-SDN network
– Would not like to replace the network equipment of
the whole data center
– Might not fully trust the new SDN technology
• Solution: virtualize the network as well!
21
Overlay Networks
• Overlay SDN:
– Put a virtual (software) switch as the gateway of each
hypervisor
– Central control manages allVMware Approach
virtual switches
– Virtual switches
are connected VIRTUAL ROUTER
through the Pkt Pkt
VM VIRTUAL SWITCH VIRTUAL SWITCH VM
legacy fabric Virtual
Pkt Tunneled Pkt Physical
VM SWITCH SWITCH SWITCH SWITCH SWITCH VM
Hypervisor Fabric Switches Hypervisor
Controller Cluster
22
VM 42
From Teemu Koponen (Nicira/VMWare)
Monitoring Networks
• Monitoring is a big deal for network operators
• So far: tapped selected points in network and
sent data to adjacent monitoring devices
– Requires lots of monitoring devices
– Each tapping and monitoring point is managed
separately
– Multiple moderators must cooperate in order to
use the same equipment together
23
Monitoring Networks
Source: bigswitch.com
Big Switch Networks – Big Tap
24