Languages for Software-Defined Networks Nate Foster, Michael J. Freedman, Arjun Guha, Rob Harrison, Naga Praveen Katta, Christopher Monsanto, Joshua Reich,

Slides:



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

Compiling Path Queries in Software-Defined Networks Srinivas Narayana Jennifer Rexford and David Walker Princeton University.
SDN Applications Jennifer Rexford Princeton University.
Programming Protocol-Independent Packet Processors
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
Composing Software-Defined Networks Princeton*Cornell^ Chris Monsanto*, Joshua Reich* Nate Foster^, Jen Rexford*, David Walker*
Nanxi Kang Princeton University
Jennifer Rexford Princeton University
Modular SDN Programming w/ Pyretic
An Overview of Software-Defined Network Presenter: Xitao Wen.
Incremental Consistent Updates Naga Praveen Katta Jennifer Rexford, David Walker Princeton University.
Ranges & Cross-Entrance Consistency with OpenFlow Liron Schiff (TAU) Joint work with Yehuda Afek (TAU) Anat Bremler-Barr (IDC) Israel Networking Day 2014.
Programming Abstractions for Software-Defined Networks Jennifer Rexford Princeton University.
Flowspace revisited OpenFlow Basics Flow Table Entries Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot L4 sport L4 dport Rule Action.
David Walker Princeton University Joint work with Nate Foster, Michael J. Freedman, Rob Harrison, Christopher Monsanto, Mark Reitblatt, Jennifer Rexford,
Software-Defined Networking
An Overview of Software-Defined Network
Data Plane Verification. Background: What are network policies Alice can talk to Bob Skype traffic must go through a VoIP transcoder All traffic must.
Software Defined Networking By: Widhi Yahya. Introduction.
Enabling Innovation Inside the Network Jennifer Rexford Princeton University
Languages for Software-Defined Networks Nate Foster, Arjun Guha, Mark Reitblatt, and Alec Story, Cornell University Michael J. Freedman, Naga Praveen Katta,
Enabling Innovation Inside the Network Jennifer Rexford Princeton University
OpenFlow Switch Limitations. Background: Current Applications Traffic Engineering application (performance) – Fine grained rules and short time scales.
An Overview of Software-Defined Network Presenter: Xitao Wen.
Software Defined Networking
Enabling Innovation Inside the Network Jennifer Rexford Princeton University
Composing Software Defined Networks Jennifer Rexford Princeton University With Joshua Reich, Chris Monsanto, Nate Foster, and.
Enabling Innovation Inside the Network Jennifer Rexford Princeton University
Frenetic: A Programming Language for Software Defined Networks Jennifer Rexford Princeton University Joint work with Nate.
Software-Defined Networks Jennifer Rexford Princeton University.
Higher-Level Abstractions for Software-Defined Networks Jennifer Rexford Princeton University.
Professor Yashar Ganjali Department of Computer Science University of Toronto Some slides courtesy.
Frenetic: Programming Software Defined Networks Jennifer Rexford Princeton University Joint with Nate Foster, David Walker,
Reasoning about Software Defined Networks Mooly Sagiv Tel Aviv University Thursday (Physics 105) Monday Schrieber.
Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks TCP.
Software Defined Networking Kathryn Abbett. Definition □Origins from Berkley and Stanford, around 2008 □Software-Defined Networking (SDNs) allows applications.
Copyright 2013 Open Networking User Group. All Rights Reserved Confidential Not For Distribution Programming Abstractions for Software-Defined Networks.
Programming Abstractions for Software-Defined Networks Jennifer Rexford Princeton University
Othman Othman M.M., Koji Okamura Kyushu University Proceedings of the 32 nd Asia-Pacific Advanced Network Meeting India, New Delhi, 2001/8/22.
Jennifer Rexford Princeton University MW 11:00am-12:20pm Measurement COS 597E: Software Defined Networking.
Programming Languages for Software Defined Networks Jennifer Rexford and David Walker Princeton University Joint work with the.
High-Level Abstractions for Programming Software Defined Networks Joint with Nate Foster, David Walker, Arjun Guha, Rob Harrison, Chris Monsanto, Joshua.
Programming Abstractions for Software-Defined Networks Jennifer Rexford Princeton University.
Enabling Innovation Inside the Network Joint with Nate Foster, David Walker, Rob Harrison, Chris Monsanto, Cole Schlesinger, Mike Freedman, Mark Reitblatt,
Slide 1 Simple, Flexible Programming of Data Movement Paths using Algorithmic Policies PIs: Y. Richard Yang, Robert Bjornson, Andrew Sherman Architect:
Enabling Innovation Inside the Network Jennifer Rexford Princeton University
Pyretic Programming.
Jennifer Rexford Princeton University MW 11:00am-12:20pm SDN Programming Languages COS 597E: Software Defined Networking.
Enabling Innovation Inside the Network Jennifer Rexford Princeton University
Measurement Query Languages for Software-Defined Networks Jennifer Rexford Princeton University Joint work with Srinivas.
Jennifer Rexford Princeton University MW 11:00am-12:20pm Data-Plane Verification 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.
Programming Abstractions & Languages for SDN: Frenetic & Pyretic.
Authors: Mark Reitblatt, Nate Foster, Jennifer Rexford, Cole Schlesinger, David Walker Presenter: Byungkwon Choi Abstractions for Network Update INA.
Programming SDN 1 Problems with programming with POX.
SDN challenges Deployment challenges
SDN Network Updates Minimum updates within a single switch
Programming SDN Newer proposals Frenetic (ICFP’11) Maple (SIGCOMM’13)
Jennifer Rexford Princeton University
Programming Abstractions & Languages for SDN: Frenetic & Pyretic
Programming the Networks of the Future
Programmable Networks
Composing Software-Defined Networks
Enabling Innovation Inside the Network
Languages for Software-Defined Networks
Programming Languages for Programmable Networks
Programmable Networks
Frenetic: Programming Software Defined Networks
Control-Data Plane Separation
Presentation transcript:

