1 of 39

School of Computing Science

Simon Fraser University

CMPT 471: Networking II

Software Defined Networking (SDN)

Instructor: Mohamed Hefeeda

1

2 of 39

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

    • Examples: OSPF, ISIS, BGP
    • Traditional, still used in many places

Control Plane: Distributed

3 of 39

3

Agent

Agent

Flow Table

Flow Table

Agent

Flow Table

Routers exchange messages with a remote/centralized controller

    • Software-defined networking (SDN)
    • Becoming popular in different networks, e.g., datacenter and enterprise networks

Control Plane

Control Plane: Centralized

4 of 39

SDN: Basic Concepts

  • Control plane is separate from forwarding plane
    • Control plane (software) typically runs on commodity servers
    • 🡺 separation allows moving complex logic (intelligence) to servers, making switches much simpler and less expensive

  • Control plane is centralized
    • A single entity controls many/all devices in the network
    • 🡺 centralization gives us a ‘global’ view of the network as well as one place to control the whole network
    • 🡺 allows us to perform functions that were not possible before

4

5 of 39

SDN: Basic Concepts

  • SDN accelerates innovations in networking, by :
    • defining open standards and thus allowing more companies to enter the networking market (business)
    • separating data and control planes, which allows developing and experimenting with new ideas faster (technical)

  • Let us see an analogy from the computer industry
    • Mainframe 🡺 PC
    • Traditional Router 🡺 SDN Switch

5

6 of 39

Mainframe 🡺 PC

6

Vertically integrated

Closed, proprietary 🡺

Slow innovation

Small industry

Horizontal

Open interfaces 🡺

Rapid innovation

Huge industry

7 of 39

Traditional Router 🡺 SDN Switch

7

Vertically integrated

Closed, proprietary 🡺

Slow innovation

Small industry

Horizontal

Open interfaces 🡺

Rapid innovation

Huge industry

8 of 39

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)

9 of 39

SDN: Data Plane (Switches)

  • SDN Switches run a local Operating System
  • Common switch OS examples include:
    • SONiC (developed at Microsoft for their cloud services)
    • Open Network Linux (ONL)
    • Stratum (developed at Google, built on top of ONL, referred to as ‘Thin Switch OS’)

9

10 of 39

SDN: Data Plane (Switches)

  • SDN Switches can be …
  • Fixed Function
    • Switch offers a fixed set of actions (e.g., forward, drop, …)
    • Implements the match – action abstraction
    • Currently deployed in networks
    • A.k.a OpenFlow Switches
  • Programmable
    • Switch runs ‘programs’ at line rate
    • Programs are written using the P4 language
    • Relatively new, being deployed
    • (Discussed later)

10

Intel Tofino P4 Switch

OpenFlow Switch

11 of 39

SDN Data Plane

  • SDN Switches (fixed function) are …
    • Fast, simple, commodity switches implementing generalized data-plane forwarding in hardware
  • Switch has flow table computed and installed by controller
    • Flow table has multiple Flow Rules (in the form of match—action)
  • A protocol is used to communicate with and control switch
    • E.g., OpenFlow (most common)

11

12 of 39

Generalized Forwarding

  • Process packets based on multiple header fields
    • Not just destination IP as before
  • Any combination of fields can be used
    • Originally defined by the OpenFlow Specifications

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 …

13 of 39

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 …

  • Forward packet to port(s)
  • Encapsulate and forward to controller
  • Drop packet
  • Send to normal processing pipeline
  • Modify Fields

Packet + byte counters

Link layer

Network layer

Transport layer

Match pkt against fields

Perform action(s)

Keep stats

14 of 39

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

15 of 39

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

16 of 39

OpenFlow Match-Action Abstraction

  • Match + action abstraction: unifies different kinds of devices
    • That is, the same abstraction can be used with various devices
    • And, a ‘bare-metal’ switch can be configured to perform various functions

16

  • Layer 3 Router
    • match: longest dst IP prefix
    • action: forward to a link

  • Layer 2 Switch
    • match: dst MAC address
    • action: forward or flood
  • Firewall
    • match: IP addresses and TCP/UDP port numbers
    • action: permit or deny
  • NAT
    • match: IP address and port
    • action: rewrite address and port

17 of 39

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

  1. Forward packet to port(s)
  2. Encapsulate and forward to controller
  3. Drop packet
  4. Send to normal processing pipeline
  5. Modify Fields

Packet + byte counters

Link layer

Network layer

Transport layer

Match

Action

Stats

Match

Action

Stats

Matching is typically performed using TCAM

18 of 39

SDN: Control Plane

  • SDN Control Plane contains
    • SDN Controller (or Network Operating System, NOS)
    • Network Control Apps

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

19 of 39

SDN Controller (or Network OS)

  • SDN controller (or NOS)
    • Maintains network state information
    • Interacts with network control applications “above” via northbound API
    • Interacts with network switches “below” via southbound API

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

20 of 39

SDN Controller (or Network OS)

  • Common examples of Network OS:

20

21 of 39

SDN: Control Plane

