How to tell your plumbing what to do Protocol Independent Forwarding

Slides:



Advertisements
Similar presentations
Programming Protocol-Independent Packet Processors
Advertisements

P4 demo: a basic L2/L3 switch in 170 LOC
P4: specifying data planes
ENGINEERING WORKSHOP Compute Engineering Workshop P4: specifying data planes Mihai Budiu San Jose, March 11, 2015.
Forwarding Metamorphosis: Fast Programmable Match-Action Processing in Hardware for SDN Pat Bosshart, Glen Gibb, Hun-Seok Kim, George Varghese, Nick.
Introduction into VXLAN Russian IPv6 day June 6 th, 2012 Frank Laforsch Systems Engineer, EMEA
OpenFlow overview Joint Techs Baton Rouge. Classic Ethernet Originally a true broadcast medium Each end-system network interface card (NIC) received every.
Composing Software-Defined Networks Princeton*Cornell^ Chris Monsanto*, Joshua Reich* Nate Foster^, Jen Rexford*, David Walker*
© 2009 Cisco Systems, Inc. All rights reserved. SWITCH v1.0—4-1 Implementing Inter-VLAN Routing Deploying Multilayer Switching with Cisco Express Forwarding.
An Overview of Software-Defined Network Presenter: Xitao Wen.
OpenFlow Costin Raiciu Using slides from Brandon Heller and Nick McKeown.
Software-Defined Networking, OpenFlow, and how SPARC applies it to the telecommunications domain Pontus Sköldström - Wolfgang John – Elisa Bellagamba November.
OpenFlow : Enabling Innovation in Campus Networks SIGCOMM 2008 Nick McKeown, Tom Anderson, et el. Stanford University California, USA Presented.
Programming Abstractions for Software-Defined Networks Jennifer Rexford Princeton University.
Networking Technologies for Cloud Computing USTC-INY5316 Instructor: Chi Zhang Fall 2014 Welcome to.
Traffic Management - OpenFlow Switch on the NetFPGA platform Chun-Jen Chung( ) SriramGopinath( )
Programming Abstractions for Future SDN Switches
An Overview of Software-Defined Network
Building Compilers for Reconfigurable Switches Lavanya Jose, Lisa Yan, Nick McKeown, and George Varghese 1 Research funded by AT&T, Intel, Open Networking.
An Overview of Software-Defined Network Presenter: Xitao Wen.
Formal checkings in networks James Hongyi Zeng with Peyman Kazemian, George Varghese, Nick McKeown.
Paper Review Building a Robust Software-based Router Using Network Processors.
Information-Centric Networks10b-1 Week 13 / Paper 1 OpenFlow: enabling innovation in campus networks –Nick McKeown, Tom Anderson, Hari Balakrishnan, Guru.
OpenFlow: Enabling Technology Transfer to Networking Industry Nikhil Handigol Nikhil Handigol Cisco Nerd.
Software-Defined Networks Jennifer Rexford Princeton University.
Aaron Gember Aditya Akella University of Wisconsin-Madison
Jon Turner, John DeHart, Fred Kuhns Computer Science & Engineering Washington University Wide Area OpenFlow Demonstration.
Traffic Management - OpenFlow Switch on the NetFPGA platform Chun-Jen Chung( ) Sriram Gopinath( )
Traffic Management - OpenFlow Switch on the NetFPGA platform Chun-Jen Chung( ) Sriram Gopinath( )
Arbitrary Packet Matching in Openflow
Customizing OVS using P4 Muhammad Shahbaz with Sean Choi, Ben Pfaff, Chaitanya Kodeboyina, Changhoon Kim, Nick McKeown, Nick Feamster, and Jen Rexford.
P4 Amore! ( Or, How I Learned to Stop Worrying and Love P4) Jennifer Rexford Princeton University.
P. Bosshart, D. Daly, G. Gibb, M. Izzard, N. McKeown, J. Rexford, C. Schlesinger, D. Talayco, A. Vahdat, G. Varghese, D. Walker SIGCOMM CCR, 2014 Presented.
Information-Centric Networks Section # 13.2: Alternatives Instructor: George Xylomenos Department: Informatics.
Forwarding Programming in Protocol- Oblivious Instruction Set Author : Jingzhou Yu, Xiaozhong Wang, Jian Song, Yuanming Zheng, Haoyu Song Conference: 2014.
Introduction to Mininet, Open vSwitch, and POX
Why Fabric? 1 Complicated technology/vendor/device specific provisioning for networks, especially heterogeneous network DC Network – STP, TRILL, SPB, VXLAN,
VIRTUAL NETWORK PIPELINE PROCESSOR Design and Implementation Department of Communication System Engineering Presented by: Mark Yufit Rami Siadous.
PISCES: A Programmable, Protocol-Independent Software Switch
Experiences with Programmable Dataplanes Ronald van der Pol SURFnet TNC 2016, June, Prague (CZ)
Nick McKeown (Many thanks to Lisa and Lavanya) CS244 Programmable Switches Forwarding metamorphosis: fast programmable match-action processing … Pat Bosshart,
InterVLAN Routing 1. InterVLAN Routing 2. Multilayer Switching.
P4: Programming Protocol-Independent Packet Processors
COS 561: Advanced Computer Networks
P4 Language and Software Switches
Mihai Budiu, VMware Research
P4: specifying data planes
Programmable switches
HULA: Scalable Load Balancing Using Programmable Data Planes
The architecture of the P416 compiler
Muhammad Shahbaz Nick Feamster Jennifer Rexford Sean Choi Nick McKeown
P4 (Programming Protocol-independent Packet Processors)
PISCES: A Programmable, Protocol-Independent Software Switch
Data Center Networks and Fast and Programmable Switching Technologies
Network Data Plane Part 2
April 28, 2017 SUMIT MAHESHWARI INES UGALDE
PISCES: A Programmable, Protocol-Independent Software Switch
OpenFlow Special Topic: Software Defined Networks Rudra Dutta
SDN Overview for UCAR IT meeting 19-March-2014
The Stanford Clean Slate Program
DC.p4: Programming the forwarding plane of a datacenter switch
Reprogrammable packet processing pipeline
P4FPGA : A Rapid Prototyping Framework for P4
Programmable Networks
Linux Network Programming with P4
Programmable Switches
Packet processing with P4 and eBPF
P4: specifying data planes
Design principles for packet parsers
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

