Frenetic: A Programming Language for Software Defined Networks Jennifer Rexford Princeton University Joint work with Nate.

Slides:



Advertisements
Similar presentations
Logically Centralized Control Class 2. Types of Networks ISP Networks – Entity only owns the switches – Throughput: 100GB-10TB – Heterogeneous devices:
Advertisements

SDN Applications Jennifer Rexford Princeton University.
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*
Slick: A control plane for middleboxes Bilal Anwer, Theophilus Benson, Dave Levin, Nick Feamster, Jennifer Rexford Supported by DARPA through the U.S.
Incremental Consistent Updates Naga Praveen Katta Jennifer Rexford, David Walker Princeton University.
Software-Defined Networking, OpenFlow, and how SPARC applies it to the telecommunications domain Pontus Sköldström - Wolfgang John – Elisa Bellagamba November.
INTRODUCTION Frequent and resource-exhaustive events, such as flow arrivals and network-wide statistics collection events, stress the control plane and.
OpenFlow-Based Server Load Balancing GoneWild
Programming Abstractions for Software-Defined Networks Jennifer Rexford Princeton University.
Scalable Flow-Based Networking with DIFANE 1 Minlan Yu Princeton University Joint work with Mike Freedman, Jennifer Rexford and Jia Wang.
David Walker Princeton University Joint work with Nate Foster, Michael J. Freedman, Rob Harrison, Christopher Monsanto, Mark Reitblatt, Jennifer Rexford,
Routing and Routing Protocols
Software-Defined Networking
An Overview of Software-Defined Network
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
Jennifer Rexford Princeton University MW 11:00am-12:20pm SDN Software Stack COS 597E: Software Defined Networking.
Scalable Server Load Balancing Inside Data Centers Dana Butnariu Princeton University Computer Science Department July – September 2010 Joint work with.
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
OpenFlow-Based Server Load Balancing GoneWild Author : Richard Wang, Dana Butnariu, Jennifer Rexford Publisher : Hot-ICE'11 Proceedings of the 11th USENIX.
Software-Defined Networks Jennifer Rexford Princeton University.
1 Introducing Routing 1. Dynamic routing - information is learned from other routers, and routing protocols adjust routes automatically. 2. Static routing.
NOX an OpenFlow controller. Role of Controller in OpenFlow Environments Push forwarding logic to switches Give developers a high-level API to develop.
Higher-Level Abstractions for Software-Defined Networks Jennifer Rexford Princeton University.
Languages for Software-Defined Networks Nate Foster, Michael J. Freedman, Arjun Guha, Rob Harrison, Naga Praveen Katta, Christopher Monsanto, Joshua Reich,
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.
Software Defined Networking Mike Freedman COS 461: Computer Networks
Copyright 2013 Open Networking User Group. All Rights Reserved Confidential Not For Distribution Programming Abstractions for Software-Defined Networks.
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.
Reasoning about Software Defined Networks Shachar Itzhaky & Mooly Sagiv Tel Aviv University Thursday (Physics 105) Monday.
Enabling Innovation Inside the Network Joint with Nate Foster, David Walker, Rob Harrison, Chris Monsanto, Cole Schlesinger, Mike Freedman, Mark Reitblatt,
Improving Network Management with Software Defined Network Group 5 : z Xuling Wu z Haipeng Jiang z Sichen Wu z Aparna Sanil.
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
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.
Jennifer Rexford Princeton University MW 11:00am-12:20pm Testing and Debugging COS 597E: Software Defined Networking.
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.
Routing and Routing Protocols CCNA 2 v3 – Module 6.
Software Defined Networking BY RAVI NAMBOORI. Overview  Origins of SDN.  What is SDN ?  Original Definition of SDN.  What = Why We need SDN ?  Conclusion.
Programming SDN 1 Problems with programming with POX.
SDN challenges Deployment challenges
Programming SDN Newer proposals Frenetic (ICFP’11) Maple (SIGCOMM’13)
Jennifer Rexford Princeton University
Martin Casado, Nate Foster, and Arjun Guha CACM, October 2014
Programming Abstractions & Languages for SDN: Frenetic & Pyretic
Software Defined Networking
Programming the Networks of the Future
Software Defined Networking (SDN)
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:

Frenetic: A Programming Language for Software Defined Networks Jennifer Rexford Princeton University Joint work with Nate Foster, Dave Walker, Rob Harrison, Michael Freedman, Chris Monsanto, Mark Reitblatt, and Alec Story

Network Programming is Hard Programming network equipment is hard –Complex software by equipment vendors –Complex configuration by network administrators Expensive and error prone –Network outages and security vulnerabilities –Slow introduction of new features SDN gives us a chance to get this right! –Rethink abstractions for network programming 2

Programming Software Defined Networks OpenFlow already helps a lot –Network-wide view at controller –Direct control over data plane The APIs do not make it easy –Limited controller visibility –No support for composition –Asynchronous events Frenetic simplifies the programmer’s life –A language that raises the level of abstraction –A run-time system that handles the gory details 3 Controller Switches

Limited Controller Visibility Example: MAC-learning switch –Learn about new source MAC addresses –Forward to known destination MAC addresses Controller program is more complex than it seems –Cannot install destination-based forwarding rules –… without keeping controller from learning new sources Solution: rules on 4 Must think about reading and writing at the same time sends to 2  learn 1, install 3 sends to 1  never learn 3 1 sends to 3  always floods

