Programming SDN Newer proposals Frenetic (ICFP’11) Maple (SIGCOMM’13)

Slides:



Advertisements
Similar presentations
Incremental Update for a Compositional SDN Hypervisor Xin Jin Jennifer Rexford, David Walker.
Advertisements

Frenetic: A High-Level Language for OpenFlow Networks Nate Foster, Rob Harrison, Matthew L. Meola, Michael J. Freedman, Jennifer Rexford, David Walker.
Composing Software Defined Networks
Nanxi Kang Princeton University
Overview Motivations Basic static and dynamic optimization methods ADAPT Dynamo.
SDN and Openflow.
Software-Defined Networking
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Languages for Software-Defined Networks Nate Foster, Arjun Guha, Mark Reitblatt, and Alec Story, Cornell University Michael J. Freedman, Naga Praveen Katta,
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
Network Topologies.
Composing Software Defined Networks Jennifer Rexford Princeton University With Joshua Reich, Chris Monsanto, Nate Foster, and.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
Frenetic: A Programming Language for Software Defined Networks Jennifer Rexford Princeton University Joint work with Nate.
Software-Defined Networks Jennifer Rexford Princeton University.
Context Tailoring the DBMS –To support particular applications Beyond alphanumerical data Beyond retrieve + process –To support particular hardware New.
Software Defined-Networking. Network Policies Access control: reachability – Alice can not send packets to Bob Application classification – Place video.
VeriFlow: Verifying Network-Wide Invariants in Real Time
Professor Yashar Ganjali Department of Computer Science University of Toronto Some slides courtesy.
Proof Carrying Code Zhiwei Lin. Outline Proof-Carrying Code The Design and Implementation of a Certifying Compiler A Proof – Carrying Code Architecture.
Project Creation Review: Maple in OpenDaylight Andreas Voellmy, Y. Richard Yang, Xiao Shi, Xin Li, Reinaldo Penno December 18, 2014.
Type Systems CS Definitions Program analysis Discovering facts about programs. Dynamic analysis Program analysis by using program executions.
Programming Languages for Software Defined Networks Jennifer Rexford and David Walker Princeton University Joint work with the.
Aaron Gember, Theophilus Benson, Aditya Akella University of Wisconsin-Madison.
Chapter 8: Aspect Oriented Programming Omar Meqdadi SE 3860 Lecture 8 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Slide 1 Simple, Flexible Programming of Data Movement Paths using Algorithmic Policies PIs: Y. Richard Yang, Robert Bjornson, Andrew Sherman Architect:
Jennifer Rexford Princeton University MW 11:00am-12:20pm SDN Programming Languages COS 597E: Software Defined Networking.
NetEgg: Scenario-based Programming for SDN Policies Yifei Yuan, Dong Lin, Rajeev Alur, Boon Thau Loo University of Pennsylvania 1.
ECE 526 – Network Processing Systems Design Programming Model Chapter 21: D. E. Comer.
Reachability Testing of Concurrent Programs1 Reachability Testing of Concurrent Programs Richard Carver, GMU Yu Lei, UTA.
Software Defined Networking BY RAVI NAMBOORI. Overview  Origins of SDN.  What is SDN ?  Original Definition of SDN.  What = Why We need SDN ?  Conclusion.
SketchVisor: Robust Network Measurement for Software Packet Processing
SDN controllers App Network elements has two components: OpenFlow client, forwarding hardware with flow tables. The SDN controller must implement the network.
Programming SDN 1 Problems with programming with POX.
CS434/534: Topics in Networked (Networking) Systems High-Level Programming for Programmable Networks: A Blackbox Approach Yang (Richard) Yang Computer.
SDN challenges Deployment challenges
SDN Network Updates Minimum updates within a single switch
Algorithms and Problem Solving
Jennifer Rexford Princeton University
The DPIaaS Controller Prototype
Martin Casado, Nate Foster, and Arjun Guha CACM, October 2014
Control Flow Testing Handouts
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
CSCI-235 Micro-Computer Applications
Compiler Construction (CS-636)
NOX: Towards an Operating System for Networks
Chapter 4 Data Link Layer Switching
Overview of SDN Controller Design
Outline of the Chapter Basic Idea Outline of Control Flow Testing
Hierarchical Architecture
Srinivas Narayana MIT CSAIL October 7, 2016
Software Defined Networking (SDN)
CS 31006: Computer Networks – The Routers
Basic Concepts in Data Management
Software Defined Networking (SDN)
Magellan: Automatic SDN Pipelining from Algorithmic Policies
ExaO: Software Defined Data Distribution for Exascale Sciences
Enabling Innovation Inside the Network
Programming Fundamentals (750113) Ch1. Problem Solving
CS434/534: Topics in Networked (Networking) Systems High-Level Programming for Programmable Networks Yang (Richard) Yang Computer Science Department.
Languages for Software-Defined Networks
Maple: Simplifying SDN Programming Using Algorithmic Policies
An Introduction to Software Architecture
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Programmable Networks
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
Algorithms and Problem Solving
Chapter 11. Frame Relay Background Frame Relay Protocol Architecture
Design Yaodong Bi.
Control-Data Plane Separation
Presentation transcript:

