software defined networking - tel aviv universitymsagiv/courses/rsdn/sdn-tau.pdf · agenda •what...

57
Software Defined Networking What is it, how does it work, and what is it good for? Many slides stolen from Jennifer Rexford, Nick McKeown, Scott Shenker, Teemu Koponen, Yotam Harchol and David Hay

Upload: ngokiet

Post on 21-Apr-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Software Defined Networking

What is it, how does it work, and what is it good for?

Many slides stolen from Jennifer Rexford, Nick McKeown, Scott Shenker, Teemu Koponen, Yotam

Harchol and David Hay

Page 2: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Agenda

• What is Software Defined Networking (SDN)?

• What is OpenFlow? How does it work?

• Challenges en route to SDN

• Research directions

Page 3: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

What is SDN?

Page 4: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

The Internet: A Remarkable Story

• Tremendous success

– from research experiment to global infrastructure

• Enables innovation in applications

– Web, P2P, VoIP, social networks, virtual worlds

• But, the Internet’s infrastructure remained fairly stagnant for decades

Page 5: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

The Internet’s Landscape

Applications:

Internet Protocols:

routing, congestion control, naming, …

(TCP/IP, BGP, DNS, OSPF, ECMP,…)

Technologies:

constant innovation

stagnant!

constant innovation

Page 6: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Why Can’t We Innovate?

• Closed equipment

– software bundled with hardware

– vendor-specific interfaces

• Over specified

– slow protocol standardization

• Few people can innovate

– equipment vendors write the code

– long delays to introduce new features

Impacts performance, security, reliability, cost…

Page 7: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Networks are Hard to Manage

• Operating a network is expensive

– more than half the cost of a network

– yet, operator error causes most outages

• Buggy software in the equipment

– routers with 20+ million lines of code

– cascading failures, vulnerabilities, etc.

• The network is “in the way”

– especially a problem in data centers

– … and home networks

Page 8: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Traditional Computer Networks

Data plane: packet

streaming

forward, filter, buffer, mark, rate-limit, and measure packets

Page 9: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Traditional Computer Networks

track topology changes, compute routes, install forwarding rules

Control plane: distributed algorithms

Page 10: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Traditional Computer Networks

collect measurements and configure the equipment

Management plane: human time scale

Page 11: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

New Paradigm: Software Defined Networking (SDN)

API to the data plane (e.g., OpenFlow)

logically-centralized control

switches

smart, slow

dumb, fast

Page 12: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

A Helpful Analogy

12

Page 13: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

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

Mainframes

Page 14: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

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

Routers/Switches

Page 15: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

How SDN works

The OpenFlow protocol

15

Page 16: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

OpenFlow Switch

Flow Table

Secure Channel

PC

hw

sw

OpenFlow Switch specification

OpenFlow Switching

Controller

Page 17: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Controller: Programmability

17

Network OS

Controller Application

events from switches topology changes, traffic statistics, arriving packets

commands to switches (un)install rules, query statistics,

send packets

Page 18: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Reactive vs. Proactive

• Reactive SDN: switches send (first) packets to controller, then controller programs switch's flow table to handle rest of the flow

– Problem: source of DoS on controller (packet-in event)

• Proactive SDN: Controller programs the switches proactively, according to its own knowledge of the network

– Requires smarter approaches than just reacting to network events (global knowledge, discovery, updates…)

Page 19: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Flow Table Entry at Switch “Type 0” OpenFlow Switch

Switch Port

MAC src

MAC dst

Eth type

VLAN ID

IP Src

IP Dst

IP Prot

TCP sport

TCP dport

Rule Action Stats

1. Forward packet to port(s) 2. Encapsulate and forward to controller

3. Drop packet 4. Send to normal processing pipeline

+ mask

Packet + byte counters

Page 20: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Data-Plane: Simple Packet Handling

• Simple packet-handling rules

– Pattern: match packet header bits

– Actions: drop, forward, modify, send to controller

