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 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:
Before experimenting with real hardware, and facing all the complexities associated with making things work for the first time, we strongly encourage you to understand the basic concepts of the Stratum-ONOS stack by doing this hands-on tutorial based on Mininet and the BMv2 software switch. Most of the provided code and instructions can be applied to the case of a network comprising real Tofino-based switches.
The tutorial is organized around a sequence of hands-on exercises that show how to build an IPv6-based leaf-spine data center fabric using P4, Stratum, and ONOS. It provides an introduction to concepts such as:
NG-SDN Tutorial repository
The tutorial instructions, along with slides, are available at this URL:
https://github.com/opennetworkinglab/ngsdn-tutorial
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:
https://github.com/stratum/stratum/blob/master/README.md
To install and run Stratum on a Tofino-based switch, use the following instructions:
https://github.com/stratum/stratum/tree/master/stratum/hal/bin/barefoot
Hint: consider using the proposed Docker-based approach to install and Stratum with minimal effort
From the NG-SDN tutorial, you should have learned that ONOS uses "pipeconfs" to deploy and manage a given P4 program on a device. Pipeconfs are distributed as ONOS applications, hence using the .oar
packaging.
Most of the pipeconfs already available in ONOS, as well as that provided in the NG-SDN Tutorial, work only with the BMv2 software switch. To learn how to create and deploy pieconfs that can work with real Tofino-enabled switches, you can check out the fabric-tofino GitHub repository. fabric.p4 is an open-source P4 program distributed as part of ONOS, designed to work with Trellis, a set of SDN applications running on top of ONOS to provide the control plane for an IP fabric based on MPLS segment-routing.
The fabric-tofino GitHub repository provides instructions on how to:
fabric-tofino repository
Detailed Instructions are available in the main README of the fabric-tofino repository:
https://github.com/opencord/fabric-tofino
You should now know everything you need to:
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.