Programming SDN Newer proposals Frenetic (ICFP’11) Maple (SIGCOMM’13)

Programming SDN Directly programming over NOX/POX does not have enough abstraction The global network view by itself does not help It is almost like assembly programming Reasoning at the flow table level is too difficult Need higher level language for SDN programming C++, python for Net apps. High level software should have better properties. Program at a higher level and then compile into the lower level API.

Issues with Programming on POX/NOX Not modular Two tiered model Network race condition Reason: no effective abstractions from reading network state

Frenetic: A Network Programming Language Frenetic’s solution to the problem Separate network programming into two parts: reading from writing Abstractions for querying network state Reading: specify querying network state Reads have no effect on forwarding policy Reads see every packet Abstractions for specifying a forwarding policy Writing: specify forwarding policies Forwarding policy must be separated from implementation mechanism (not rule installation details) Compose multiple tasks Write each task once and combine with others Prevent race conditions Automatically apply forwarding policy to extra packets

Frenetic Language Abstractions for querying network state An integreated query language Select, filter, group, sample sets of packets or statistics Designed so that computation can occur at data plane Abstractions for specifying a forwarding policy A functional stream processing library Generate streams of network policies Transform, split, merge, filter policies and other streams Implementation A collection of Python libraries on top of NOX

Frenetic Query Language

Frenetic Query and use examples Measure total traffic on port 2, every 30 seconds Query semantics is independent of other program parts

Frenetic Query and use examples Per host traffic specification and query composition

Frenetic Query and use examples Query for a learning switch

Frenetic Query Summary Independent query for each switch, allowing program composition Not collaborative query among multiple switches, is this high level enough? Expressiveness is customized for network queries Packets | sizes| counts forces programmers to be cost aware.

Frenetic forwarding policy programming Based on the frenetic network policy management library Construct rules using the rule constructor, which takes a pattern and a list of actions as argument. Must associate rules with switches – network policies (dictionaries mapping switches to the list of rules) High enough level? Installation of policies are done through policy events – infinite, time-indexed policy events. Register listener is the consumer of the policy events that actually install the policies.

Frenetic Forwarding program examples The repeater example

Forwarding program examples The repeater + monitor example: the runtime must enforce the query semantics: see every packet and query does not modify the networks.

Forwarding program examples A simple load balancing

Frenetic system High-level language Run-time system Query language Composition of forwarding policies Run-time system Interprets queries and policies Installs rules and tracks statistics

Frenetic discussion This is an early attempt to develop high level language for programming SDN. What problems are solved? What are still not ideal?

Maple: Simplifying SDN programming using algorithmic policies Objective: A high level abstraction for SDN programming high level programming to describe network wide algorithmic policies Removing details such as rule installation over multiple flow tables Easily understandable semantics: program runs from scratch on the centralized controller for every packet Focus on abstraction, not performance for now, optimize later. Only discuss to routing application (packet, env)->forwardingpath in the paper

Algorithmic Policies Function in a general purpose language that describes how a packet should be routed, not how flow tables are configured. Conceptually invoked on every packet entering the network; may also access network environment state; hence it has the form: Written in a familiar language such as Java, Python, or Haskell

