Page tree

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

Skip to end of metadata
Go to start of metadata

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


For the details of the demonstration, please see followings:

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


  • Ubuntu 18.04 with kernel version >= v4.14
  • Python 2.7, python-pip, mininet, InfluxDB, Grafana

Provision emulator VM

Install p4tools

$ onos-setup-p4-dev 

Install BPFCollector

  • Install pre-built bcc package from
  • Clone BPFCollector repo. (See BPFCollector for details.)

    $ git clone
    $ cd BPFCollector
    $ git checkout -t origin/spec_1.0
  • Enable JIT for eBPF to make BPFCollector run faster

    $ sudo sysctl net/core/bpf_jit_enable=1
  • Install Cython to run the InfluxDB Client with better performance

    $ pip install Cython
  • Add virtual interfaces for collector

    $ sudo ip link add veth_1 type veth peer name veth_2 
    $ sudo ip link set dev veth_1 up 
    $ sudo ip link set dev veth_2 up 

Modify Mininet topology script

  • Modify the file $ONOS_ROOT/tools/test/topos/
    • Look for this line: 

      from import TCLink
    • Change the line as follows:

      from import TCLink, Intf
    • Look for this line:
    • Below this line, add the followings:

      collectorIntf = Intf( 'veth_1', node=net.nameToNode[ "s12" ] )

How to run

  • Run ONOS

    $ ONOS_APPS=drivers.bmv2,proxyarp,lldpprovider,hostprovider,fwd bazel run onos-local -- clean
  • Launch Mininet

    $ sudo -E $ONOS_ROOT/tools/test/topos/ --onos-ip=
  • Launch the collector

    $ sudo systemctl start influxdb
    $ sudo python BPFCollector/ veth_2
  • Activate In-band telemetry control application 

    $ onos-app localhost activate org.onosproject.inbandtelemetry

    You may see the following WARN log right after activating the INT control application.

    2019-02-15T11:23:30,143 | WARN  | onos-shared-scheduled-onos-pool-executor-2 | SimpleIntManager                 | 231 - org.onosproject.onos-apps-inbandtelemetry-impl - 2.1.0.SNAPSHOT | Missing INT config, aborting programming of INT device device:bmv2:s22

    It will be disappeared when you add collector configuration.

    Please note that the INT monitoring works only after the collector configuration is done.

  • Add mirroring configuration on the switch for telemetry report

    $ 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_1)
  • Add collector configuration
    • Connect to ONOS web interface (http://localhost:8181/onos/ui/)
    • Open "In-band Telemetry Control" in the menu
    • Type to "IPv4 address" field and 54321 to "port" field in "INT Collector Configuration" section
    • Clink "Apply Configuration" button

  • Add IntIntent to specify traffic to monitor
    • Open "In-band Telemetry Control" in the ONOS GUI menu
    • Fill in "Source IP address", "Destination IP address", "Source port", "Destination port" and "Protocol" field
      • Source and Destination IP address fields accepts IP address with mask (e.g.,
      • Source and Destination port number requires exact port number
      • Protocol supports either TCP or UDP
      • Any field remained empty, except Protocol field, means wildcard.
    • Choose metadata to collect
      • Switch Id and Egress timestamp must be chosen so as to make the collector to work properly.
      • "Egress Port Tx Utilization" are not supported in current version of BMv2 software switch yet.
    • Click "Apply Watchlist Rule" button below the metadata to deploy INT Intent.
    • Created INT Intent will be appeared in the table below.
  • Generate some traffic to monitor

    mininet> h11 iperf -c h22 -u -t 10000

  • No labels