CSC 458/2209 Computer Networks Handout # 16: Software-Defined

CSC 458/2209  Computer Networks Handout # 16: Software-Defined

CSC 458/2209 Computer Networks Handout # 16: Software-Defined Networking Professor Yashar Ganjali Department of Computer Science University of Toronto [email protected] http://www.cs.toronto.edu/~yganjali Announcements Programming Assignment 2 To be completed individually. Due: Friday, Nov. 29th at 5pm No tutorials this week CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 2 Announcements Final Exam Time: Tue. December 10th, 2019; 14:00-16:00 Location: A-KE: GB304 KI-OM: MS2170

OU-ZZ: ??? CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 3 The Story So Far Layering Link layer Media, framing, error detection/correction, switches, hubs, Network layer Addressing (CIDR, subnet), routing and forwarding, DNS, BGP, Transport layer TCP, UDP, flow control, congestion control, queue management, Misc: Queueing Mechanisms, Middleboxes Next: Software-defined networking

CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 4 Innovation Computers vs. Networks How difficult is it to create/modify a computer application? How difficult is it to create/modify a network feature? What is the difference? What are the tools available for each? CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 5 Innovation in Applications Applicatio n Applicatio n Application OS

Computer Computer OS abstracts hardware substrate Innovation in applications CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 6 Innovation in OS and Applications Applicatio n Applicatio n Windows (OS) Applicatio n Window s (OS)

x86 (Computer ) Applicatio n or Linu x or Mac OS x86 (Computer ) Simple, common, stable, hardware substrate below + Programmability + Competition Innovation in OS and applications CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 7

Innovation in Infrastructure Applicatio n Window s (OS) Applicatio n or Linu x or Mac OS App App Window Window Window s

ss (OS) (OS) (OS) Linu Linu Linu x xx x86 (Computer ) App Mac Mac Mac OS OS OS Virtualization x86 (Computer ) Simple, common, stable, hardware substrate below + Programmability

+ Strong isolation model + Competition above Innovation in infrastructure CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 8 Ap Ap Ap Ap Ap Ap Ap Ap Ap Ap Ap p p p p p p p p p p p Specialized Applications Specialized Operating System Open Interface Window s (OS) Linu x or Mac OS

Open Interface Specialized Hardware Microprocesso r Horizontal Open interfaces Rapid innovation Huge industry Vertically integrated Closed, proprietary Slow innovation Small industry CSC 458/CSC 2209 Computer Networks or University of Toronto Fall 2019 9 We Have Lost Our Way Routing, management, mobility management, access control, VPNs,

Feature Feature OS Custom Hardware Million of lines of source code 6,000 RFCs Billions of gates Bloated Power Hungry Vertically integrated, complex, closed, proprietary Networking industry with mainframe mind-set CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 10 Reality is Even Worse Ap

Ap p p Ap Ap p p Ap Ap p p Ap Ap p p Operating System Specialized Packet Forwarding Hardware Ap Ap p

p Ap Ap p p Operating System Specialized Packet Forwarding Hardware Lack of competition means glacial innovation Closed architecture means blurry, closed interfaces CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 11 Ap Ap Ap Ap Ap Ap Ap Ap Ap Ap Ap p p p p p p p p p p p Specialized Features Specialized Control Plane Open Interface

Contro Contro Contro or l l l or Plane Plane Plane Open Interface Merchant Switching Chips Specialized Hardware Horizontal Open interfaces Rapid innovation Vertically integrated Closed, proprietary Slow innovation CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019

12 What we need CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 13 1) Separate Intelligence from Datapath Operators, users, 3rd party developers, researchers, New function! CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 14 2) Cache Decisions In minimal flow-based datapath If header = x, send to port 4 If header = y, overwrite header with z, send to ports 5,6 If header = ?, send to me Flow Table CSC 458/CSC 2209 Computer Networks

