Composing Software-Defined Networks Princeton*Cornell^ Chris Monsanto*, Joshua Reich* Nate Foster^, Jen Rexford*, David Walker* www.frenetic-lang.org/pyretic.

Slides:



Advertisements
Similar presentations
Towards Software Defined Cellular Networks
Advertisements

Incremental Update for a Compositional SDN Hypervisor Xin Jin Jennifer Rexford, David Walker.
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.
DOT – Distributed OpenFlow Testbed
Composing Software Defined Networks
OpenFlow overview Joint Techs Baton Rouge. Classic Ethernet Originally a true broadcast medium Each end-system network interface card (NIC) received every.
Nanxi Kang Princeton University
Jennifer Rexford Princeton University
Modular SDN Programming w/ Pyretic
PARIS: ProActive Routing In Scalable Data Centers Dushyant Arora, Theophilus Benson, Jennifer Rexford Princeton University.
© 2009 Cisco Systems, Inc. All rights reserved. SWITCH v1.0—4-1 Implementing Inter-VLAN Routing Deploying Multilayer Switching with Cisco Express Forwarding.
Programming Abstractions for Software-Defined Networks Jennifer Rexford Princeton University.
SDN and Openflow.
David Walker Princeton University Joint work with Nate Foster, Michael J. Freedman, Rob Harrison, Christopher Monsanto, Mark Reitblatt, Jennifer Rexford,
Software-Defined Networking
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,
Jennifer Rexford Princeton University MW 11:00am-12:20pm SDN Software Stack COS 597E: Software Defined Networking.
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.
Software Defined-Networking. Network Policies Access control: reachability – Alice can not send packets to Bob Application classification – Place video.
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.
Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks TCP.
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
Programming Languages for Software Defined Networks Jennifer Rexford and David Walker Princeton University Joint work with the.
SDN and Openflow. Motivation Since the invention of the Internet, we find many innovative ways to use the Internet – Google, Facebook, Cloud computing,
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,
SOFTWARE DEFINED NETWORKING/OPENFLOW: A PATH TO PROGRAMMABLE NETWORKS April 23, 2012 © Brocade Communications Systems, Inc.
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.
Introduction to Mininet, Open vSwitch, and POX
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.
Why Fabric? 1 Complicated technology/vendor/device specific provisioning for networks, especially heterogeneous network DC Network – STP, TRILL, SPB, VXLAN,
Software Defined Networking and OpenFlow Geddings Barrineau Ryan Izard.
Atrium Router Project Proposal Subhas Mondal, Manoj Nair, Subhash Singh.
InterVLAN Routing 1. InterVLAN Routing 2. Multilayer Switching.
SDN challenges Deployment challenges
Compiling Path Queries
HybNET: Network Manager for a Hybrid Network Infrastructure
The DPIaaS Controller Prototype
Martin Casado, Nate Foster, and Arjun Guha CACM, October 2014
Programming Abstractions & Languages for SDN: Frenetic & Pyretic
SDN Overview for UCAR IT meeting 19-March-2014
Programming the Networks of the Future
Programmable Networks
Composing Software-Defined Networks
Enabling Innovation Inside the Network
Languages for Software-Defined Networks
Programmable Networks
Frenetic: Programming Software Defined Networks
Control-Data Plane Separation
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

Composing Software-Defined Networks Princeton*Cornell^ Chris Monsanto*, Joshua Reich* Nate Foster^, Jen Rexford*, David Walker*

2 Enable network innovation by decoupling control plane: determines rules data plane: applies rules to packets Software Defined Networks (SDN) Acheived using open standard API

Controller Platform 3 Controller Application Software Defined Networks (SDN) Enabling a shift from protocols to applications

Running Example Network 4 Internet Servers B A SDN Switch w/ labeled ports

Counters for each rule - #bytes, #packets Programming in OpenFlow 5 Pattern Action Priority Route: IP/fwd B A :match(dstip=A)[fwd(2)] 1:match(* )[fwd(1)] 2:match(dstip=B)[fwd(3)] OpenFlow Program dstip=A dstip=B dstip!=A dstip!=B

6 match(dstmac=A)[fwd(2)] match(dstmac=B)[fwd(3)] match(* )[fwd(1)] Pattern Switch: MAC/fwd B A One API, Many Uses Priority Ordered Action

7 Load Balancer: IP/mod B A Pattern Action match(srcip=0*,dstip=P)[mod(dstip=A)] match(srcip=1*,dstip=P)[mod(dstip=B)] One API, Many Uses

But Only Half of the Story 8 Controller Platform Controller Application Hardware Interface Programmer Interface OpenFlow (assembly) ? Modular & Intuitive Hardware Flow-Table Rules (Machine Language) LB Route Monitor FW