Languages for Software-Defined Networks Nate Foster, Michael J. Freedman, Arjun Guha, Rob Harrison, Naga Praveen Katta, Christopher Monsanto, Joshua Reich, Mark Reitblatt, Jennifer Rexford, Cole Schlesinger, Alec Stor and David Walker

Programming the Network SDN gives programmers control Control does not imply easy to use Bottom line: using OpenFlow is hard

Example: repeater/monitor We want to create a repeater that also provides counter data on network traffic Using OpenFlow we need to take into account the way these rules will be installed And how they impact each other

Repeater and monitor Task 1: forward port 1 to port 2 and port 2 to port 1 Task 2: count http packets from port 2 In port 1: forward to port 2 In port 2 and port 80: take statistics, forward to port 1 In port 2: forward to port 1

Repeater/monitor in OpenFlow def switch_join(s): pat1 = finport:1g pat2web = finport:2, srcport:80g pat2 = finport:2g install(s, pat1, DEFAULT, [fwd(2)]) install(s, pat2web, HIGH, [fwd(1)]) install(s, pat2, DEFAULT, [fwd(1)]) query_stats(s, pat2web) Take them all into account! Making changes must be fun…

What we need is… An abstraction! The Frenetic family: – Pyretic (python) – Frenetic-OCaml Write modular programs Get statistics without polling for them explicitly

Operations needed 1.Querying network state 2.Expressing Policies 3.Reconfiguring the network (All these will need to be supported by the runtime)

Operations: Querying A desired query might require a series of switch rules: – Statistics by source IP or by flow (install on the go) – Compound rules No polling for the data: – Turning queries into event-driven programming – “Every” keyword Packets might collect at the controller while the rules are being installed – Any identical packet arriving while processing should wait

Select(bytes) * Where(inport=2 & srcport=80) * GroupBy([srcip]) * Every(60) Limit(1) Aggregate type: what type of counter to install Header: one counter each by this field Event instead of polling: when to raise the event Limit packets to the controller: only show this many packets

A Query Language: Design High-level predicates Dynamic unfolding Limiting traffic Polling and combining statistics

High level predicates Something as simple as negation requires an elaborate hierarchy of rules: Some complex rules can be optimized in the switch table, the programmer doesn’t have to worry about that GroupBy predicates: one rule per item srcip= srcport=80 Higher priority Catches leftovers

Dynamic unfolding Limited space for rules on the switch Some counters require many rules to be installed on the fly – Counters by source IP require 2 32 counters… GroupBy in Frenetic: rules will be installed on the fly without the programmer spelling it out

Limiting traffic The controller and the switch do not communicate instantly Packets can queue up to the controller before the first one is handled Instead of having to code the controller ignoring the second packet: – Limit(1)