University of Toronto Fall 2019 15 How Can We Do This? Feature Feature Network OS Feature Feature OS Feature Custom Custom Hardware Hardware Feature Feature OS Feature

Custom Custom Hardware Hardware OS Feature Custom Custom Hardware Hardware Feature OS Feature Feature Custom Custom Hardware Hardware OS Custom Custom Hardware Hardware CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019

16 Software Defined Network (SDN) 3. Consistent, up-to-date global network view Feature Feature 2. At least one Network OS probably many. Open- and closed-source Network OS 1. Open interface to packet forwarding Packet Packet Forwarding Forwarding Packet Packet Forwarding Forwarding Packet Packet Forwarding Forwarding Packet

Packet Forwarding Forwarding Packet Packet Forwarding Forwarding CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 17 Consequences More innovation in network services Owners, operators, 3rd party developers, researchers can improve the network E.g. energy management, data center management, policy routing, access control, denial of service, mobility Lower barrier to entry for competition Healthier market place, new players Lower cost Infrastructure Management CSC 458/CSC 2209 Computer Networks

University of Toronto Fall 2019 18 Example: Routing OSPF RFC 2328: 245 pages Distributed System Builds consistent, up-to-date map of the network: 101 pages Dijkstras Algorithm Operates on map: 4 pages CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 19 Example: Routing OSPF = Dijkstra IS-IS OSPF IS-IS

Distributed System Network OS Distributed System Distributed System OS Packet Packet Forwarding Forwarding Custom Hardware Packet Packet Forwarding Forwarding CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 Packet Packet Forwarding Forwarding Packet Packet

Forwarding Forwarding 20 Back to the story CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 21 Software Defined Network (SDN) Control Program A Control Program B Network OS Packet Packet Forwarding Forwarding Packet Packet Forwarding Forwarding Packet

Packet Forwarding Forwarding Packet Packet Forwarding Forwarding Packet Packet Forwarding Forwarding CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 22 Network OS Network OS: distributed system that creates a consistent, up-to-date network view Runs on servers (controllers) in the network NOX, ONIX, HyperFlow, Kandoo, Floodlight, Trema, Beacon, Maestro, Beehive, OpenDayLight, + more Uses forwarding abstraction to: Get state information from forwarding elements Give control directives to forwarding elements

CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 23 Software Defined Network (SDN) Control Program A Control Program B Network OS Packet Packet Forwarding Forwarding Packet Packet Forwarding Forwarding Packet Packet Forwarding Forwarding Packet Packet

Forwarding Forwarding Packet Packet Forwarding Forwarding CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 24 Control Program Control program operates on view of network Input: global network view (graph/database) Output: configuration of each network device Control program is not a distributed system Abstraction hides details of distributed state CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 25 Software Defined Network (SDN) Control Program A

Control Program B Network OS Packet Packet Forwarding Forwarding Packet Packet Forwarding Forwarding Packet Packet Forwarding Forwarding Packet Packet Forwarding Forwarding Packet Packet Forwarding Forwarding CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019

26 Forwarding Abstraction Purpose: Abstract away forwarding hardware Flexible Behavior specified by control plane Built from basic set of forwarding primitives Minimal Streamlined for speed and low-power Control program not vendor-specific OpenFlow is an example of such an abstraction CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 27 Forwarding Substrate Flow-based Small number of actions for each flow Plumbing: Forward to port(s) Control: Forward to controller Routing between flow-spaces: Rewrite header

Bandwidth isolation: Min/max rate External open API to flow-table CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 28 What is a flow? Application flow All http Jims traffic All packets to Canada CSC 458/CSC 2209 Computer Networks Types of action

Allow/deny flow Route & re-route flow Isolate flow Make flow private Remove flow University of Toronto Fall 2019 29 Substrate: Flowspace Ethernet DA, SA, etc IP DA, SA, etc TCP DP, SP, etc Payload Collection of bits to plumb flows (of different granularities) between end points Header User-defined flowspace

CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 Payload 30 OpenFlow Open standard to run experimental protocols in production networks API between the forwarding elements and the network OS Based in Stanford, supported by various companies (Cisco, Juniper, HP, NEC, ) Used by universities to deploy innovative networking technology CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 31

Traditional Switch Ethernet Switch CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 32 Traditional Switch Control Path Path (Software) Data Path (Hardware) CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 33 OpenFlow Switch Control Program A Control Program B Network OS OpenFlow Protocol (SSL)

Ethernet Switch Control Path OpenFlow Data Path (Hardware) CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 34 OpenFlow Rules Control Program A Control Program B Network OS If header = p, send to port 4 Packet Packet Forwarding Forwarding Packet Packet

Forwarding Forwarding CSC 458/CSC 2209 Computer Networks If header = q, overwrite header with r, add header s, and send to ports 5,6 If header = ?, send to me Flow Table(s) Packet Packet Forwarding Forwarding University of Toronto Fall 2019 35 Plumbing Primitives Match arbitrary bits in headers: Match: 1000x01xx0101001x Header Data Match on any header, or new header Allows any flow granularity

Action Forward to port(s), drop, send to controller Overwrite header with mask, push or pop Forward at specific bit-rate CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 36 OpenFlow Rules Contd Exploit the flow table in switches, routers, and chipsets Rule Flow 1. (exact & wildcard) Action Statistics Rule Flow 2. (exact & wildcard) Action Statistics Rule Flow 3. (exact & wildcard)

Action Statistics Rule Flow N. Default Action (exact & wildcard) CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 Statistics 37 Flow Table Entry OpenFlow Protocol Version 1.0 Rule Action Stats Packet + byte counters 1. Forward packet to port(s) 2. Encapsulate and forward to controller

3. Drop packet 4. Send to normal processing pipeline Switch MAC MAC Eth VLAN Port src dst type ID + mask what fields to match CSC 458/CSC 2209 Computer Networks IP Src IP Dst University of Toronto Fall 2019 IP Prot TCP TCP sport dport 38 Examples Switching Switc MAC MAC Eth

h src dst type Port * * 00:1f:.. * VLAN IP ID Src * IP Dst IP Prot TCP TCP Action sport dport * * *

port6 * * Switc MAC MAC Eth h src dst type Port VLAN IP ID Src IP Dst port3 00:2e.. 00:1f.. 0800 vlan1 1.2.3.4 5.6.7.84 17264 80 Switc MAC MAC Eth h

src dst type Port VLAN IP ID Src IP Dst IP Prot TCP TCP Forwar sport dport d * * * * * Flow Switching IP

Prot TCP TCP Action sport dport port6 Firewall * * * CSC 458/CSC 2209 Computer Networks * University of Toronto Fall 2019 22 drop 39 Examples Routing Switc MAC MAC Eth VLAN IP

h src dst type ID Src Port * * * * * * VLAN IP IP TCP TCP Action Dst Prot sport dport 5.6.7. * * * port6 8 Switc MAC MAC Eth VLAN IP h src dst type ID

Src Port IP Dst * * * * * CSC 458/CSC 2209 Computer Networks vlan1 * IP TCP TCP Action Prot sport dport port6 , port7 * * * ,port

9 University of Toronto Fall 2019 40 OpenFlow Hardware Juniper MX-series NEC IP8800 HP Procurve 5400 Cisco Catalyst 6k Quanta LB4G CSC 458/CSC 2209 Computer Networks WiMax (NEC) PC Engines More ... University of Toronto Fall 2019

41 OpenFlow Usage Example Controller Dedicated OpenFlow Network Peters code PC OpenFlow Rule Switch Action Statistics OpenFlow Protocol OpenFlow Action Switch Rule Statistics OpenFlow Action Statistics Switch Rule

Peter CSC 458/CSC 2209 Computer Networks OpenFlowSwitch.org University of Toronto Fall 2019 42 Usage examples Peters code: Static VLANs His own new routing protocol: unicast, multicast, multipath, load- balancing Network access control Home network manager Mobility manager Energy manager Packet processor (in controller) IPvPeter Network measurement and visualization CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 43

