Programmable Software Switches

Slides:



Advertisements
Similar presentations
IP Router Architectures. Outline Basic IP Router Functionalities IP Router Architectures.
Advertisements

Logically Centralized Control Class 2. Types of Networks ISP Networks – Entity only owns the switches – Throughput: 100GB-10TB – Heterogeneous devices:
Slick: A control plane for middleboxes Bilal Anwer, Theophilus Benson, Dave Levin, Nick Feamster, Jennifer Rexford Supported by DARPA through the U.S.
An Overview of Software-Defined Network Presenter: Xitao Wen.
Multi-Layer Switching Layers 1, 2, and 3. Cisco Hierarchical Model Access Layer –Workgroup –Access layer aggregation and L3/L4 services Distribution Layer.
Router Architecture : Building high-performance routers Ian Pratt
Software-Defined Networking
Data Plane Verification. Background: What are network policies Alice can talk to Bob Skype traffic must go through a VoIP transcoder All traffic must.
Chapter 9 Classification And Forwarding. Outline.
An Overview of Software-Defined Network Presenter: Xitao Wen.
Connecting LANs, Backbone Networks, and Virtual LANs
Jennifer Rexford Princeton University MW 11:00am-12:20pm Programmable Data Planes COS 597E: Software Defined Networking.
ECE 526 – Network Processing Systems Design Network Processor Architecture and Scalability Chapter 13,14: D. E. Comer.
Software-Defined Networks Jennifer Rexford Princeton University.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks Data.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 ECSE-6600: Internet Protocols Informal Quiz #14 Shivkumar Kalyanaraman: GOOGLE: “Shiv RPI”
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Connecting Devices CORPORATE INSTITUTE OF SCIENCE & TECHNOLOGY, BHOPAL Department of Electronics and.
High-Speed Policy-Based Packet Forwarding Using Efficient Multi-dimensional Range Matching Lakshman and Stiliadis ACM SIGCOMM 98.
Extending OVN Forwarding Pipeline Topology-based Service Injection
Jennifer Rexford Princeton University MW 11:00am-12:20pm SDN Programming Languages COS 597E: Software Defined Networking.
OpenFlow MPLS and the Open Source Label Switched Router Department of Computer Science and Information Engineering, National Cheng Kung University, Tainan,
Introduction to Mininet, Open vSwitch, and POX
Jennifer Rexford Princeton University MW 11:00am-12:20pm Testing and Debugging COS 597E: Software Defined Networking.
Network Processing Systems Design
Network Virtualization Ben Pfaff Nicira Networks, Inc.
InterVLAN Routing 1. InterVLAN Routing 2. Multilayer Switching.
SDN controllers App Network elements has two components: OpenFlow client, forwarding hardware with flow tables. The SDN controller must implement the network.
P4: Programming Protocol-Independent Packet Processors
SDN challenges Deployment challenges
University of Maryland College Park
Jennifer Rexford Princeton University
EE 122: Lecture 19 (Asynchronous Transfer Mode - ATM)
ETHANE: TAKING CONTROL OF THE ENTERPRISE
IP Routers – internal view
Scaling the Network: The Internet Protocol
COS 561: Advanced Computer Networks
NOX: Towards an Operating System for Networks
Network Data Plane Part 2
VIRTUAL SERVERS Presented By: Ravi Joshi IV Year (IT)
Chapter 6: Network Layer
Chapter 4 Data Link Layer Switching
Overview of SDN Controller Design
Hubs Hubs are essentially physical-layer repeaters:
(Read Forouzan Chapters 6 and 7)) IP Forwarding Procedure
Software Routers: RouteBricks
The Stanford Clean Slate Program
CS 31006: Computer Networks – The Routers
Software Defined Networking (SDN)
Software Routers: Click
Transport Layer Systems Packet Classification
Software Defined Networking
Network Core and QoS.
Firewalls Routers, Switches, Hubs VPNs
NTHU CS5421 Cloud Computing
COS 561: Advanced Computer Networks
Implementing an OpenFlow Switch on the NetFPGA platform
EE 122: Lecture 7 Ion Stoica September 18, 2001.
Programmable Networks
Network Layer: Control/data plane, addressing, routers
Programmable Switches
Data Plane Jennifer Rexford Fall 2018 (TTh 1:30-2:50 in Friend 006)
Project proposal: Questions to answer
Ch 17 - Binding Protocol Addresses
Networking and Network Protocols (Part2)
IP Forwarding Relates to Lab 3.
Network Core and QoS.
Control-Data Plane Separation
Control-Data Plane Separation
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

Programmable Software Switches Lecture 11, Computer Networks (198:552)

Software-Defined Network (SDN) Centralized control plane Data plane Data plane Data plane Data plane

Why software switching? Early roots in networking: first switches were fully in software … until high link speeds forced everyone to make ASICs A tool for experimentation Virtualization: need flexible switching policies inside endpoint! Why switching? Where is all the policy coming from?