Network-control apps:

  • “brains” of control: implement control functions using lower-level services, API provided by SND controller
    • E.g., routing, load balancing

  • unbundled: can be provided by 3rd party: distinct from switch vendor or SDN controller

21

22 of 39

SDN: High-level Operation

  • Illustrative example (in following slides)
    • Explains the interaction between data plane and control plane when a link fails and how the routing protocol handles this event

  • Important to understand what happens and where

  • Also important to notice the difference between the SDN approach and the traditional one

22

23 of 39

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 of 39

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

25 of 39

SDN vs Traditional Approach

  • If we were using OSPF on individual routers (not SDN), what would be the steps?

  • Work it out and compare both approaches

25

26 of 39

Why SDN?

  • Now, we understand the basics of SDN. Let us see what it can offer, in contrast to current approach

  • Recall first that SDN accelerates innovations by introducing open interfaces and disaggregating the market

26

27 of 39

SDN: Cost of Switches

  • SDN moves logic to central entities (servers)
  • 🡺 switches simpler to design and implement
  • 🡺 commodity 🡺 cost a fraction of traditional switches
  • Example
    • Datacenter with 100,000 hosts using a tree-based topology
    • Rough estimates: 5,000 switches (with fanout of 20)
    • Traditional switch ~$5+K
    • SDN Switch: ~$1K
    • Savings: $25M - $5M = $20M

  • In addition to the flexibility �of SDN

27

28 of 39

SDN Supports Traffic Engineering

  • Network operators need to carefully direct various traffic flows through their networks
    • This is usually referred to as Traffic Engineering (TE)

  • In TE, network paths are chosen (engineered) to meet the requirements of applications or customers
    • These paths may not necessarily be the shortest paths computed by the routing protocols

28

29 of 39

SDN: Traffic Engineering

  • For specific customer, network operator wants:
    • x-to-z traffic go through x-w-y-z (not the shortest path)
  • Traditional approach: would need to define link weights so that routing algorithm computes routes accordingly
  • But that would affect all traffic going through w and y!
  • In contrast, SDN can enforce TE for specific traffic flows

29

2

2

1

3

1

1

2

5

3

5

v

w

u

z

y

x

Example 1:

30 of 39

SDN: Traffic Engineering

Example 2:

  • latency-sensitive applications require passing through low-delay network paths, and
  • high-volume content distribution applications may need to go through paths with large available bandwidth

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)?

31 of 39

SDN: Traffic Engineering

  • A network operator wants to:
    • split u-to-z traffic along u-v-w-z and u-x-y-z (load balancing)
  • Hard do this using traditional routing algorithms
  • Much simpler to do using SDN

31

2

2

1

3

1

1

2

5

3

5

v

w

u

z

y

x

Example 3:

32 of 39

SDN Supports Network Functions

  • Network operators deploy many network functions
    • Also called middle boxes, network devices
  • Current trend is to virtualize these functions on general-purpose servers 🡺 referred to as Network Function Virtualization (NFV)

32

Firewall

IDS

Video Encoder

Parental control

Monitoring

Network Functions

Virtualized on Servers

33 of 39

SDN: Network Functions

  • Large-scale networks are complex
    • They have routers, and
    • FW, IDS, …, and many other devices

  • Network management becomes a hard task

  • SDN offers a unified way to manage all of network devices
  • SDN also enables TE in presence of devices

33

Firewall

IDS

Video Encoder

Monitoring

34 of 39

SDN: Network Functions

  • Traffic may need to traverse a specific order of services
    • Before reaching a destination

34

1

2

3

a

h

d

e

g

b

i

c

f

k

j

Route calculated by OSPF

1

2

3

35 of 39

Need for SDN: Summary

  • SDN achieves Traffic Engineering (TE) objectives that are difficult or impossible using current routing protocols

  • SDN unifies the management of network devices
  • SDN enables innovations and new network apps
    • Through open interfaces

35

TE Examples:

  • Min Latency
  • Load balancing
  • NFV routing
  • Min Max Link Util. (MLU)
  • Min Router State

36 of 39

Need for SDN: Summary

36

  • SDN also supports
    • Faster reaction to Denial of Service Attacks
    • Network virtualization
    • Faster failure recovery
    • Adaptive traffic monitoring
    • Dynamic access control

37 of 39

37

Example Contribution from SFU Researchers

38 of 39

  • SDN:
    • Separates control and data planes and centralizes control plan
    • Enables faster innovation and flexible control of the network
  • SDN architecture:
    • Data plane: fixed-function or programmable switches:
      • Fixed function: match-action abstraction (generalized forwarding)
      • Programmable: runs code written in P4
    • SDN controller (aka network OS):
      • Maintains state about the devices in the network
      • Exposes API to network applications
      • Controls and manages switches
    • Applications (e.g., routing, load balancing):
      • use APIs of SDN controller to realize network functions

38

Summary

39 of 39

Reading

  • Chapter 1 and Sections 3.1-3.4 from:

Software-Defined Networks: A Systems Approach, Peterson, Cascone, O’Connor, Vachuska, and Davie.

39