Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This guide does NOT provide detailed instructions, but rather, pointers to existing guides that we hope should give you enough information to set up an ONOS environment capable of controlling Stratum-enabled Intel/Barefoot Tofino-based switches running Stratum.

Stratum is a software agent that runs on the switch and exposes gRPC-based interfaces such as P4Runtime, gNMI, and gNOI. These interfaces are used by ONOS to control and configure the switch.

The steps to follow are the following:

  1. Learn the basics of the Stratum-ONOS stack by doing the Next-Gen SDN Tutorial (based on Mininet and the BMv2 software switch)
  2. Learn to install and run the Stratum agent on your Tofino-based switch
  3. Learn how to deploy an existing ONOS pipeconf to your Tofino switch
  4. Use the acquired knowledge and code to create a pipeconf and ONOS apps that work with your own P4 program

...

  • Data plane programming and control via P4 and P4Runtime
  • Device/port configuration via YANG, OpenConfig, and gNMI
  • Running and operating ONOS
  • Using ONOS to deploy an arbitrary P4 program to the network switches
  • Implementing ONOS apps that provide the control plane logic for the data plane P4 programs 

NG-SDN Tutorial repository

The tutorial instructions, along with slides, are available at this URL:

...

2 - Install and run Stratum on your Tofino-based switch

...

-based

...

switch

...

Stratum currently supports different Tofino-based switches, from different vendors. To learn if your switch supports Stratum, check out the main README of the GitHub Stratum repository:

...

  • Build a pipeconf .oar package for fabric.p4 that includes the output of the P4 compiler for Tofino (tofino.bin and context.json)
  • Install the pipeconf in a running ONOS instance
  • Tell ONOS to connect and to deploy the pipeconf to the Stratum agent running on the switch

fabric-tofino repository

Detailed Instructions are available in the main README of the fabric-tofino repository:

https://github.com/opencord/fabric-tofino

4 - Use the acquired knowledge and code

You should now know everything you need to:

  • Create a pipeconf package for your own P4 program (check the PipeconfLoader.java class from fabric-tofino for an example of how to include the tofino.bin and context.json)
  • Load the pipeconf in ONOS and deploy it to your switch (using the example netcfg.json provided in fabric-tofino)
  • Implement an ONOS app to manage the tables and other entities of your P4 program (using the app provided in the ng-sdn tutorial as an example)

Get help

If you need help, you can ask questions on the following mailing lists:

For issues concerning Tofino and other Intel/Barefoot products (e.g., P4 compiler errors), please reach out to Barefoot support channels.