– Priority: disambiguate overlapping patterns

– Counters: #bytes and #packets

1. src=1.2.*.*, dest=3.4.5.* drop 2. src = *.*.*.*, dest=3.4.*.* forward(2) 3. src=10.1.2.3, dest=*.*.*.* send to

controller

Page 21: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

OpenFlow

• Definition in progress

• Additional actions

rewrite headers

map to queue/class

encrypt

• More flexible header

allow arbitrary matching of first few bytes

• Support multiple controllers

load-balancing and reliability

Page 22: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Example OpenFlow Applications

• Dynamic access control

• Seamless mobility/migration

• Server load balancing

• Network virtualization

• Using multiple wireless access points

• Energy-efficient networking

• Adaptive traffic monitoring

• Denial-of-Service attack detection

See http://www.openflow.org/videos/

Page 23: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

E.g.: Dynamic Access Control

• Inspect first packet of a connection

• Consult the access control policy

• Install rules to block or route traffic

Page 24: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

E.g.: Seamless Mobility/Migration

• See host send traffic at new location

• Modify rules to reroute the traffic

Page 25: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

E.g.: Server Load Balancing

• Pre-install load-balancing policy

• Split traffic based on source IP

25

src=0*

src=1*

Page 26: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

In-depth Example: Simple Repeater

• Simple Network Repeater

– forward packets received on port 1 out 2 and vice versa 26

1 2

Controller

Switch

Page 27: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Simple Repeater

Priority Pattern Action Counters

DEFAULT IN_PORT:1 OUTPUT:2 (0,0)

DEFAULT IN_PORT:2 OUTPUT:1 (0,0)

27

def handle_packetIn(packet): out_port = 2 if packet.in_port == 2: out_port = 1 flow_mod = ofp_flow_mod() flow_mod.match = ofp_match() flow_mod.match.in_port = \ packet.in_port action = ofp_action_output() action.out_port = out_port flow_mod.action = [ action ] flow_mod.buffer_id = \ packet.buffer_id send(flow_mod)

Controller (POX) (Pseudo)-Program

Flow Table

1 2

Controller

Switch

Page 28: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

OpenFlow in the Wild

• Open Networking Foundation

– Google, Facebook, Microsoft, Yahoo, Verizon, Deutsche Telekom, and many other companies

• Commercial OpenFlow switches

– HP, NEC, Quanta, Dell, IBM, Juniper, …

• Network operating systems

– NOX, Beacon, Floodlight, POX, …

• Network deployments

– Campuses, research backbone networks

– Commercial deployments (e.g., Google backbone)

Page 29: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

But… Heterogeneous Switches

• Number of packet-handling rules (TCAM/memory limits)

• Different OpenFlow version support

• Range of matches and actions (not all matches and actions are mandatory in the protocol)

• Multi-stage pipeline of packet processing (allowed but not defined in the standard)

• Vendor-specific features

• Offload some control-plane functionality (?)

29

access control

MAC look-up

IP look-up

Page 30: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

SDN or OpenFlow?

• OpenFlow is not being adapted as-is

• Major vendors either completely discard OpenFlow or use a massively changed variant

• Doing that requires having the ability to change the protocol on both sides (controller + switch)

• Is OpenFlow dead?

30

Page 31: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Challenges

31

Page 32: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Controller Delay and Overhead

• Controller is much slower the the switch

• Processing packets leads to delay and overhead

• Need to keep most packets in the “fast path”

32

packets

Page 33: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Distributed Controller

33

Network OS

Controller Application

Network OS

Controller Application

For scalability and reliability

Partition and replicate state

… and: where to put the controller(s)?

Taking into account latency, resiliency, load balancing...

Page 34: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Testing and Debugging

• OpenFlow makes programming possible

– Network-wide view at controller

– Direct control over data plane

• Plenty of room for bugs

– Still a complex, distributed system

• Need for testing techniques

– Controller applications

– Controller and switches

– Rules installed in the switches 34

