Versions Compared

Key

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

...

Info
titleRecommended 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)

Walkthrough

This walkthrough demonstrates the necessary steps and commands to run a network of BMv2 devices in Mininet, controlled by ONOS using P4Runtime.

  1. Clone ONOS repository. On your Mininet VM shell, type:

    Code Block
    languagebash
    cd ~
    git clone https://github.com/opennetworkinglab/onos.git
  2. Source ONOS's bash_profile. On your Mininet VM shell, type:

    Code Block
    languagebash
    echo "source ~/onos/tools/dev/bash_profile" > ~/.bashrc
    source ~/.bashrc

    Important: replace .bashrc with your shell configuration profile (.bash_aliases.profile, etc.)

  3. Build and install P4 tools. We have prepared a special command to install everything in one shot! On your Mininet VM shell, simply type:

    Code Block
    languagebash
    onos-setup-p4-dev

    This command will download, build and install BMv2 (with the simple_switch_grpc target), P4Runtime libraries, the P4 compiler p4c, the old BMv2 compiler p4c-bmv2, and all required dependencies (including protobuf and gRPC). This command takes approx. 20 minutes to complete with the minimum system configuration described before.
    if you run out of space on you mininet machine you can go inside the p4tools folder in the home directory:

    Code Block
    languagebash
    cd ~/p4tools

    then go in one of the local directories, e.g. p4rutnime

    Code Block
    languagebash
    cd p4runtime

    and clean the make artifacts with

    Code Block
    languagebash
    make clean
  4. Build the example P4 programs. On your Mininet VM shell, type:

    Code Block
    languagebash
    cd ~/onos/tools/test/p4src/p4-16/
    make all
  5. TBC

...

 

Update P4Tools to latest version

It might be needed to update the P4Tools to the latest version. Please run these commands one at a time in the same terminal window inside you machine. This process is the same for both the pre-built VM and any machine built from scratch.

Code Block
languagebash
cd ~/onos/git pullcd ~onos-setup-p4-dev


Run the Developer Environment 


Start Mininet, using BMv2 simple_switch_grpc target. 

...