WORK IN PROGRESS
In this tutorial, The goal of this tutorial is to teach you the basics of P4, P4Runtime, and ONOS. It is targetted to beginners who have little or no knowledge of the P4 language and would like to learn more using ONOS as the control plane. It includes hands-on exercises where you will learn how to run create an emulated Mininet network of P4 devices using Mininet and BMv2 devices (i.e., the reference 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.
Info | ||
---|---|---|
| ||
There is one user in the VM with the following credentials Username: sdn |
How to run the VM
controlled by ONOS via P4Runtime, while using a simple P4 program implementing a custom tunneling protocol named "MyTunnel".
Info | ||
---|---|---|
| ||
If you already have intermediate knowledge of the P4 language and you would like to learn more about using ONOS for more realistic networking applications, we suggest you use this tutorial: Advanced ONOS+P4 Tutorial: Building an SRv6-enabled fabric with P4 and ONOS |
Download the tutorial VM
While you go through the slides, it is a good idea to start downloading the VM (~4 GB):
Instructions to download the ONOS+P4 Tutorial VM
Tutorial slides
Click here to download/open the slides in a new browser window (via Google Slides)
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: Widget Connector width 100% url
https://www.virtualbox.org/wiki/Downloads
oraclehttps://docs.
cdgoogle.com/
E26217presentation/d/
01/E26796/html/qs-import-vm.html1LYlI0BVZ44z7DTJBOGo4bBsddUOUjQfR2i_
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:
Code Block | ||
---|---|---|
| ||
cd ~/onos
git pull
buck build onos |
4f7Bo6Sg/edit
I want more!
Here are some pointers for you to learn more about P4 and ONOS:
- Basic ONOS Tutorial: learn more about ONOS
- Official P4 language tutorials: learn more about the P4 language
- Advanced ONOS+P4 Tutorial: use ONOS and P4 for more realistic networking applications while building an SRv6-enabled leaf-fabric from scratch
- Trellis+P4 tutorial: use Trellis, the built-in set of fabric apps in ONOS, with an existing P4 program (fabric.p4) and learn more about advanced use-cases such as VNF offloading of mobile S/PGW
...