690 likes | 834 Views
Enabling Innovation Inside the Network. Jennifer Rexford Princeton University http:// www.cs.princeton.edu /~ jrex. Joint with Nate Foster, David Walker, Rob Harrison, Chris Monsanto, Cole Schlesinger, Mike Freedman, Mark Reitblatt , Joshua Reich. What is Networking?. e nd - hosts need
E N D
Enabling Innovation Inside the Network Jennifer Rexford Princeton University http://www.cs.princeton.edu/~jrex Joint with Nate Foster, David Walker, Rob Harrison, Chris Monsanto, Cole Schlesinger, Mike Freedman, Mark Reitblatt, Joshua Reich
What is Networking? end-hosts need to communicate
What is Networking? Ethernet switches connect them
What is Networking? which decide how packets should be forwarded Control Plane
What is Networking? and actually forward them Data Plane
What is Networking? servers
What is Networking? connected by routers
What is Networking? connected by routers w/ similar data planes
What is Networking? connected by routers plug-and-play structured and optimized but completely different control planes
What is Networking? we need gateway to bridge them
What is Networking? and load balancing for servers
What is Networking? there are other ISPs
What is Networking? requiring inter-domain routers
What is Networking? and a firewall to handle malicious traffic
What is Networking? and mobile endpoints
What is Networking? requiring wireless basestations
What is Networking? and more middleboxes for billing, lawful intercept, DPI
What is Networking? Ad absurdum
This is a Control Plane Issue each color represents a different set of control-plane protocols and algorithms
This is a Control Plane Issue whose implementation may vary by vendor and model
Software Defined Networks decouple control and data planes
Software Defined Networks decouple control and data planesby providing open standard API
(Logically) Centralized Controller Controller Platform
Protocols Applications Controller Application Controller Platform
Payoff • Cheaper equipment • Faster innovation • Easier management
A Major Trend in Networking Entire backbone runs OpenFlow Bought for $1.2 x 109 (mostly cash)
But How Should We Program SDNs? Network-wide visibility and control Controller Application Controller Platform Direct control via open interface Today’s controller APIs are tied to the underlying hardware
Data Plane: Packet Handling • Simple packet-handling rules • Pattern: match packet header bits • Actions: drop, forward, modify, send to controller • Priority: disambiguate overlapping patterns • Counters: #bytes and #packets • src=1.2.*.*, dest=3.4.5.* drop • src = *.*.*.*, dest=3.4.*.* forward(2) • 3. src=10.1.2.3, dest=*.*.*.* send to controller
Control Plane: Programmability Controller Application Controller Platform Events from switches Topology changes, Traffic statistics, Arriving packets Commands to switches (Un)install rules, Query statistics, Send packets
E.g.: Server Load Balancing • Pre-install load-balancing policy • Split traffic based on source IP src=0* src=1*
Seamless Mobility/Migration • See host sending traffic at new location • Modify rules to reroute the traffic
Network Control Loop Compute Policy Write policy Read state OpenFlow Switches
Reading State SQL-Like Query Language
Reading State: Multiple Rules • Traffic counters • Each rule counts bytes and packets • Controller can poll the counters • Multiple rules • E.g., Web server traffic except for source 1.2.3.4 • Solution: predicates • E.g., (srcip != 1.2.3.4) && (srcport == 80) • Run-time system translates into switch patterns 1. srcip = 1.2.3.4, srcport = 80 2. srcport = 80
Reading State: Unfolding Rules • Limited number of rules • Switches have limited space for rules • Cannot install all possible patterns • Must add new rules as traffic arrives • E.g., histogram of traffic by IP address • … packet arrives from source 5.6.7.8 • Solution: dynamic unfolding • Programmer specifies GroupBy(srcip) • Run-time system dynamically adds rules 1. srcip = 1.2.3.4 2. srcip = 5.6.7.8 1. srcip = 1.2.3.4
Reading: Extra Unexpected Events • Common programming idiom • First packet goes to the controller • Controller application installs rules packets
Reading: Extra Unexpected Events • More packets arrive before rules installed? • Multiple packets reach the controller packets
Reading: Extra Unexpected Events • Solution: suppress extra events • Programmer specifies “Limit(1)” • Run-time system hides the extra events not seen by application packets
Frenetic SQL-Like Query Language • Get what you ask for • Nothing more, nothing less • SQL-like query language • Familiar abstraction • Returns a stream • Intuitive cost model • Minimize controller overhead • Filter using high-level patterns • Limit the # of values returned • Aggregate by #/size of packets Traffic Monitoring Select(bytes) * Where(in:2 & srcport:80) * GroupBy([dstmac]) * Every(60) Learning Host Location Select(packets) * GroupBy([srcmac]) * SplitWhen([inport]) * Limit(1)
Computing Policy Parallel and Sequential Composition Abstract Topology Views
Combining Many Networking Tasks Monolithic application Monitor + Route + FW + LB Controller Platform Hard to program, test, debug, reuse, port, …
Modular Controller Applications A module for each task Monitor Route FW LB Controller Platform Easier to program, test, and debug Greater reusability and portability
Modules Affect the Same Traffic Each module partially specifies the handling of the traffic FW LB Monitor Route Controller Platform How to combine modules into a complete application?
Parallel Composition [ICFP’11, POPL’12] srcip = 5.6.7.8 count srcip = 5.6.7.9 count dstip = 1.2/16 fwd(1) dstip = 3.4.5/24 fwd(2) Route on destprefix Monitor on source IP + Controller Platform srcip = 5.6.7.8, dstip = 1.2/16 fwd(1), count srcip = 5.6.7.8, dstip = 3.4.5/24 fwd(2), count srcip = 5.6.7.9, dstip = 1.2/16 fwd(1), count srcip = 5.6.7.9, dstip = 3.4.5/24 fwd(2), count
Example: Server Load Balancer • Spread client traffic over server replicas • Public IP address for the service • Split traffic based on client IP • Rewrite the server IP address • Then, route to the replica 10.0.0.1 10.0.0.2 1.2.3.4 clients load balancer 10.0.0.3 server replicas