WORK IN PROGRESS
The content of this page is still work in progress, it will be ready for the ONOS 1.11 "Loon" release.
The following steps will help you set up a development environment with Mininet, ONOS and BMv2 with P4Runtime support.
Before starting you need to download and set up a virtual machine with Mininet. The following instructions have been tested on the official Mininet 2.2.2 VM 64 Bit (Ubuntu 14.04), which you can find here.
Recommended minimum system requirements
In order to successfully build and execute the required tools, we recommend the following minimum system configuration:
- 4 GB of RAM
- 2 cores
- 8 GB free hard drive space (~4GB required to build P4 tools)
This walkthrough demonstrates the necessary steps and commands to run a network of BMv2 devices in Mininet, controlled by ONOS using P4Runtime.
Clone ONOS repository. On your Mininet VM shell, type:
Source ONOS's bash_profile. On your Mininet VM shell, type:
Important: replace .bashrc with your shell configuration profile (.bash_aliases, .profile, etc.)
Build and install P4 tools. We have prepared a special command to install everything in one shot! On your Mininet VM shell, simply type:
This command will download, build and install BMv2 (withsimple_switch_grpctarget), P4Runtime libraries, the P4 compiler p4c, the old BMv2 compiler p4c-bmv2, and all dependencies (protobufand gRPC).
Build the example P4 programs. On your Mininet VM shell, type:
Start Mininet, using BMv2 simple_switch_grpc target. On your Mininet VM shell, type:
Be sure to use the correct IP address of your ONOS instance.