How to tell your plumbing what to do Protocol Independent Forwarding Nick McKeown

With thanks to many others… ONF PIF: Curt Beckmann (Brocade), Justin Dustzadeh (Huawei), Yatish Kumar (Corsa), Ben Mack-Crane (Huawei), NM, Ben Pfaff (VMware), Jennifer Rexford (Princeton), Haoyu Song (Huawei), Dan Talayco (BFN). P4: Pat Bosshart (BFN), Dan Daly (Intel), Glen Gibb (BFN), Martin Izzard (BFN), NM, Jennifer Rexford (Princeton), Cole Schlesinger (Princeton), Dan Talayco (BFN), Amin Vahdat (Google), George Varghese (MSFT), David Walker (Princeton). Special shout out to Navindra Yadav

OpenFlow is a balancing act A vendor-agnostic forwarding abstraction, balancing… General match+action (hence TCAM model) Fixed-function switch ASICs (hence 12 fixed fields) Balance was necessary because Big investments in ASICs and long development cycles requires clear, static guidelines Fixed-function ASICs are faster and lower power (ASIC:NPU:CPU = 100:10:1) One person’s balance is another’s compromise….

We have learned We learned the importance of Multiple stages of match+action Not changing the specs too fast Extensibility So OpenFlow can be used in many networks So switch vendors can differentiate Hence, the importance of TTPs.

