School of Computing Science
Simon Fraser University
CMPT 471: Networking II
Software Defined Networking (SDN)
Instructor: Mohamed Hefeeda
1
Control Plane
Control Plane
SFU IF 1
Alice IF 3
DST OUT_IF
Forwarding Table
SFU IF 2
Alice IF 4
DST OUT_IF
Forwarding Table
Routing algorithm
Routing algorithm
Control Plane
SFU IF 2
Alice IF 4
DST OUT_IF
Forwarding Table
Routing algorithm
Routers exchange messages with each other to calculate tables
Control Plane: Distributed
3
Agent
Agent
Flow Table
Flow Table
Agent
Flow Table
Routers exchange messages with a remote/centralized controller
Control Plane
Control Plane: Centralized
SDN: Basic Concepts
4
SDN: Basic Concepts
5
Mainframe 🡺 PC
6
Vertically integrated
Closed, proprietary 🡺
Slow innovation
Small industry
Horizontal
Open interfaces 🡺
Rapid innovation
Huge industry
Traditional Router 🡺 SDN Switch
7
Vertically integrated
Closed, proprietary 🡺
Slow innovation
Small industry
Horizontal
Open interfaces 🡺
Rapid innovation
Huge industry
SDN: Architecture Overview
8
a.k.a SDN Controller
SDN Switches
e.g., OSPF, load balancer, ...
Open Interfaces
(a.k.a Bare-metal, merchant-silicon switches)
SDN: Data Plane (Switches)
9
SDN: Data Plane (Switches)
10
Intel Tofino P4 Switch
OpenFlow Switch
SDN Data Plane
11
Generalized Forwarding
12
Switch
Port
MAC
src
MAC
dst
Eth
type
VLAN
ID
IP
Src
IP
Dst
IP
Prot
TCP
sport
TCP
dport
Link layer
Network layer
Transport layer
Payload …
Generalized Forwarding: Flow Rule
13
Switch
Port
MAC
src
MAC
dst
Eth
type
VLAN
ID
IP
Src
IP
Dst
IP
Prot
TCP
sport
TCP
dport
Match
Action
Stats
Can be …
Packet + byte counters
Link layer
Network layer
Transport layer
Match pkt against fields
Perform action(s)
Keep stats
Generalized Forwarding: Examples
14
Destination-based forwarding:
(as a special case of generalized forwarding)
*
Switch
Port
MAC
src
MAC
dst
Eth
type
VLAN
ID
IP
Src
IP
Dst
IP
Prot
TCP
sport
TCP
dport
Action
*
*
*
*
*
51.6.0.8
*
*
*
Forward(6)
Forward datagrams destined to 51.6.0.8 to output port 6
Generalized Forwarding: Examples
15
Firewall
*
Switch
Port
MAC
src
MAC
dst
Eth
type
VLAN
ID
IP
Src
IP
Dst
IP
Prot
TCP
sport
TCP
dport
Action
*
*
*
*
*
*
*
*
22
Drop
Block datagrams destined to TCP port 22
*
Switch
Port
MAC
src
MAC
dst
Eth
type
VLAN
ID
IP
Src
IP
Dst
IP
Prot
TCP
sport
TCP
dport
Action
*
*
*
*
128.19.1.1
*
*
*
*
Drop
Block datagrams originated from host 128.19.1.1
OpenFlow Match-Action Abstraction
16
Flow Table: Contains Multiple Entries
17
Switch
Port
MAC
src
MAC
dst
Eth
type
VLAN
ID
IP
Src
IP
Dst
IP
Prot
TCP
sport
TCP
dport
Match
Action
Stats
Packet + byte counters
Link layer
Network layer
Transport layer
Match
Action
Stats
Match
Action
Stats
Matching is typically performed using TCAM
SDN: Control Plane
18
Control Plane
Data Plane
Notice: the figure shows an e2e example where the controller manages all components including virtual switches (vS) on end hosts 🡺 great flexibility
SDN Controller (or Network OS)
19
Network-wide distributed, robust state management
Communication to/from controlled devices
Link-state info
switch info
host info
statistics
flow tables
…
…
OpenFlow
SNMP
…
network graph
intent
RESTful
API
…
Interface, abstractions for network control apps
SDN
controller
routing
access
control
load
balance
Communication layer: communicate between controller and switches
Network-wide state management layer: state of networks links, switches, services
Interface layer to network control apps: APIs
SDN Controller (or Network OS)
20
SDN: Control Plane
Network-control apps:
21
SDN: High-level Operation
22
23
Link-state info
switch info
host info
statistics
flow tables
…
…
OpenFlow
SNMP
…
network graph
intent
RESTful
API
…
1
2
3
4
6
5
Dijkstra’s link-state
Routing
s1
s2
s3
s4
SDN: control/data plane interaction example
S1, experiencing link failure �uses OpenFlow port status message to notify controller
1
SDN controller receives OpenFlow message, updates link status info
2
Dijkstra’s routing algorithm application has previously registered to be called whenever link status changes. It is called.
3
Dijkstra’s routing algorithm access network graph info, link state info in controller, computes new routes
4
24
Link-state info
switch info
host info
statistics
flow tables
…
…
OpenFlow
SNMP
…
network graph
intent
RESTful
API
…
1
2
3
4
6
5
Dijkstra’s link-state
Routing
s1
s2
s3
s4
SDN: control/data plane interaction example
link state routing app interacts with flow-table-computation component in SDN controller, which computes new flow tables
5
Controller uses OpenFlow to install new tables in switches that need updating
6
SDN vs Traditional Approach
25
Why SDN?
26
SDN: Cost of Switches
27
SDN Supports Traffic Engineering
28
SDN: Traffic Engineering
29
2
2
1
3
1
1
2
5
3
5
v
w
u
z
y
x
Example 1:
SDN: Traffic Engineering
Example 2:
30
2
2
1
3
1
1
2
5
3
5
v
w
u
z
y
x
App 1
App 2
Can this be achieved by OSPF (or siblings)?
SDN: Traffic Engineering
31
2
2
1
3
1
1
2
5
3
5
v
w
u
z
y
x
Example 3:
SDN Supports Network Functions
32
Firewall
IDS
Video Encoder
Parental control
Monitoring
Network Functions
Virtualized on Servers
SDN: Network Functions
33
Firewall
IDS
Video Encoder
Monitoring
SDN: Network Functions
34
1
2
3
a
h
d
e
g
b
i
c
f
k
j
Route calculated by OSPF
1
2
3
Need for SDN: Summary
35
TE Examples:
Need for SDN: Summary
36
37
Example Contribution from SFU Researchers
38
Summary
Reading
Software-Defined Networks: A Systems Approach, Peterson, Cascone, O’Connor, Vachuska, and Davie.
39