cs 5114 network programming languages software … * switch port mac src mac dst eth type vlan id ip...
TRANSCRIPT
![Page 1: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/1.jpg)
http://www.!ickr.com/photos/ro"/2097239111/
Nate Foster Cornell University Spring 2013 Based on lecture notes by Aditya Akella (and transitively, Aaron Gember, and Nick McKeown)
CS 5114 Network Programming Languages Software-De!ned Networking
![Page 2: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/2.jpg)
Announcements
Office Hours 3-4pm today in Upson 4137
Homework #1 • Goes out today (on CMS) • Due in two weeks • Topic: Basic OpenFlow programming
![Page 3: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/3.jpg)
Vertically integrated Closed, proprietary
Slow innovation Small industry
Specialized Operating
System
Specialized Hardware
App App App App App App App App App App App
Specialized Applications
Horizontal Open interfaces
Rapid innovation Huge industry
Microprocessor
Open Interface
Linux Mac OS
Windows (OS) or or
Open Interface
![Page 4: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/4.jpg)
Vertically integrated Closed, proprietary
Slow innovation
App App App App App App App App App App App
Horizontal Open interfaces
Rapid innovation
Control Plane
Control Plane
Control Plane or or
Open Interface
Specialized Control Plane
Specialized Hardware
Specialized Features
Merchant Switching Chips
Open Interface
![Page 5: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/5.jpg)
Specialized Packet Forwarding Hardware
App
App
App
Specialized Packet Forwarding Hardware
App
App
App
Specialized Packet Forwarding Hardware
App
App
App
Specialized Packet Forwarding Hardware
App
App
App
Specialized Packet Forwarding Hardware
Operating System
Operating System
Operating System
Operating System
Operating System
App
App
App
5
Today Closed Boxes, Fully Distributed Protocols
Closed
![Page 6: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/6.jpg)
Control Program Control Program
Network OS
1. Open interface to packet forwarding
2. At least one Network OS Open- and closed-source
Software De!ned Network (SDN)
Packet Forwarding
Packet Forwarding
Packet Forwarding
Packet Forwarding
Packet Forwarding
Global Network View
![Page 7: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/7.jpg)
Software De!ned Network (SDN)
Global Network View
Network Virtualization
Packet Forwarding
Packet
Forwarding
Packet Forwarding
Packet Forwarding
Packet Forwarding
Network OS
Abstract Network View
Control Programs
f View( )Control
Programs
f View( )Control
Programs
f View( )Control logics
Control platform
![Page 8: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/8.jpg)
Control Logic
Runs on one or more controllers
Manages computation of forwarding state and perhaps coordination among instances
Control platform provides basic services to ease the latter (e.g., state distribution mechanisms)
Logic must decide how to partition computation, deal with failover, and implement the consistency model
![Page 9: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/9.jpg)
Control Platform
Schedule computations over the network graph
Store network state and support for different consistency models
Most control platforms today run a single application § Not clear yet how to resolve interference (e.g., policy
routing vs. traffic engineering) § We’re trying to answer some of these questions in the
Frenetic project
![Page 10: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/10.jpg)
State Distribution Abstraction
Control program should not have to handle all distributed-state details
Proposed abstraction: global network view
Control program operates on network view § Input: global network view (graph) § Output: con!guration of each network device
Network OS provides network view
![Page 11: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/11.jpg)
Forwarding Abstraction
Forwarding behavior speci!ed by a control program.
Possibilities: x86, MPLS, OpenFlow
![Page 12: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/12.jpg)
Example
Custom Hardware
OS
OSPF
IS-IS Distributed
System Distributed
System
OSPF (Dijkstra) IS-IS
Network OS
Packet Forwarding
Packet Forwarding
Packet Forwarding
Packet Forwarding
Distributed System
New!
![Page 13: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/13.jpg)
Control Program A Control Program B
Network OS
OpenFlow Forwarding Abstraction
Packet Forwarding
Packet Forwarding
Packet Forwarding
Flow Table(s)
“If header = p, send to port 4”
“If header = ?, send to me”
“If header = q, overwrite header with r, add header s, and send to ports 5,6”
![Page 14: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/14.jpg)
Ethernet Switch
How does OpenFlow work?
![Page 15: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/15.jpg)
Data Path (Hardware)
Control Path Control Path (Software)
![Page 16: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/16.jpg)
Data Path (Hardware)
Control Path OpenFlow
OpenFlow Controller
OpenFlow Protocol (SSL/TCP)
![Page 17: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/17.jpg)
OpenFlow Forwarding Abstraction
Patterns
– Match on any header, or new header – Allows any $ow granularity
Actions
– Forward to port(s), drop, send to controller – Overwrite header with mask, push or pop labels – Forward at speci!c bit-rate
Header Data
Example: 1000x01xx0101001x
![Page 18: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/18.jpg)
Controller
PC
Hardware Layer
Software Layer
Flow Table
MAC src
MAC dst
IP Src
IP Dst
TCP sport
TCP dport Action
OpenFlow Client
* * 5.6.7.8 * * * port 1
port 4 port 3 port 2 port 1
1.2.3.4 5.6.7.8
Example
![Page 19: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/19.jpg)
OpenFlow Flow Tables
Switch Port
MAC src
MAC dst
Eth type
VLAN ID
IP Src
IP Dst
IP Prot
L4 sport
L4 dport
Rule Action Stats
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!
+ mask what "elds to match
Packet + byte counters
VLAN pcp
IP ToS
![Page 20: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/20.jpg)
Examples
Switching
*
Switch Port
MAC src
MAC dst
Eth type
VLAN ID
IP Src
IP Dst
IP Prot
TCP sport
TCP dport Action
* 00:1f:.. * * * * * * * port6
Flow Switching
port3
Switch Port
MAC src
MAC dst
Eth type
VLAN ID
IP Src
IP Dst
IP Prot
TCP sport
TCP dport Action
00:20.. 00:1f.. 0800 vlan1 1.2.3.4 5.6.7.8 4 17264 80 port6
Firewall
*
Switch Port
MAC src
MAC dst
Eth type
VLAN ID
IP Src
IP Dst
IP Prot
TCP sport
TCP dport Action
* * * * * * * * 22 drop
![Page 21: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/21.jpg)
OpenFlow Forwarding Abstraction
Protocol Independent § Construct Ethernet, IPv4, VLAN, MPLS, … § Construct new forwarding methods
Backward Compatible § Run in existing networks
Technology Independent § Switches, routers, WiFi APs § Cellular basestations § WDM/TDM circuits
![Page 22: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/22.jpg)
Things to Note about Forwarding
Common OpenFlow model is to use !rst packets of $ows to compute and push state
Flows vs state: SDN allows more general models of forwarding state management independent of traffic § Events trigger changes, e.g., failures, control traffic § Managing inconsistencies is critical
Fabrics vs switches: Control logics don’t have to deal with switches § They essentially program a fabric that looks like one large
switch and supports end-to-end connectivity by default § Complex logic pushed to the edge
![Page 23: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/23.jpg)
Virtual Data Paths
Thinking in terms of fabrics essentially means control logics have to deal with simpler topologies § Topology captured by “virtual data paths” – Depending on control logic, can be very simple: for access
controls it is just data path through a single switch § Every virtual element uses familiar forwarding
abstractions, e.g., L2, L3 and ACLs Control platform responsible for mapping virtual data
path to the physical network
![Page 24: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/24.jpg)
SDN in development
Domains Data centers Public clouds Enterprise/campus Cellular backhaul Enterprise WiFi WANs Home networks
Products Switches, routers:
About 15 vendors Software: 8-10 vendors
and startups
New startups. Lots of hiring in networking.
![Page 25: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/25.jpg)
The SDN Stack
Controller NOX
Slicing Software FlowVisor
FlowVisor Console
Applications CloudNaaS Simple Switch … Stratos
NetFPGA Software Ref. Switch
Broadcom Ref. Switch
OpenWRT PCEngine WiFi AP
Commercial Switches
OpenFlow Switches
…
Open vSwitch
HP, NEC, Pronto, Juniper.. and many more
Beacon Trema Maestro
![Page 26: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/26.jpg)
The SDN Stack
Controller
OpenFlow Switches
![Page 27: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/27.jpg)
OpenFlow Progression
OF v1.0: released end of 2009: “Into the Campus”
OF v1.1: released March 1 2011: “Into the WAN” § multiple tables: leverage additional tables § tags and tunnels: MPLS, VLAN, virtual ports § multipath forwarding: ECMP, groups
OF v1.2: approved Dec 8 2011: “Extensible Protocol” § extensible match § extensible actions § IPv6 § multiple controllers
OF v1.3: approved May 17 2012
![Page 28: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/28.jpg)
The SDN Stack
Controller
NetFPGA Software Ref. Switch
Broadcom Ref. Switch
OpenWRT PCEngine WiFi AP
Commercial Switches
OpenFlow Switches
Open vSwitch
HP, NEC, Pronto, Juniper.. and many more
![Page 29: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/29.jpg)
Switches
Vendor Models
Virtualize?
Notes Image
HP ProCurve
5400zl, 6600, +
1 OF instance per VLAN
- LACP, VLAN and STP processing before OF - Wildcard rules or non-IP pkts processed in s/w - Header rewriting in s/w - CPU protects mgmt during loop
Pronto/ Pica8
3290, 3780, 3920, +
1 OF instance per switch
- No legacy protocols (like VLAN and STP) - Most actions processed in hardware - MAC header rewriting in h/w
Name Lang Platform(s) Original Author Notes
OpenFlow Reference
C Linux Stanford/Nicira not designed for extensibility
Open vSwitch
C/ Python Linux/BSD? Ben Pfaff/Nicira In Linux kernel 3.3+
Indigo C/Lua Linux-based Hardware Switches
Dan Talayco/BigSwitch Bare OpenFlow switch
![Page 30: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/30.jpg)
The SDN Stack
Controller NOX
NetFPGA Software Ref. Switch
Broadcom Ref. Switch
OpenWRT PCEngine WiFi AP
Commercial Switches
OpenFlow Switches
…
Open vSwitch
HP, NEC, Pronto, Juniper.. and many more
Beacon Trema Maestro
![Page 31: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/31.jpg)
Controllers
Name Lang Original Author Notes
OpenFlow Reference
C Stanford/Nicira not designed for extensibility
NOX Python, C++ Nicira actively developed
Beacon Java David Erickson (Stanford) runtime modular, web UI framework, regression test framework
Maestro Java Zheng Cai (Rice)
Trema Ruby, C NEC includes emulator, regression test framework
RouteFlow ? CPqD (Brazil) virtual IP routing as a service
POX Python
Floodlight Java BigSwitch, based on Beacon
Too many to easily keep track of… http://yuba.stanford.edu/~casado/of-sw.html
![Page 32: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/32.jpg)
The SDN Stack
Controller NOX
Slicing Software FlowVisor
FlowVisor Console
NetFPGA Software Ref. Switch
Broadcom Ref. Switch
OpenWRT PCEngine WiFi AP
Commercial Switches
OpenFlow Switches
…
Open vSwitch
HP, NEC, Pronto, Juniper.. and many more
Beacon Trema Maestro
![Page 33: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/33.jpg)
The SDN Stack
Controller NOX
Slicing Software FlowVisor
FlowVisor Console
Applications CloudNaaS Simple Switch … Stratos
NetFPGA Software Ref. Switch
Broadcom Ref. Switch
OpenWRT PCEngine WiFi AP
Commercial Switches
OpenFlow Switches
…
Open vSwitch
HP, NEC, Pronto, Juniper.. and many more
Beacon Trema Maestro
![Page 34: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/34.jpg)
How SDN will shape networking
1. Empower network owners and operators § Customize networks to local needs § Eliminate unneeded features § Creation of virtual, isolated networks
2. Increase the pace of innovation § Innovation at software speed § Standards (if any) will follow software deployment § Technology exchange with partners § Technology transfer from universities
![Page 35: CS 5114 Network Programming Languages Software … * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 drop . OpenFlow](https://reader034.vdocuments.pub/reader034/viewer/2022042708/5aa015b97f8b9a7f178da839/html5/thumbnails/35.jpg)
Summary
Networks becoming § More programmatic § De!ned by owners and operators, not vendors § Faster changing, to meet operator needs § Lower opex, capex and power
Abstractions § Will shield programmers from complexity § Make behavior formally veri!able § “Will take us places we can’t yet imagine”