“This is how I process packets” Switch OS Run-time API Driver “This is how I process packets” (TTP) Fixed-function ASIC

Programmable switches Some switches are more programmable than fixed-function ASICs CPU (OVS, etc) NPU (Ezchip, Netronome etc) FPGA (Xilinx, Altera, Corsa) Flexible Match+Action ASICs (Intel Flexpipe, Cisco Doppler, Xpliant, …) “Top-down” These switches let us tell them how to process packets. These types of switch have their place: e.g. Hypervisor switches, rack switches, enterprise switches, edge routers, etc.

“This is how the switch must process packets” Switch OS “This is how the switch must process packets” (PIF) Run-time API Driver Programmable Switch

Why we call it Protocol Independent Forwarding

Three phases Phase 0. Initially, the switch does not know what a protocol is, or how to process packets (Protocol Independence). Phase 1. We tell the switch how we want it to process packets (Configuration). Phase 2. The switch runs (Run-time).

Three Goals Protocol independence Target independence Configure a packet parser Define a set of typed match+action tables Target independence Program without knowledge of switch details Rely on compiler to configure the target switch Reconfigurability Change parsing and processing in the field

The Abstract Forwarding Model Initially, a switch is unprogrammed and does not know any protocols. Queues/ Scheduling Parser Match+Action Tables Packet Metadata

Switch OS Run-time API Protocol Authoring 1 Run! 4 Driver Compile 2 L2_L3.p4 Switch OS Protocol Authoring 1 Run! 4 Run-time API Driver Compile 2 TCP New IPv4 IPv6 VLAN Eth Configure 3 Queues/ Scheduling Parser Match+Action Tables Packet Metadata

Switch OS Run-time API Protocol Authoring 1 OF1-3.p4 L2_L3.p4 Switch OS Protocol Authoring 1 OF1-3.p4 OF1.3 Wire Protocol Run! 4 Run-time API Driver Compile 2 Configure 3 Queues/ Scheduling Parser Match+Action Tables Packet Metadata

P4 Code Examples Headers and Fields The Parser Match+Action Tables Control flow