Composition: Simple Repeater def switch_join(switch): # Repeat Port 1 to Port 2 p1 = {in_port:1} a1 = [forward(2)] install(switch, p1, DEFAULT, a1) # Repeat Port 2 to Port 1 p2 = {in_port:2} a2 = [forward(1)] install(switch, p2, DEFAULT, a2) def switch_join(switch): # Repeat Port 1 to Port 2 p1 = {in_port:1} a1 = [forward(2)] install(switch, p1, DEFAULT, a1) # Repeat Port 2 to Port 1 p2 = {in_port:2} a2 = [forward(1)] install(switch, p2, DEFAULT, a2) Simple Repeater 12 Controller When a switch joins the network, install two forwarding rules.

Composition: Web Traffic Monitor 6 def switch_join(switch)): # Web traffic from Internet p = {inport:2,tp_src:80} install(switch, p, DEFAULT, []) query_stats(switch, p) def stats_in(switch, p, bytes, …) print bytes sleep(30) query_stats(switch, p) def switch_join(switch)): # Web traffic from Internet p = {inport:2,tp_src:80} install(switch, p, DEFAULT, []) query_stats(switch, p) def stats_in(switch, p, bytes, …) print bytes sleep(30) query_stats(switch, p) Monitor “port 80” traffic 12 Web traffic When a switch joins the network, install one monitoring rule.

Composition: Repeater + Monitor def switch_join(switch): pat1 = {inport:1} pat2 = {inport:2} pat2web = {in_port:2, tp_src:80} install(switch, pat1, DEFAULT, None, [forward(2)]) install(switch, pat2web, HIGH, None, [forward(1)]) install(switch, pat2, DEFAULT, None, [forward(1)]) query_stats(switch, pat2web) def stats_in(switch, xid, pattern, packets, bytes): print bytes sleep(30) query_stats(switch, pattern) def switch_join(switch): pat1 = {inport:1} pat2 = {inport:2} pat2web = {in_port:2, tp_src:80} install(switch, pat1, DEFAULT, None, [forward(2)]) install(switch, pat2web, HIGH, None, [forward(1)]) install(switch, pat2, DEFAULT, None, [forward(1)]) query_stats(switch, pat2web) def stats_in(switch, xid, pattern, packets, bytes): print bytes sleep(30) query_stats(switch, pattern) Repeater + Monitor Must think about both tasks at the same time.

Asynchrony: Switch-Controller Delays Common OpenFlow programming idiom –First packet of a flow goes to the controller –Controller installs rules to handle remaining packets What if more packets arrive before rules installed? –Multiple packets of a flow reach the controller What if rules along a path installed out of order? –Packets reach intermediate switch before rules do 8 Must think about all possible event orderings. Controller packets

Wouldn’t It Be Nice if You Could… Separate reading from writing –Reading: specify queries on network state –Writing: specify forwarding policies Compose multiple tasks –Write each task once, and combine with others Prevent race conditions –Automatically apply forwarding policy to extra packets 9 This is what Frenetic does!

Our Solution: Frenetic Language Reads: query network state –Queries can see any packets –Queries do not affect forwarding –Language designed to keep packets in data plane Writes: specify a forwarding policy –Policy separate from mechanism for installing rules –Streams of packets, topology changes, statistics, etc. –Library to transform, split, merge, and filter streams Current implementation –A collection of Python libraries on top of NOX 16

Example: Repeater + Monitor 11 # Static repeating between ports 1 and 2 def repeater(): rules=[Rule(inport:1, [forward(2)]), Rule(inport:2, [forward(1)])] register(rules) # Static repeating between ports 1 and 2 def repeater(): rules=[Rule(inport:1, [forward(2)]), Rule(inport:2, [forward(1)])] register(rules) # Monitoring Web traffic def web_monitor(): q = (Select(bytes) * Where(inport:2 & tp_src:80) * Every(30)) q >> Print() # Monitoring Web traffic def web_monitor(): q = (Select(bytes) * Where(inport:2 & tp_src:80) * Every(30)) q >> Print() # Composition of two separate modules def main(): repeater() web_monitor() # Composition of two separate modules def main(): repeater() web_monitor() Repeater Monitor Repeater + Monitor

Frenetic System Overview High-level language –Query language –Composition of forwarding policies Run-time system –Interprets queries and policies –Installs rules and tracks statistics –Handles asynchronous events 12

Frenetic Run-Time System Rule granularity –Microflow: exact header match –Wildcard: allow “don’t care” fields Rule installation –Reactive: first packet goes to controller –Proactive: rules pushed to the switches Frenetic run-time system –Version 1.0: reactive microflow rules [ICFP’11] –Version 2.0: proactive wildcard rules [POPL’12] Get it right once, and free the programmer! 13

Evaluation Example applications –Routing: spanning tree, shortest path –Discovery: DHCP and ARP servers –Load balancing: Web requests, memcached queries –Security: network scan detector, DDoS defenses Performance metrics –Language: lines of code in applications  Much shorter programs, especially when composing –Run-time system: overhead on the controller  Frenetic 1.0: competitive with programs running on NOX  Frenetic 2.0: fewer packets to the controller 14

Ongoing and Future Work Consistent writes [HotNets’11] –Transition from one forwarding policy to another –Without worrying about the intermediate steps Network virtualization –Multiple programs controlling multiple virtual networks Network-wide abstractions –Path sets, traffic matrices, reachability policy, etc. Joint host and network management –Controller managing the hosts and the switches Concurrent and distributed controllers 15

Conclusions Frenetic foundation –Separating reading from writing –Explicit query subscription and policy registration –Operators that transform heterogeneous streams Makes programming easier –Higher-level patterns –Policy decoupled from mechanism –Composition of modules –Prevention of race conditions And makes new abstractions easier to build! 16

Thanks! 17