What do software switches need to do? Forward packets based on specified rules Allow changing the forwarding rules frequently Provide high performance High throughput and low latency Be robust Different traffic patterns (e.g., port scans) Can we make performance deterministic?

A conventional packet data path L2 matching (exact match on 48-bit MAC address) L3 matching (Longest-prefix-match on 32-bit IP address) Access Control List (ACL) (flexible fields + priorities) pkt

A packet data path in a virtualized cluster Multiple logical data paths with frequent rule changes … … … Tenant policies Provider policies Topology traversal

High performance is challenging Lots of lookups Compute hashes and maintain other data structures Large tables: numerous highly-specific keys User-kernel crossings Programmable toolchain much easier to build in user space Rules and policies change a lot New tenants, new endpoints, VM migrations, … Need to understand computer systems deeply Costs of memory accesses and hash computations Core/thread-level parallelism, NIC-queue-to-core mapping, etc.

A few other quirks to accommodate Metadata carried between table stages Ex: Late-bind forwarding decisions Ex: Accumulate partial field modifications before one-shot write Statistics per flow Counters Timeouts Stateful processing Connection tracking for firewalls: e.g., TCP establishment state NAT, DNS tunnel detection, load balancing, … <insert your idea here!>

Papers for today: Click and OpenVSwitch Each highly influential in its own right Click spurred a lot of work in flexible router design OVS spurred work on programmable networks Useful software tools: Course project and beyond! Useful tools layered on top Mininet, network functions, ... Active research area: packet processing performance + flexibility Kernel bypass Hardware offloads Kernel network stack optimizations

The Design and Implementation of OpenVSwitch Usenix NSDI ‘15 Ben Pfaff et al.

Deployment setting: Virtualized clusters

Implications for forwarding performance Complex policies: Can’t do 100+ lookups per packet!

Idea 1: Microflow cache Microflow: complete set of packet headers and metadata Example: srcIP, dstIP, IP TTL, srcMAC, dstMAC Just one lookup per packet! Hit Microflow cache in the kernel Use a large hash table Miss Openflow table in user space

Problems with micro-flows Too many micro-flows: e.g., each TCP port Many micro-flows may be short lived! Poor cache-hit rate Can we cache the outcome of rule lookup directly? Naive approach: Cross-product explosion! Example: Table 1 on source IP, table 2 on destination IP

Idea 2: Mega-flow cache Build the cache of rules lazily using fields accessed in OF table Ex: contain just src/dst IP combinations that appeared in packets Hit Megaflow cache in the kernel Use tuple space search Miss Openflow table in user space

Improvements to mega-flow caching You have an OF table. What happens if you populate the mega- flow blindly by concatenating the fields accessed on lookup? Hint 1: consider flow tables that match on highly variable fields Hint 2: consider priorities of rules with overlapping matches Hint 3: consider the number of lookups vs. microflow cache OVS introduced a series of algorithmic improvements Priority sorting of mega-flow tables Staged lookups starting with more static sets of fields Prefix trie to detect non-overlapping longest-prefix matches Combine with micro-flow cache!

Click Modular Router Symposium on Operating Systems Principles (SOSP) ‘99 Robert Morris, Eddie Kohler, John Jannotti, and Frans Kaashoek

Motivation for Click Flexibility: Add new features and enable experimentation Openness: Allow users/researchers to build and extend … In contrast to most commercial routers Modularity Simplify the composition of existing features Simplify the addition of new features Speed/efficiency Operation (optionally) in the operating system ... without the user needing to grapple with OS internals

Router as a graph of elements Large number of small elements Each performing a simple packet function E.g., IP look-up, TTL decrement, buffering Connected together in a graph Elements inputs/outputs snapped together Beyond elements in series to a graph E.g., packet duplication or classification Packet flow as main organizational primitive Consistent with data-plane operations on a router (Larger elements needed for, say, control planes)

Click elements: Push vs. pull Packet hand-off between elements Directly inspired by properties of routers Annotations on packets to carry temporary state Push processing Initiated by the source end E.g., when an unsolicited packet arrives (e.g., from a device) Pull processing Initiated by the destination end E.g., to control timing of packet processing (e.g., based on a timer or packet scheduler)

Click language Declarations Connections Compound elements Create elements Connections Connect elements Compound elements Combine multiple smaller elements, and treat as single, new element to use as a primitive class Language extensions through element classes Use configuration strings, rather than syntactic extensions

Example: Stochastic Fair Queueing

Backup Slides

Handlers and Control Socket Access points for user interaction Appear like files in a file system Can have both read and write handlers Examples Installing/removing forwarding-table entries Reporting measurement statistics Changing a maximum queue length Control socket Allows other programs to call read/write handlers Command sent as single line of text to the server

Example: EtherSwitch Element Ethernet switch Expects and produces Ethernet frames Each input/output pair of ports is a LAN Learning and forwarding switch among these LANs Element properties Ports: any # of inputs, and same # of outputs Processing: push Element handlers Table (read-only): returns port association table Timeout (read/write): returns/sets TIMEOUT