Headers and Fields Header Fields: Ethernet Metadata header_type ethernet_t { fields { dstAddr : 48; srcAddr : 48; etherType : 16; } /* Instance of eth header */ header ethernet_t first_ethernet; Header Fields: Ethernet header_type standard_metadata_t { fields { ingress_port : 32; packet_length : 32; ingress_timestamp : 32; egress_spec : 32; egress_port : 32; egress_instance : 32; } metadata standard_metadata_t std_metadata; Metadata header_type vlan_tag_t { fields { pcp : 3; cfi : 1; vid : 12; etherType : 16; } header vlan_tag_t vlan_tag[NUM]; Header Fields: VLAN

The Parser Parser: Ethernet Parser: IPv4 parser parse_ethernet { extract(ethernet); return switch(latest.etherType) { ETHERTYPE_VLAN : parse_vlan; ETHERTYPE_MPLS : parse_mpls; ETHERTYPE_IPV4 : parse_ipv4; ETHERTYPE_IPV6 : parse_ipv6; ETHERTYPE_ARP : parse_arp_rarp; ETHERTYPE_RARP : parse_arp_rarp; } Parser: IPv4 parser parse_ipv4 { extract(ethernet); return switch(latest.etherType) { PROTO_TCP : parse_tcp; PROTO_UDP : parse_udp; ... }

Match+Action Tables Specifies Which fields to examine in each packet Actions that may be applied (by rule) Table size (optional) table port_vlan { reads { std_metadata.ingress_port : exact; vlan_tag[OUTER_VLAN].vid : exact; } actions { drop, ing_lif_extract; size 16384; Match+Action Table: VLAN table urpf_check { reads { routing_metadata.bd : ternary; ipv4.dstAddr : ternary; } actions { urpf_clear, urpf_set; Match+Action Table: Unicast RPF

Actions Parallel semantics Built from primitives modify field (packet header or metadata) add/remove header clone/recirculate counter/meter/stateful memory operations Parallel semantics Actions: LIF Extract /* Ingress logical interface setup */ action ingress_lif_extract(i_lif, bd, vrf, v4term, v6term, igmp_snoop) { modify_field(route_md.i_lif, i_lif); modify_field(route_md.bd, bd); modify_field(route_md.vrf, vrf); modify_field(route_md.ipv4_term, v4term, 0x1); modify_field(route_md.ipv6_term, v6term, 0x1); modify_field(route_md.igmp_snoop, igmp_snoop, 0x1); }

Control Flow Control Flow: Ingress control ingress { apply_table(port); apply_table(bcast_storm); apply_table(ip_sourceguard); if (valid(vlan_tag[0])) { apply_table(port_vlan); } apply_table(bridge_domain); if (valid(mpls_bos)) { apply_table(mpls_label); retrieve_tunnel_vni(); if (valid(vxlan) or valid(genv) or valid(nvgre)) { apply_table(dest_vtep); apply_table(src_vtep); . . . .

Use Cases P4 can be used to describe switches, routers, firewalls, gateways, load-balancers, etc. Mostly-stateless applications “P4 is for plumbers”

P4 P4: Programming Protocol-Independent Packet Processors www.p4.org ACM CCR. Volume 44, Issue #3 (July 2014) Pat Bosshart, Glen Gibb, Martin Izzard, and Dan Talayco (Barefoot Networks), Dan Daly (Intel), Nick McKeown (Stanford), Cole Schlesinger and David Walker (Princeton), Amin Vahdat (Google), and George Varghese (Microsoft) www.p4.org

How to contribute to P4.org Contribute to the P4 language spec Contribute a compiler to your target Contribute new tools (e.g. debugger)

The P4 View of the World Switch Switch Switch P4 Program/Library Packet Forwarding Engine Switch configuration Compiler Switch Packet Forwarding Engine Compiler A compiler per target Switch Packet Forwarding Engine Compiler

The P4 View of the World Switch Switch P4 Program/Library Intermediate Representation Front-end compiler Switch Packet Forwarding Engine Switch configuration Back-end compiler Switch Packet Forwarding Engine Switch configuration Compiler A compiler per target New ONF open-source project

Many languages, many targets High Level Language e.g. P4 program/libraries Front-end compiler Intermediate Representation New ONF open-source project Switch Packet Forwarding Engine Switch configuration Back-end compiler Switch Packet Forwarding Engine Back-end compiler Switch Packet Forwarding Engine Back-end compiler

P4 … high level languages Front-end compiler IR Back-end compiler CPU/OVS CPU/Click NPU GPU targets Doppler FPGA FlexPipe RMT

A Fourth Goal Protocol independence Target independence Reconfigurability Language independence

Goals of an IR Allow new languages above Compile to many devices below Uniquely define how packets are to be processed Keep it simple Action primitives: minimal “Plumbing Instruction Set (IS)” Later: Could add DPI IS, Security IS

Components of IR Plumbing Instruction Set Parse graph Table graph, edges annotated with actions. Optional: Table graph, annotated with dependencies to allow back-end compiler to exploit concurrency.

In summary…

Step 1. Configuration Switch High Level Language e.g. P4 program/libraries Front-end compiler Intermediate Representation New ONF open-source project Back-end compiler Switch configuration Switch Packet Forwarding Engine

Packet Forwarding Engine Stage 2. Run-time Control Plane Run-time API OpenFlow Wire protocol Add, modify, delete flow entries, etc. OpenFlow Run-time API Switch Packet Forwarding Engine

Contribute ONF PIF Open-Source Project Contribute code to IR Approved by ONF Board Apache 2.0, open to all ONF needs to put open-source governance/license in place (will take a few weeks) Contribute code to IR Contribute back-end compiler: (e.g. to OVS, FPGA, NPU, ASIC, …)