match(srcip=0*,dstip=P)[mod(dstip=A)] match(srcip=1*,dstip=P)[mod(dstip=B)] match(dstip=A)[fwd(2)] match(dstip=B)[fwd(3)] match(* )[fwd(1)] OpenFlow Isn’t Modular Balance then Route 9 match(srcip=0*,dstip=P)[mod(dstip=A) ] match(srcip=1*,dstip=P)[mod(dstip=B) ] match( dstip=A)[fwd(2) ] match( dstip=B)[fwd(3) ] match(* )[fwd(1) ] Combined Rules? (only one match) Balances w/o Forwarding! match( dstip=A)[fwd(2) ] match( dstip=B)[fwd(3) ] match(* )[fwd(1) ] match(srcip=0*,dstip=P)[mod(dstip=A)] match(srcip=1*,dstip=P)[mod(dstip=B)] Forwards w/o Balancing!

AbstractsProvidingSupporting Policy Compositional Operators Functional Composition Network Layered Abstract Topologies Topological Decomposition Packet Extensible Headers Policy & Network Abstractions Pyretic (Contributions) 10

Module 1: Balance Rewrite dstip P to A, if srcip=0* B, if srcip=1* Module 2: Route Based on dstip Module 3: Monitor count if srcip=X 11 Compositional Operators: A Monitoring Load Balancer IP = 1* IP = 0* B A then, and Traffic to P re-addressed and fowarded to either A or B, based on source Counted if from source X

Topology Abstraction: A Legacy Gateway Replacement 12 F I E 2 G Module 1: MAC-learn Module 3: IP-Route Module 2: Forward (ARP or MAC Rewrite) Gateway acts like: Legacy router Legacy switch ARP responder Hybrid MAC-rewriter, legacy router/switch

Pyretic ’s Design Monitoring Load Balancer –Encode policies as functions –Compositional operators –Queries as forwarding policies MAC-Learning Module –Dynamic Policies “One Big Switch” Topology Abstraction –Extensible packet model 13

Pyretic Drop Policy 14 Goal: Drop packets (i.e., OpenFlow drop) Write: drop Means: eval(drop,p) = {} evaluategiven policy on packet results in

Pyretic Forward Policy 15 Goal: Forward packets out port a Write: fwd(a) Means: eval(fwd(a),p) = {p[outport:=a]} located packet w/ fields for switch inport outport

One Pyretic Policy For Each OpenFlow Action drop fwd(port) flood mod(h=v) 16 1 packets 1 packets 0 packets 0,1, or more packets

Pyretic Policy 17 Puts focus on meaning instead of mechanics A function mapping a located packet to a set of located packets eval(policy,packet) = {packet}

Parallel ‘|’:Do both C1 and C2 simultaneously eval(C1 | C2,p) = eval(C1,p) U eval(C2,p) Sequential ‘>>’:First do C1 and then do C2 eval(C1 >> C2,p) = U {eval(C2,p’) for p’ in eval(C1,p)} match(dstip=A)[fwd(2)] | match(dstip=B)[fwd(3)] | ~(match(dstip=A) | match(dstip=b))[fwd(1)] 18 Enabling Compositional Operators No priorities needed!

Querying as Forwarding 19 Abstract location corresponding to a data-structure that store packet-data and callback processing routines b = count_bucket(every=1) b.register_callback(print) match(srcip=X)[fwd(b)] bucket(limit,[h]) count_bucket(every,[h])

Monitoring Load Balancer balance = match(srcip=0*,dstip=P)[mod(dstip=A)] | match(srcip=1*,dstip=P)[mod(dstip=B)] | ~match( dstip=P)[id ] route = match(dstip=A)[fwd(2)] | match(dstip=B)[fwd(3)] | ~(match(dstip=A) | match(dstip=B))[fwd(1)] b = counts(every=1) b.register_callback(print) monitor = match(srcip=X)[fwd(b)] mlb = (balance >> route) | monitor 20 1* 0* B A eval(id,p) = {p}

Compared to install_flowmod(5,srcip=X & dstip=P,[mod(dstip=A),fwd(2)]) install_flowmod(4,srcip=0* & dstip=P,[mod(dstip=A),fwd(2)]) install_flowmod(4,srcip=1* & dstip=P,[mod(dstip=B),fwd(3)]) install_flowmod(4,srcip=X & dstip=A,[ fwd(2)]) install_flowmod(4,srcip=X & dstip=B,[ fwd(3)]) install_flowmod(3, dstip=A,[ fwd(2)]) install_flowmod(3,dstip=B,[fwd(3)]) install_flowmod(2,srcip=X,[fwd(1)]) install_flowmod(1,*,[fwd(3)]) 21