Page 35: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Programming Abstractions

• Controller APIs are low-level

– Thin veneer on the underlying hardware

• Need better languages

– Composition of modules

– Managing concurrency

– Querying network state

– Network-wide abstractions

• Example:

– http://www.frenetic-lang.org/

35

Controller

Switches

Page 36: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

MiniNet

36

Page 37: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

MiniNet

• Creates scalable SDN (up to hundreds of nodes) using OpenFlow, on a single PC

• Allows to quickly create, interact with and customize a SDN prototype with complex topologies, and can be used to emulate real networks – all on your PC

• Can work with any kind of OpenFlow controller

• Takes seconds to install

• Easy to program

• Of course, is an open source project

37

Page 38: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

MiniNet

• Not only for teaching purposes!

• Used for the development and testing of networks

38

Page 39: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Innovating with SDN

Page 40: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Dealing with Large Tables

Palette: Distributing Tables in Software Defined Networks

Y. Kanizo, D. Hay and I. Keslassy

Page 41: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Access Control in SDN

• Consider the following network.

– Table at each ingress point

Ingress points hold (too) large tables

41

Page 42: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

How to Solve this Problem?

Idea: Distribute the rules among all switches such that each packet goes through all rules along its path.

42

Page 43: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Palette: Step I

Split the large (TCAM) table into smaller tables

– identify each smaller table with a unique colour

43

Page 44: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Assign at most a single colour to each switch s.t. every packet-forwarding path is a “rainbow path”

Palette: Step II

Page 45: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Algorithmic Challenges

• Maximizing the number of colours (smaller tables), k

• Splitting the large (TCAM) table into k smaller tables

– so as to minimize the size of the largest table

• http://webee.technion.ac.il/~isaac/p/tr12-05_palette.pdf

Page 46: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Rethinking (Routing) Protocols

On the Resilience of Routing Tables:

J. Feigenbaum, P. B. Godfrey, A. Panda, M. Schapira, S. Shenker, and A. Singla

Page 47: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Motivation

d

Page 48: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Motivation

d

Routes computed by, say, shortest paths routing alg

Page 49: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Motivation

i d X

forwarding path? No!

Pack

et

Page 50: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

• Routing is a control plane operation

– slow (ms – s)

• Packet forwarding is a data plane operation

– fast (μs)

• Today’s routing protocols

1. establish connectivity

2. optimize routes (= shortest paths)

• failure ⇒ re-convergence ⇒ dropped packets!

Routing: Data vs. Control Plane

Page 51: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

How to Solve this Problem?

Idea: Push (only!) connectivity to the data plane

– immediately react to failures

– optimize routes on a longer time scale

51

Page 52: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Forwarding Model

• Packet for node d arrives at node i

i d

• Outgoing edge is a function of

- set of live edges

- incoming edge

fid: Ei x P(Ei) -> Ei

Page 53: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

• Forwarding is t-resilient iff for any (at most) t edge failures:

– existence of path from i to d ⇒ loop-free forwarding from to d

• Perfect resilience ≣ t →∞

Resilient Forwarding

Page 54: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Big Gap!

Thm: Cannot always provide perfect resilience

Thm: Can always protect against one failure

Page 55: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

What Next?

• Conditions for k-resilience?

– restricted failure models?

• Resilience for specific families of graphs?

• Randomized forwarding rules?

• ... ?

Full paper available online as YALE/DCS/TR1454 See also [Liu-Panda-Singla-Godfrey-S-Shenker, NSDI 2013]

Page 56: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Conclusion

• SDN is revolutionizing networking

• Rethinking networking

– open interfaces to the data plane

– separation of control and data

– leveraging techniques from distributed systems

• Significant momentum, many challenges

– in both research and industry 56

Page 57: Software Defined Networking - Tel Aviv Universitymsagiv/courses/rsdn/SDN-TAU.pdf · Agenda •What is Software Defined Networking (SDN)? •What is OpenFlow?How does it work? •Challenges

Thank You