Versions Compared

Key

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

...

  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 (withsimple_switch_grpctarget), P4Runtime libraries, the P4 compiler p4c, the old BMv2 compiler p4c-bmv2, and all dependencies (protobufand gRPCprotobufandgRPC).

  4. Build the example P4 programs. On your Mininet VM shell, type:

    Code Block
    languagebash
    cd ~/onos/tools/test/p4src/
    make all
  5. Start Mininet, using BMv2 simple_switch_grpc target. On your Mininet VM shell, type:

    Code Block
    languagebash
    sudo -E mn --custom $BMV2_MN_PY --switch onosbmv2 --controller remote,ip=192.168.56.1

    Be sure to use the correct IP address of your ONOS instance.

     

  6. TBC

...