Pyretic ’s Design Monitoring Load Balancer –Encode Policies as Functions –Compositional Operators –Queries as Forwarding Policies MAC-Learning Module –Dynamic Policies “One Big Switch” Topology Abstraction –Extensible packet model 22

How Do We Change Policies? Dynamic policy a time-series of policies 23 P t=0 P t=1 P t=3

MAC-Learning Module class learn(): def init(self): b = bucket(limit=1,[’srcmac’,’switch’]) b.register_callback(update) self.P = flood | fwd(b) def update(self,pkt): self.P = if_(match(dstmac=pkt[’srcmac’], switch=pkt[’switch’]), fwd(pkt[’inport’]), self.P) 24 First packet with unique srcmac, switch Defined momentarily to flood If newly learned MAC Time-series object if_(P,C1,C2) = P[C1] | ~P[C2] and query Initialize current value of time series Forward directly to learned port Otherwise, policy unchanged Update current val

Pyretic ’s Design Monitoring Load Balancer –Encode Policies as Functions –Compositional Operators –Queries as Forwarding Policies MAC-Learning Module –Dynamic Policies “One Big Switch” Topology Abstraction –Extensible packet model 25

26 FieldVal[0 ] Val[1 ] srcmac dstmac proto srcip... switch inport outpor t vswitc h All OpenFlow fields Location fields Virtual fields Stacks of values – push(h=v) – pop(h) –Actions and matches use (currently) top value Implemented on OpenFlow by mapping extended field values to VLAN tags/MPLS labels Extensible Pyretic Packet Model

Simplest of topology abstraction examples Build a distributed middlebox by running centralized middlebox app on V ! “One Big Switch” Topology Abstraction 27 V S T

V S T Topology Abstraction def abstract(ingress,fabric,egress,derived): Returns a new policy for the underlying network (i.e., on nodes S and T ) that “does” the derived policy on the abstract topology (i.e., on node V ) using 3 partial transformation policies to: handle packets entering abstract switch move packets through abstract switch handle packets exiting abstract switch

FieldV0V0 V1V1 switchSV inport11 outport2 FieldV0V0 V1V1 switchSV inport11 FieldV0V0 switchT inport1 vswitchV vinport1 voutpor t 2 FieldV0V0 switchS inport1 FieldV0V0 switchT inport1 vswitch2 vinport1 voutpor t 2 FieldV0V0 switchT inport1 outport2 V S T Implementing abstract() def abstract(ingress,fabric,egress,derived): return ingress >> # defines part of transform derived >> # app run on abstract topo lower_packet >> # built-in fabric >> # defines part of transform egress # defines part of transform

Summary: Pyretic Policy Syntax 8 Actions A ::= drop | fwd(port) | flood | mod(h=v) | id | push(h=v) | pop(h) | move(h1=h2) 6 Predicates P ::= all_packets | no_packets | match(h=v) | | P & P | ( P | P ) | ~P 2 Query Buckets B ::= bucket(limit,[h]) | count_bucket(every,[h]) 5 Policies C ::= A | fwd (B) | P [C] | ( C | C ) | C >> C 30 (You may already be a Pyretic programmer!)

Summary: Abstractions 31 Pyretic Current APIs Policy Rich Composition Little Composition Network Layered Abstract Topologies Concrete Network Packet Extensible Headers Fixed OpenFlow Headers

Related Work: [Frenetic, Maestro, FRESCO] / [Click] 32 Abstracts Pyretic Current APIs Policy Rich Composition Some / Full Composition Network Layered Abstract Topologies Concrete Network Packet Extensible Headers Fixed OpenFlow Headers But only for a single software switch not multiple hardware switches

Related Work: [FlowVisor] / [Nicira NVP, OpenStack Quantum] 33 Abstracts Pyretic Current APIs Policy Rich Composition Little Composition Network Layered Abstract Topologies Disjoint Slices / Topology Hiding Packet Extensible Headers Fixed OpenFlow Headers Both approaches support multi-tenancy, but not topological decomposition (of functional composition)

Pyretic Interpreter and Suite of Apps Available at Monitoring & DPI Load Balancers Hub ARP Firewalls MAC learner 34 Abstractions –Big switch (one-to-many) –Spanning tree (many-to-many) –Gateway (many-to-one) And bigger applications built by combining these.

And More! Available at Features Request Bug reporting Link to github Discuss list Join the project 35 Dev Roadmap –Reactive (microflow) runtime –Proactive (compilation) runtime –Optimizations –Caching

Thanks for Listening! 36