Professional Documents
Culture Documents
Lec18 - SDN
Lec18 - SDN
Software-Defined Networking
UG3 Computer Communications & Networks
(COMN)
Myungjin Lee
myungjin.lee@ed.ac.uk
Courtesy note: Slides from course CPS514 Spring 2013 at Duke University
and Hot Interconnects Keynote by Nick McKeown, 2012
Outline
• What is SDN?
– Limitations of current networks
– The idea of Network OS
• What is OpenFlow?
– How it helps SDN
http://www.excitingip.net/27/a-basic-enterprise-lan-network-architecture-block-diagram-and-components/
Limitations of Current Networks
Operating
System
App App App
Specialized Packet
Forwarding Hardware
Operating
System
Specialized Packet
Forwarding Hardware Operating
System
Specialized Packet
App App App
Forwarding Hardware
Operating
System
Specialized Packet
Forwarding Hardware
OpenFlow/SDN tutorial, Srini Seetharaman, Deutsche Telekom, Silicon Valley Innovation Center
Limitations of Current Networks
Feature Feature
Million of lines Many complex functions baked
of source code into infrastructure
Operating
System
OSPF, BGP, multicast,
differentiated services,
Specialized Packet
Billions of Traffic Engineering, NAT,
Forwarding Hardware
gates
firewalls, …
OpenFlow/SDN tutorial, Srini Seetharaman, Deutsche Telekom, Silicon Valley Innovation Center
Limitations of Current Networks
Closed
App App App
Operating
System
App App App
Specialized Packet
Forwarding Hardware
Operating
System
Specialized Packet
Forwarding Hardware Operating
System
Specialized Packet
App App App
Forwarding Hardware
Operating
System
Specialized Packet
Forwarding Hardware
OpenFlow/SDN tutorial, Srini Seetharaman, Deutsche Telekom, Silicon Valley Innovation Center
Idea: An OS for Networks
Control Programs
Operating
System
App App App
Specialized Packet
Forwarding Hardware
Operating
System
Specialized Packet
Forwarding Hardware Operating
System
Specialized Packet
App App App
Forwarding Hardware
Operating
System
Specialized Packet
Forwarding Hardware
OpenFlow/SDN tutorial, Srini Seetharaman, Deutsche Telekom, Silicon Valley Innovation Center
Idea: An OS for Networks
Control Programs
Simple Packet
Forwarding
Hardware Simple Packet
Forwarding
Hardware
Simple Packet
Forwarding
Hardware
Simple Packet
Forwarding
Hardware
Simple Packet
Forwarding
Hardware
OpenFlow/SDN tutorial, Srini Seetharaman, Deutsche Telekom, Silicon Valley Innovation Center
Idea: An OS for Networks
Control Programs
The Future of Networking, and the Past of Protocols, Scott Shenker, with Martin Casado, Teemu Koponen, Nick McKeown
Software Defined Networking
• Questions:
• What is SDN?
– Limitations of current networks
– The idea of Network OS
• What is OpenFlow?
– How it helps SDN
OpenFlow Tutorial
– search: “OpenFlow Tutorial”
Mininet
– Network emulator
– Designed for emulating SDN networks
– Easy to use
– High performance (100 nodes on a laptop)
– search: “Mininet”
OpenFlow Switches?
Software switch
– Open vSwitch (openvswitch.org)
– Now part of Linux distribution
Hardware switches
– Announcements from several vendors
– HP, Brocade, NEC, …
– (You could ask Google for one of theirs J)
OpenFlow Basics
OpenFlow Switch
OpenFlow Basics
OpenFlow Controller
Flow table
1.<Rule1, port1>
OpenFlow Protocol (SSL) 2.<Rule2, drop>
3.<Rule3, port2>
Control
OpenFlow 4.<Rule4, port2>
Path No match
PC
Software
Layer
OpenFlow Client
OpenFlow Table
MAC MAC IP IP TCP TCP
Action
src dst Src Dst sport dport
Hardware
* * * 5.6.7.8 * * port 1
Layer
5.6.7.8 1.2.3.4 20
The Stanford Clean Slate Program, http://cleanslate.stanford.edu
OpenFlow Table Entry
Firewall
OpenFlow/SDN tutorial, Srini Seetharaman, Deutsche Telekom, Silicon Valley Innovation Center
OpenFlow Usage
Controller
Alice’s Rule
OpenFlow Switch Alice’s code
PC
Decision?
OpenFlow
Protocol
Alice’s Rule
OpenFlow Switch Alice’s Rule
OpenFlow Switch
OpenFlow/SDN tutorial, Srini Seetharaman, Deutsche Telekom, Silicon Valley Innovation Center
OpenFlow Usage
Controller
» Alice’s code: Alice’s code
˃ Simple learning switch
˃ Per Flow switching PC
˃ Network access
control/firewall
˃ Static “VLANs”
˃ Her own new routing
protocol:
unicast, multicast, multipath
˃ Home network manager
˃ Packet processor (in
controller)
˃ IPvAlice
OpenFlow/SDN tutorial, Srini Seetharaman, Deutsche Telekom, Silicon Valley Innovation Center
OpenFlow
OpenFlow OpenFlow
Switch Switch
Controller
OpenFlow OpenFlow
Switch Switch
OpenFlow OpenFlow
Switch Switch
Ongoing focuses of SDN
• What is SDN?
– Limitations of current networks
– The idea of Network OS
• What is OpenFlow?
– How it helps SDN
Complex interaction
– Between multiple protocols on a switch/router.
– Between state on different switches/routers.
Operators can’t…
– Observe all state.
– Control all state.
Networks are kept working by
“Masters of Complexity”
A handful of books
Almost no papers
No classes
YoYo
“You’re On Your Own”
Yo-Yo Ma
“You’re On Your Own, Mate”
With SDN we can:
1. Formally verify that our networks are
behaving correctly
2. Identify bugs, then systematically track down
their root cause
Software Defined Network (SDN)
firewall.c
…
Packet
Packet Forwarding
Forwarding
Packet
Forwarding
Example debugging tools
Stanford University
Backtrace: Software Programming
Function A():
u = B(v)
Breakpoint
“u == error”
Function B():
w = C(x) Backtrace
File “A”, line 10, Function A()
File “B”, line 43, Function B()
File “C”, line 21, Function C()
Function C():
y = error
Interactive Debugging with ndb
Problem
When an operational network misbehaves,
it is very hard to find the root cause
Goal
– Allow users to define a Network Breakpoint
– Capture and reconstruct the sequence of events
leading to the breakpoint.
Network Debugger
Breakpoint
Switch =
IP src = , IP dst = Collector
TCP Port = 22
Network Debugger
1. <Match, Action>
2. <Match, Action>
3. <Match, Action>
4. <Match, Action> 1. <Match, Action>
5. <Match, Action> 2. <Match, Action>
6. … 3. <Match, Action>
7. … 4. <Match, Action>
5. <Match, Action>
6. … 1. <Match, Action>
7. … 2. <Match, Action>
3. <Match, Action>
4. <Match, Action>
5. <Match, Action> 1. <Match, Action>
6. … 2. <Match, Action>
7. … 3. <Match, Action>
4. <Match, Action>
5. <Match, Action>
6. …
7. …
Collector
Control Control Control
Programs Programs Programs
Network Virtualization
Network OS
Flow Table State Recorder
Network Virtualization
Network OS
1. <Match, Action>
2. <Match, Action>
Breakpoint
Switch =
IP src = , IP dst = Collector
TCP Port = 22
firewall.c
…
Control Control
if( pkt->tcp->dport == 22) Control
Programs Programs
dropPacket(pkt);Programs
…
Network Virtualization
Network OS
1. <Match, Action>
2. <Match, Action>
3. <Port == 22,
Drop>
4. <Match, Action>
5. <Match, Action>
6. <Match, Action>
Breakpoint
Switch =
IP src = , IP dst = Collector
TCP Port = 22
Who benefits
Network developers
– Programmers debugging control programs
Network operators
– Find policy error
– Send error report to switch vendor
– Send error report to control program vendor
2. PathDump
Tracing paths of individual packets and
debugging problems in a datacenter network
http://homepages.inf.ed.ac.uk/mlee23/paper/osdi16.pdf
Packet trajectory tracing
4 5 6 violation
Actual Path: 1 – 4 – 3
1 2 3
Dst
Packet trajectory tracing
Core
Embed link ID 3
2
Aggregate
4
User packet 1 4
ToR
Src Dst
1 2 3
PathDump architecture
Aggregate
4
User packet 1
ToR
Src Dst
2
PathDump architecture
2. End-host captures packet path and updates flow-level statistics
Src Dst
PathDump architecture
2. End-host captures packet path and updates flow-level statistics
OVS
Packet stream
Agent
< 5 tuple flow id >
Store
TIB path: set of switch ids
Trajectory
Information Base start, end, #pkts, #bytes
Dst
PathDump architecture
3. Aggregator runs debugging applications
Server
PathDump interface
Actual Path: 1 – 4 – 3
1 2 3
Dst
Example 1: Path conformance
1. Install(query) Aggregator
4. Max-Coverage algorithm
• A–B :2
2. Alarm() • B – C : 1 3. getPaths()
• B–D :1
C
A-B-C
getPoorTCPFlows() A B
D
A-B-D
getPoorTCPFlows()