Software Defined Networking (SDN) Tópicos Avançados de Redes 2012/13 Pedro Brandão TAR 2012/13 - SDNs - pbrandao 2 References The slides from this presentation are a remix of external sources, namely: OpenFlow Tutorial, Open Networking Summit, by Brandon Heller, Rob Sherwood, David Erickson, Hideyuki Shimonishi, Srini Seetharaman, Murphy McCauley Software-Defined Networking (SDN), EE122, Fall 2011, by Scott Shenker Software Defined Networking 1
TAR 2012/13 - SDNs - pbrandao 3 Software Defined Networking What is it? Some views: Provide an abstraction and modularity to the network as it exists on software programming; Provide greater flexibility in managing networks independently of the hardware vendor lock-in, domain, network; SDN came out of Stanford Univ. Labs TAR 2012/13 - SDNs - pbrandao 4 Motivation Internet complexity Started simple New requirements use the current adding new stuff complexity No separation between control pane and data plane OSPF and packets on the same level Network development Faster not better Closed Systems (Vendor Hardware) Software Defined Networking 2
TAR 2012/13 - SDNs - pbrandao 5 Feature System Feature Specialized Packet The Networking Industry (2007) Routing, management, mobility management, access control, VPNs, Million of lines of source code Billions of gates 5400 RFCs Barrier to entry Complex Power Hungry Many complex functions baked into the infrastructure OSPF, BGP, multicast, differentiated services, Traffic Engineering, NAT, firewalls, MPLS, redundant layers, An industry with a mainframe-mentality Little ability for non-telco network operators to get what they want Functionality defined by standards, put in hardware, deployed on nodes 5 TAR 2012/13 - SDNs - pbrandao 6 SDN View 1 Abstractions for the network, Scott Shenker s view Software Defined Networking 3
TAR 2012/13 - SDNs - pbrandao 7 Internet: Layers lications built on Reliable (or unreliable) transport built on Best-effort global packet delivery built on Best-effort local packet delivery built on Physical transfer of bits Layers deal with the data plane TAR 2012/13 - SDNs - pbrandao 8 New requirements Adding complexity Isolate traffic VLANs, ACLs Traffic Eng. MPLS, ECMP Packet processing Firewalls, NATs Payload analysis Deep packet inspection (DPI) This was usually added to each network component (switch, router, NAT box, etc.) All adding to the control plane while keeping the data plane modular/simple Software Defined Networking 4
TAR 2012/13 - SDNs - pbrandao 9 Scott Shenker s Point Networking still focused on mastering complexity Little emphasis on extracting simplicity from control plane No recognition that there s a difference. Extracting simplicity builds intellectual foundations Necessary for creating a discipline. TAR 2012/13 - SDNs - pbrandao 10 Example: Programming Machine languages: no abstractions Mastering complexity was crucial Higher-level languages: OS and other abstractions File system, virtual memory, abstract data types,... Modern languages: even more abstractions Object orientation, garbage collection, Abstractions key to extracting simplicity Software Defined Networking 5
TAR 2012/13 - SDNs - pbrandao 11 Requirements to Abstractions Network impose the following requirements that can be tackled by the abstractions: 1. Operate without communication guarantees Need an abstraction for distributed state 2. Compute the configuration of each physical device Need an abstraction that simplifies configuration 3. Operate within given network-level protocol Need an abstraction for general forwarding model TAR 2012/13 - SDNs - pbrandao 12 1. Distributed State Abstraction Shield control mechanisms from state distribution While allowing access to this state Natural abstraction: global network view Annotated network graph provided through an API Implemented with Network System Control mechanism is now program using API No longer a distributed protocol, now just a graph algorithm E.g. Use Dijkstra rather than Bellman-Ford Software Defined Networking 6
TAR 2012/13 - SDNs - pbrandao 13 Traditional control mechanism Distributed algorithm running between neighbors Network of switches/routers TAR 2012/13 - SDNs - pbrandao 14 Software Defined Network (SDN) e.g. routing, access control Control Program Global Network View Network OS Software Defined Networking 7
TAR 2012/13 - SDNs - pbrandao 15 Major Change in Paradigm No longer designing distributed control protocols Design one distributed system (NOS) Use for all control functions Now just defining a centralized control function Configuration = Function(view) TAR 2012/13 - SDNs - pbrandao 16 2. Specification Abstraction Control program should express desired behaviour It should not be responsible for implementing that behaviour on physical network infrastructure Natural abstraction: simplified model of network Simple model with only enough detail to specify goals Requires a new shared control layer: Map abstract configuration to physical configuration This is network virtualization Software Defined Networking 8
TAR 2012/13 - SDNs - pbrandao 17 Simple Example: Access Control What Abstract Network Model Global Network View How TAR 2012/13 - SDNs - pbrandao 18 Software Defined Network: Take 2 Abstract Network Model Network Control Virtualization Program Global Network View Network OS Software Defined Networking 9
Software Defined Network: Take 2 Specifies behavior Compiles to topology Transmits to switches Control Program Abstract Network Model Network Virtualization Global Network View Network OS 3. Forwarding Abstraction Switches have two brains Management CPU (smart but slow) Forwarding ASIC (fast but dumb) Need a forwarding abstraction for both CPU abstraction can be almost anything ASIC abstraction is much more subtle: OpenFlow OpenFlow: Control switch by inserting <header;action> entries Essentially gives NOS remote access to forwarding table Instantiated in Open vswitch Software Defined Networking 10
22 TAR 2012/13 - SDNs - pbrandao 21 Tópicos Avançados de Redes 2012/13 SDN View 2 Refactoring Functionality, Nick McKeown s view Today Closed Boxes, Fully Distributed Protocols Closed TAR 2012/13 - SDNs - pbrandao System Specialized Packet System Specialized Packet System Specialized Packet System Specialized Packet System Specialized Packet [dcc] Software Defined Networking 11
23 Tópicos Avançados de Redes 2012/13 Software Defined Networking approach to open it Network System TAR 2012/13 - SDNs - pbrandao System Specialized Packet System Specialized Packet System Specialized Packet System Specialized Packet System 24 Specialized Packet [dcc] The Software-defined Network 2. At least one good operating system Extensible, possibly open-source 3. Well-defined open API Network System TAR 2012/13 - SDNs - pbrandao 1. Open interface to hardware Simple Packet Forwarding Hardware Simple Packet Forwarding Hardware Simple Packet Forwarding Hardware Simple Packet Forwarding Hardware Software Defined Networking Simple Packet Forwarding Hardware [dcc] 12
Tópicos Avançados de Redes 2012/13 Many operating systems, or Many versions 25 Isolated slices Network System 1 Network System 2 Network System 3 Network System 4 Open interface to hardware TAR 2012/13 - SDNs - pbrandao Virtualization or Slicing Layer Open interface to hardware Simple Packet Simple Packet Simple Packet [dcc] TAR 2012/13 - SDNs - pbrandao 26 Simple Packet Simple Packet SDN View 3 Design axes, Brandon Heller s view Software Defined Networking 13
28 TAR 2012/13 - SDNs - pbrandao 27 Tópicos Avançados de Redes 2012/13 SDN is The ability to tweak between the following configuration/control settings Centralized vs Distributed Control Microflow vs. Aggregated Reactive vs. Proactive (pre-populated) Virtual vs. Physical Fully Consistent vs. Eventually Consistent Centralized vs. Distributed Control Centralized Control Controller Distributed Control Controller OpenFlow Switch OpenFlow Switch Controller OpenFlow Switch OpenFlow Switch Controller OpenFlow Switch OpenFlow Switch Software Defined Networking 14
29 30 Microflow vs. Aggregated Microflow Every flow is individually set up by controller Exact-match flow entries Flow table contains one entry per flow Good for fine grain control, policy, and monitoring, e.g. campus Aggregated One flow entry covers large groups of flows Wildcard flow entries Flow table contains one entry per category of flows Good for large number of flows, e.g. backbone Reactive vs. Proactive (pre-populated) Reactive First packet of flow triggers controller to insert flow entries Efficient use of flow table Every flow incurs small additional flow setup time If control connection lost, switch has limited utility Extremely simple fault recovery Proactive Controller pre-populates flow table in switch Zero additional flow setup time Loss of control connection does not disrupt traffic Essentially requires aggregated (wildcard) rules Software Defined Networking 15
31 32 Virtual vs. Physical Virtual Assumes configurable switching within a host: in the OS or hypervisor Software! Memory, processing, arbitrary modifications Massive flow rates Limited to the hardware below Physical No assumption of software changes; unmodified end hosts Greater control over expensive forwarding resources Fully Consistent vs. Eventually Consistent Fully Consistent Certainty about state Consistent state is harder to scale Easier to reason about state and its transitions May eliminate route flaps Eventually Consistent Uncertainty about state now, but eventually converges Probabilistic state is easier to scale Introduces the possibility of long-lived route flaps and unstable control systems Software Defined Networking 16
TAR 2012/13 - SDNs - pbrandao 33 http://www.openflow.org/ TAR 2012/13 - SDNs - pbrandao 34 What is OpenFlow Adds the ability to modify, experiment But still harder than it should be to add features to a network Effectively assembly programming [OpenFlow is just a forwarding table management protocol] Software Defined Networking 17
TAR 2012/13 - SDNs - pbrandao 35 OpenFlow: a pragmatic compromise + Speed, scale, fidelity of vendor hardware + Flexibility and control of software and simulation + Vendors don t need to expose implementation + Leverages hardware inside most switches today (ACL tables) - Least-common-denominator interface may prevent using all hardware features - Limited table sizes - Switches not designed for this - New failure modes to understand TAR 2012/13 - SDNs - pbrandao 36 Ethernet Switch Software Defined Networking 18
TAR 2012/13 - SDNs - pbrandao 37 Control Path (Software) Data Path (Hardware) TAR 2012/13 - SDNs - pbrandao 38 OpenFlow Controller OpenFlow Protocol (SSL/TCP) Control Path OpenFlow Data Path (Hardware) Software Defined Networking 19
TAR 2012/13 - SDNs - pbrandao 39 OpenFlow example Software Layer Hardware Layer OpenFlow Client Src Dst Flow Table Src Dst TCP SPort TCP DPort Action * * * 5.6.7.8 * * port 1 port 1 port 2 port 3 port 4 Controller PC 5.6.7.8 1.2.3.4 TAR 2012/13 - SDNs - pbrandao 40 OpenFlow Basics Flow Table Entries Rule Action Stats Packet + byte counters 1. Forward packet to zero or more ports 2. Encapsulate and forward to controller 3. Send to normal processing pipeline 4. Modify Fields 5. Any extensions you add! Switch Port VLAN ID VLAN pcp src dst Eth type Src Dst ToS Prot L4 sport L4 dport + mask what fields to match Software Defined Networking 20
TAR 2012/13 - SDNs - pbrandao 41 Examples Switching Switch Port * Src Flow Switching Switch Port Dst Eth Type VLAN ID Src Dst Prot TCP Sport TCP Dport Action * 00:1f:.. * * * * * * * port6 port3 00:20.. 00:1f.. 0800 vlan1 1.2.3.4 5.6.7.8 4 17264 80 port6 Firewall Switch Port Src Src Dst Dst Eth Type Eth Type VLAN ID VLAN ID Src Src Dst Dst Prot Prot TCP Sport TCP Sport TCP Dport TCP Dport Action Action * * * * * * * * * 22 drop TAR 2012/13 - SDNs - pbrandao 42 Examples Routing Switch Port Src * * * * * * 5.6.7.8 * * * port6 VLAN Switching Switch Port Src Dst Dst Eth Type Eth Type VLAN ID VLAN ID Src Src Dst Dst Prot Prot TCP Sport TCP Sport * * 00:1f.. * vlan1 * * * * * TCP Dport TCP Dport Action Action port6, port7, port9 Software Defined Networking 21
TAR 2012/13 - SDNs - pbrandao 43 SDN and OpenFlow The SDN Stack oftrace oflops openseer Monitoring/ debugging tools ENVI (GUI) LAVI n-casting lications NOX Beacon Helios Maestro Controller FlowVisor Console FlowVisor Slicing Software Commercial Switches HP, NEC, Pronto, Juniper.. and many more Software Ref. Switch OpenWRT NetFPGA PCEngine WiFi AP Broadcom Ref. Switch Open vswitch OpenFlow Switches [d 44cc] Software Defined Networking 22
TAR 2012/13 - SDNs - pbrandao 45 Tópicos Avançados de Redes 2012/13 Implementations Slicing: FlowVisor Controllers: NOX/POX, Trema (Helios), Beacon Software switches Open VSwitch, NetFPGA, OpenWRT See all at OpenFlow Components SDN Projects ON.Lab Floodlight RouteFlow FP7 Ofelia Related: Mininet TAR 2012/13 - SDNs - pbrandao 46 Video demos from Stanford Univ. FlowVisor Hypervisor for OpenFlow Slices Aster*x Load balancing as a network primitive PAC.C Packet and Circuit Network Convergence Software Defined Networking 23
TAR 2012/13 - SDNs - pbrandao 48 TAR 2012/13 - SDNs - pbrandao 47 That s that In summary SDN Provides a modularity/abstraction for networking Allows greater flexibility in managing networks And virtualization of physical resources Openflow defines a control protocol for instrumenting rules on net equipment that is managed by a controller Expose tables from said equipment Opens up new avenues for research and network usage (provider view) Software Defined Networking 24
TAR 2012/13 - SDNs - pbrandao 49 The end TAR 2012/13 - SDNs - pbrandao 50 Acronyms ACL Access Control List ASIC lication Specific Integrated Circuit DPI Deep Packet Inspection ECMP Equal Cost Multi Path MPLS Multiprotocol Label Switching NOS Network OS OS System PCP Priority Code Point RFC Request For Comments SDN Software Defined Networking Telco Telecommunication Operator ToS Type of Service Software Defined Networking 25
TAR 2012/13 - SDNs - pbrandao 51 References [Specs] OpenFlow Specifications at Open Networking Foundation, Latest spec 1.3.1 Sept. 6 2012 [WP-ONF] Software-Defined Networking (SDN): The New Norm for Networks, Open Networking Foundation [WP-Orig] Nick McKeown etal, OpenFlow: Enabling Innovation in Campus Networks, March 2008 Software Defined Networking 26