The page outlines instructions to achieve INT through ONOS and P4.

Material

For the details of the demonstration, please see followings:

  1. Abstract
  2. Demo slide 
  3. Demo poster
  4. Demo video

Requirements

This work basically requires

Ubuntu 18.04 with kernel version >= v4.14

Following software are also required:

Python 2.7

python-pip

mininet

Build ONOS

To build ONOS on your local machine, follow [this instruction](https://github.com/opennetworkinglab/onos#getting-started)

Provision emulator VM

Install p4tools

To properly install the p4Tools on your VM you will need to download and run this script: https://github.com/JonghwanHyun/onos/blob/master/tools/dev/p4vm/install-p4-tools.sh

$ onos-setup-p4-dev 

Install BPFCollector

See BPFCollector

Add virtual interfaces for collector

$ sudo ip link add veth_11 type veth peer name veth_12 
$ sudo ip link add veth_21 type veth peer name veth_22 
$ sudo ip link set dev veth_11 up 
$ sudo ip link set dev veth_12 up 
$ sudo ip link set dev veth_21 up 
$ sudo ip link set dev veth_22 up

How to run

$ ONOS_APPS=drivers.bmv2,proxyarp,lldpprovider,hostprovider buck run onos-local -- clean
$ sudo -E ~/onos/tools/test/topos/bmv2-demo-int.py --onos-ip=127.0.0.1 --pipeconf-id=org.onosproject.pipelines.int
$ sudo systemctl start influxdb $ sudo python -E BPFCollector/InDBClient.py veth_22
$ onos-app localhost activate org.onosproject.inbandtelemetry
$ simple_switch_CLI --thrift-port `cat /tmp/bmv2-s12-thrift-port` 
RuntimeCmd: mirroring_add 500 5 (500: REPORT_MIRROR_SESSION_ID defined in int_definitions.p4) (5: port number to send mirrored packet, in this case veth_21)
$ onos localhost onos> add-host-intent 00:00:00:00:01:01/None 00:00:00:00:02:02/None

Since there is no forwarding or routing application enabled, we add routes between hosts manually.) (h11 and h22 in Mininet topology, respectively

mininet> h11 iperf -c h22 -u -t 10000 -l 250B