Presentation is loading. Please wait.

Presentation is loading. Please wait.

April 28, 2017 SUMIT MAHESHWARI INES UGALDE

Similar presentations


Presentation on theme: "April 28, 2017 SUMIT MAHESHWARI INES UGALDE"— Presentation transcript:

1 A Communication Network II Presentation on: Programming Data Planes using P4: Overview
April 28, 2017 SUMIT MAHESHWARI INES UGALDE P4 is a language for expressing how packets are processed by the data plane of a programmable network forwarding element such as a programmable hardware or software switch, network interface card, router or network function appliance.  P4 is designed to specify only the target data plane functionality. P4 programs also partially define the interface by which the control plane and the data-plane communicate.

2 Why New Language? Protocol Independent Compiled to a target
intuitive syntax flexible extensible The switch data plane is not fixed. The data plane is configured at switch initialization time based on the P4 functionality (shown by the long red arrow). The data plane has no built-in knowledge of existing protocols. The control plane continues to interact with the data plane; however, the set of tables and other objects driving the behavior of the data plane is no longer fixed, since the P4 programmer specifies it after the switch has been manufactured. The P4 compiler generates the API that the control plane uses to communicate with the data plane from the P4 program. Hence, P4 itself is protocol independent but allows programmers to express a rich set of data plane behaviors and protocols. P4 Packet Processing Action Function Table Specifications Control Flow

3 P4 Abstractions Header Definitions:
Describe the size of each header within the packet Parser: Describe permitted header sequences, how to identify and what fields to extract. Tables: Associate user-defined keys with actions. Can implement – Routing, Flow lookup, Access control etc. User-defined metadata: User-defined data structures associated with each packet

4 Programming a Target with P4

5 P4 Core Functions ACTIONS Table Specs Control Flow
Actions are Code Fragments Manipulate packet header fields and metadata Action can include data provided by control plane at run time Examine rules (e.g. drop, route) for a packet What resources to allocate Invoke the actions for target packets Example: deparsing (packet reassembly)

6 P4 in the Nutshell P4 Compiler Source Target Code header.p4 parser.p4
simple_router.p4 Target Code ASIC FPGA MPLS Switch Firewall / Gateway Load Balancer

7 P4 Demo Running a Target Device (Basic Routing)
sudo ./behavioral-model sudo python run_tests.py --test-dir tests/ptf-tests/ Integration with mininet cd p4factory/targets/simple_router/ make bm ./run_demo.sh Install Some Entries (Use Different Terminal): ./run_add_demo_entries.bash mininet> h1 ping h2 Graphing p4-graphs p4src/simple_router.p4 What’s Next?  Creating a Target p4factory/tools/newtarget.py project_name (Check in targets)

8 References Thank You www.p4.org
Bosshart, Pat, et al. "P4: Programming protocol-independent packet processors." ACM SIGCOMM Computer Communication Review 44.3 (2014): Thank You


Download ppt "April 28, 2017 SUMIT MAHESHWARI INES UGALDE"

Similar presentations


Ads by Google