Research/Production VLANS Controller Research VLANs Flow Table Production VLANs Normal L2/L3 Processing CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 44 Virtualize OpenFlow Switch Controller A Controller B Researcher A VLANs Researcher B VLANs Researcher C VLANs Flow Table Controller C Flow Table Flow Table Production VLANs Normal L2/L3 Processing

CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 45 Virtualizing OpenFlow As Controller Bs Controller Cs Controller OpenFlow OpenFlow Protocol Protocol OpenFlow FlowVisor & Policy Control OpenFlow Switch OpenFlow OpenFlow

Protocol Protocol OpenFlow Switch CSC 458/CSC 2209 Computer Networks OpenFlow Switch University of Toronto Fall 2019 46 Virtualizing OpenFlow Broadcast Multicast http Load-balancer OpenFlow Protocol OpenFlow FlowVisor & Policy Control OpenFlow Switch

OpenFlow Protocol OpenFlow Switch CSC 458/CSC 2209 Computer Networks OpenFlow Switch University of Toronto Fall 2019 47 Food for Thought What are the challenges in switching from traditional networks to OpenFlow networks? What are the opportunities? CSC 458/CSC 2209 Computer Networks University of Toronto Fall 2019 48

Recently Viewed Presentations

  • MPI Message Passing

    MPI Message Passing

    Parallel Computing 2 The Hardware Story Ondřej Jakl Institute of Geonics, Academy of Sci. of the CR
  • The Suffering Servant - אמונה בישוע

    The Suffering Servant - אמונה בישוע

    The suffering Servant in . Deutero-Isaiah. Oxford: Oxford UniversityPress, 1948; p. 1. Messianic view "At the very outset of the Song the Servant is pictured as a priest, 'sprinkling' the unclean (52:15), and in the heart of the Song he...
  • Under the Big Top with Books and Dewey

    Under the Big Top with Books and Dewey

    These books include many of your favorite chapter books like Junie B. Jones, The Magic Tree House, Diary of a Wimpy Kid and many more. These books are organized with the letters FIC and the first three letters of the...
  • The Federal Bureaucracy:

    The Federal Bureaucracy:

    The model bureaucracy is a purposive machine with interchangeable human parts designed to facilitate collective action. Centralized control over large numbers of people (ex. Army); those at the apex have more power. Imposes heavy conformity costs.
  • Acute Kidney Injury in ICU Dr. Firouzeh Moeinzadeh

    Acute Kidney Injury in ICU Dr. Firouzeh Moeinzadeh

    hybrid therapies, ie sustained low-efficiency dialysis (SLED) 2/30/1395. Timing of initiation of RRT. Earlier initiation of RRT in critically ill patients with AKI may have a beneficial impact on survival and outcomes but data is insufficient.
  • Section 4.3  Multiplying Matrices MATRIX MULTIPLICATION 1. The

    Section 4.3 Multiplying Matrices MATRIX MULTIPLICATION 1. The

    MATRIX MULTIPLICATION. 1. The order makes a difference…AB is different from BA. 2. The number of columns in first matrix must equal number of . rows in second matrix. In other words, the inner dimensions must be equal. 3. The...
  • Types of Families - Fort Thomas Independent Schools

    Types of Families - Fort Thomas Independent Schools

    Types of Families Mrs. Wagner Parenting/Child Development Family Two or more persons related by birth, marriage, or adoption who reside in the same household - or - a group who love and care for each other Role - Parts one...
  • The microcanonical ensemble Finding the probability distribution We

    The microcanonical ensemble Finding the probability distribution We

    The microcanonical ensemble. Finding the probability distribution. We consider an isolated system in the sense that. the energy is a constant of motion. We are not able to derive from first principles. Two typical alternative approaches. Postulate of Equal a...