Have questions? Stuck? Please check our FAQ for some common questions and answers.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

WORK IN PROGRESS

In this tutorial, you will learn how to run an emulated Mininet network of BMv2 devices (i.e., the P4 reference software switch) and how to use ONOS to control such network. Some exercises also require writing code for ONOS and P4.

Tutorial VM

We have prepared a VM with all you need to complete the exercises. To VM can be downloaded here (approx. 4GB).

Content

The VM comes with Ubuntu 16.04 Desktop, Mininet, P4 tools (p4c, BMv2, P4Runtime), ONOS, and IntelliJ IDEA Community Edition (Java IDE for ONOS) already pre-installed.

VM credentials

There is one user in the VM with the following credentials

Username: sdn
Password: rocks

How to run the VM

The VM is in .ova format and has been created using VirtualBox v5.1. To run the VM you can use any modern virtualization system, although we recommend using VirtualBox. To download VirtualBox and import the VM use the following links:
https://www.virtualbox.org/wiki/Downloads
https://docs.oracle.com/cd/E26217_01/E26796/html/qs-import-vm.html

System requirements

The current configuration of the VM is 6 GB of RAM and 4 core CPU, although this is the recommended configuration, it can be reduced if needed. Minimum system requirements to build and run ONOS are 2 core CPU and 2 GB of RAM. When imported, the VM takes approx. 8 GB of HDD space, however, you might need up to 15 GB to build and run ONOS.

Build latest development version of ONOS

To complete the tutorial exercises you will need to download, build and run the latest development version of ONOS. Once you are able to run the VM, open a terminal window or SSH into it and type the following commands:

cd ~/onos
git pull origin
buck build onos


Building ONOS with the recommended system configuration takes approx. 10 minutes.

Exercises

Exercise 1

The goal of exercise 1 is to introduce P4 and P4Runtime support in ONOS.  This integration allows existing applications in ONOS to communicate to and program P4 devices on the network and operate in a pipeline agnostic manner.  This exercise illustrates how existing applications such as reactive forwarding, proxy-arp, and link discovery via LLDP can still be done on devices supporting P4 and P4Runtime.

Start ONOS

Start ONOS with a small subset of the applications by executing the following command:

ONOS_APPS=fwd,proxyarp,hostprovider,lldpprovider onos-buck run onos-local —- clean debug

Activate the BMv2 driver and pipeconf via the ONOS CLI

  1. Use the following command to access the ONOS CLI:

    onos localhost
  2. Enter the following command to activate the BMv2 driver:

    app activate org.onosproject.drivers.bmv2
  3. Enter the following command to active the pipeconf:

    app activate org.onosproject.p4tutorial.pipeconf
  4. To verify that you have activated all the required apps, run the following command:

    apps -s -a
  5. Make sure you see the following list of applications displayed:

    • org.onosproject.generaldeviceprovider (General Device Provider)

    • org.onosproject.drivers (Default Drivers)

    • org.onosproject.proxyarp (Proxy ARP/NDP)

    • org.onosproject.lldpprovider (LLDP Link Provider)

    • org.onosproject.protocols.grpc (gRPC Protocol Subsystem)

    • org.onosproject.protocols.p4runtime (P4Runtime Protocol Subsystem)

    • org.onosproject.p4runtime (P4Runtime Provider)

    • org.onosproject.drivers.p4runtime (P4Runtime Drivers)

    • org.onosproject.hostprovider (Host Location Provider)

    • org.onosproject.fwd (Reactive Forwarding)

    • org.onosproject.drivers.bmv2 (BMv2 Drivers)

    • org.onosproject.p4tutorial.pipeconf (P4 Tutorial Pipeconf) Run mininet to set up a topology of BMv2 devices.

  • No labels