Polling and combining Statistics are often checked periodically Stats are also spread on many switches Better event-driven than polled Every (60): – Every 60 seconds – Collect info from all the switches – And raise a program event

Operations: Network Policies Different network policies might have rules that interfere with queries – Or with each other We already saw our repeater/monitor would need three rules: – Inport1 – Inport2web – Inport2 Priorities matter! It gets worse the more complex the functionality

Modularity: back to our example Write different rules and queries side by side Don’t have to take them into account Put them together: def repeater(): … def monitor(): … def main(): repeater() monitor() Can completely re-do this code without touching anything else!

Putting it together Composing different rules is delegated to the runtime system We trust it to compose them “correctly” Composition types: – Parallel composition: both sets of rules on the same stream of packets – Sequential composition: one module acts on the output of the other

Parallel Composition Two modules that work on the same packets For instance: the repeater and the monitor, or replication If both modules produce forwarding rules, the resulting rule is the union def main(): return p1() | p2()

Example: replicate all ftp traffic inport: 1 fwd to 2 inport: 1 and destport: 21 fwd to inport: 2 fwd to 1

Example: replicate all ftp traffic inport: 1 fwd to 2 inport: 1 and destport: 21 fwd to inport: 2 fwd to 1 srcip: srcport:23 dstip: dstport:6006

Example: replicate all ftp traffic inport: 1 fwd to 2 inport: 1 and destport: 21 fwd to inport: 2 fwd to 1 srcip: srcport:6005 dstip: dstport: 21 srcip: srcport:6005 dstip: dstport: 21

Sequential Composition Rules run one after the other: packets left after running the first go on to the next, etc. Example: when creating a firewall def main(): return p1() >> p2()

Example: firewall inport: 1 fwd to 2 12 inport: 2 fwd to 1 srcip: drop dstport: 8080 drop

Example: firewall inport: 1 fwd to 2 12 inport: 2 fwd to 1 srcip: drop dstport: 8080 drop srcip: srcport:23 dstip: dstport:6006

Example: firewall inport: 1 fwd to 2 12 inport: 2 fwd to 1 srcip: drop dstport: 8080 drop srcip: srcport:6008 dstip: dstport:23

What the runtime system does The runtime system is the code that runs behind the programmer’s code Something that implements the complex functionalities that the user code uses In the case of Frenetic: a python/Ocaml library whose code runs behind the abstract ops Like JVM: provides the implementation for “system” functionality

The Runtime System: Suggested Impl (microflow) When a packet comes in: – Test all queries and registered forwarding policies – Collect actions for the switch If no queries need packets like this: – Install forwarding rules If other queries might need packets like this – Manually forward the packet, but install no rule – Future packets will be forwarded to the controller again

Runtime System: An Efficient Impl Instead of dynamically unfolding all the rules Generate rules (with wildcards) before packets are ever seen Proactive, not reactive Frenetic uses NetCore: another abstraction over OpenFlow When can’t be generated ahead of time: reactive specialization (a form of unfolding)

Operations: Consistency of updates Per packet consistency: every packet will be processed with exactly one set of rules throughout the network – Two phase update of the network – Packets are stamped with a version number for the rule set in the header

Consistency of updates Per flow consistency: – Sometimes whole streams need to be handled consistently (e.g. load balancing) – Rules expire only when all flows matching an old configuration are finished

Back to repeater/monitor def repeater(): rules=[Rule(inport:1, [fwd(2)]), Rule(inport:2, [fwd(1)])] register(rules) def web monitor(): q = (Select(bytes) * Where(inport=2 & srcport=80) * Every(30)) q >> Print() def main(): repeater() monitor()

12 inport: 1 fwd to 2

12 src: srcport: 80 dst: dstport: 6009 inport: 1 fwd to 2

12 src: srcport: 80 dst: dstport: 6009 inport: 1 fwd to 2 inport: 2 and ip= count bytes inport: 2 and ip= fwd to 1

12 src: srcport: 80 dst: dstport: 6009 inport: 1 fwd to 2 inport: 2 and ip= count bytes inport: 2 and ip= fwd to 1

Additional Refernces Frenetic: A Network Programming Language (Foster et. al, 2011) Composing Software-Defined Network (Monsanto et. al, 2013) A Compiler and Run-time System for Network Programming Languages (Monsanto et. al, 2012)