Example Algorithmic Policy in Java Does not specify flow table configuration Route f(Packet p, Env e) { if (p.tcpDstIs(22)) return null(); else { Location sloc = e.location(p.ethSrc()); Location dloc = e.location(p.ethDst()); Path path = shortestPath(e.links(), sloc,dloc); if (p.ethDstIs(2) return null(); else return unicast(sloc,dloc,path); }

Implement algorithmic policies Naive solution -- process every packet at controller or use only exact match rules -- perform poorly Static analysis to determine layout of flow tables is possible, but has drawbacks: Static analysis of program in a general-purpose language is hard and is typically conservative System becomes source-language dependent Not all situation can be handled by static analysis.

Implement algorithmic policies Maple’s approach: runtime tracing Detect and utilize reusable executions of a program (f) by recording the dynamic execution of the program Keep track of its decision dependencies Each execution creates a trace Merge the traces for each program (f) in a trace tree.

1. Maple observes the dependency of f on packet data. 2. Build a trace tree (TT), a partial decision tree for f. Prio Match Action 1 tcpDst:22 ToController ethDst:2 discard ethDst:4, ethSrc:6 port 30 3. Compile flow tables (FTs) from a trace tree for each switch Prio Match Action 1 tcpDst:22 ToController ethDst:2 discard ethDst:4, ethSrc:6 port 30

Policy else return unicast(sloc,dloc,path); EthDest:1, TcpDst:80 Route f(Packet p, Env e) { if (p.tcpDstIs(22)) return null(); else { Location dloc = e.location(p.ethDst()); Location sloc = e.location(p.ethSrc()); Path path = shortestPath( e.links(),sloc,dloc); if (p.ethDstIs(2) else return unicast(sloc,dloc,path); } TcpDst=22? false Read(EthDst) false Read(EthSrc) 4 ethDstls=2? 6 false path1

EthDst:1, TcpDst:22 Trace Tree Policy Route f(Packet p, Env e) { if (p.tcpDstIs(22)) return null(); else { Location dloc = e.location(p.ethDst()); Location sloc = e.location(p.ethSrc()); Path path = shortestPath( e.links(),sloc,dloc); if (p.ethDstIs(2) else return unicast(sloc,dloc,path); } Assert(TcpDst,22) false true Read(EthDst) Assert(TcpDst,22) ? false Read(EthSrc) true null 4 Maple then uses this trace to begin generating the Trace Tree. In this case, Maple still doesn’t know what will happen if the assertion is true, and it therefore adds a placeholder under the true branch. Now, if we execute f on a packet to tcp destination 22, the assertion is true, and the packet is dropped. Maple logs this new trace and uses it to refine its Trace Tree, filling in the true branch of the assertion. Assert(ethdesls,2) 6 false path1

Policy Trace Tree Route f(Packet p, Env e) { if (p.tcpDstIs(22)) return null(); else { Location dloc = e.location(p.ethDst()); Location sloc = e.location(p.ethSrc()); Path path = shortestPath( e.links(),sloc,dloc); if (p.ethDstIs(2) else return unicast(sloc,dloc,path); } Assert(TcpDst,22) false true Read(EthDst) drop false Read(EthSrc) 4 Maple then uses this trace to begin generating the Trace Tree. In this case, Maple still doesn’t know what will happen if the assertion is true, and it therefore adds a placeholder under the true branch. Now, if we execute f on a packet to tcp destination 22, the assertion is true, and the packet is dropped. Maple logs this new trace and uses it to refine its Trace Tree, filling in the true branch of the assertion. Assert(ethdesls,2) true 6 false drop path1

Trace trees A trace provides an abstract, partial representation of an algorithmic policy – cover all paths that have been executed. Trace trees are logically maintained in all switches

Compiling trace tree to flow table entries for each switch

Example Rules on s1:

Optimizations Minimize the number of rules and the number of priorities No effect Priority 0 Optimize for distributed flow tables Eliminate tocontroller message Route aggregation Maple multicore scheduler: multi-threading

Other features Maple has been implemented in Haskell using the McNettle Openflow controller, which implements Openflow 1.0. The implementation includes several other features: Incremental TT compilation, to avoid full recompilation on every update. Trace reduction, to ensure traces and trace trees do not contain redundant nodes. Automatic and user-specified invalidation, to support removing and updating TT and FT when network state changes.

Summary Algorithmic policies provide a simple, expressive programming model for SDN, eliminating a key source of errors and performance problems. Maple provides a scalable implementation of algorithmic policies through several novel techniques, including: runtime tracing of algorithmic policies, maintaining a trace tree and compiling TT to flow tables to distribute processing to switches; using TT annotations to implement compiler optimizations such as rule and priority reductions.

Maple discussion Higher level than Frenetic Not complete Shows the challenges in having an abstraction with the right implementation