Versions Compared

Key

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

...

Make also sure that Docker is installed and you can run Docker containers in your machine (Install Docker).

In this guide we will refer to ${WORKSPACE} as the environment variable of your workspace. Define it on your .bashrc file or make sure that is defined in all your terminal windows.

P4-Mininet Docker container

...

To clone the repository, type the following commands in a terminal window inside the ONOS+P4 Dev VMon your machine:

Code Block
languagebash
titleClone Trellis routing repository
cd ~${WORKSPACE}
git clone https://github.com/opennetworkinglab/routing/

...

So, first of all, open 3 terminal windows on your machine.

On In T1 run ONOS with the following commands:

Code Block
languagebash
$ cd ~/onos
$ ONOS_APPS=drivers,openflow,netcfghostprovider,segmentrouting,fpm,dhcprelay,routeradvertisement,t3,hostprobingprovider,drivers.bmv2,pipelines.fabric
$ bazel run onos-local -- clean

In T2 connect to the ONOS shell running the following command:

Code Block
languagebash
$ onos localhost

Now and check that the apps are correctly active. You should see  apps are activesomething similar to the output shown below:

Code Block
languagebash
$ onos localhost
onos> apps -a -s
*   9 org.onosproject.drivers              1.13.0.SNAPSHOT Default Drivers
*  35 org.onosproject.generaldeviceprovider 1.13.0.SNAPSHOT General Device Provider
*  36 org.onosproject.protocols.grpc       1.13.0.SNAPSHOT gRPC Protocol Subsystem
*  37 org.onosproject.protocols.p4runtime  1.13.0.SNAPSHOT P4Runtime Protocol Subsystem
*  38 org.onosproject.p4runtime            1.13.0.SNAPSHOT P4Runtime Provider
*  39 org.onosproject.drivers.p4runtime    1.13.0.SNAPSHOT P4Runtime Drivers
*  42 org.onosproject.proxyarp             1.13.0.SNAPSHOT Proxy ARP/NDP
*  44 org.onosproject.hostprovider         1.13.0.SNAPSHOT Host Location Provider
*  45 org.onosproject.lldpprovider         1.13.0.SNAPSHOT LLDP Link Provider
*  73 org.onosproject.pipelines.basic      1.13.0.SNAPSHOT Basic Pipelines
*  84 org.onosproject.route-service        1.13.0.SNAPSHOT Route Service Server
*  95 org.onosproject.protocols.gnmi       1.13.0.SNAPSHOT gNMI Protocol Subsystem
*  96 org.onosproject.drivers.gnmi         1.13.0.SNAPSHOT gNMI Drivers
* 108 org.onosproject.pipelines.fabric     1.13.0.SNAPSHOT Fabric Pipeline
* 120 org.onosproject.segmentrouting       1.13.0.SNAPSHOT Segment Routing
* 121 org.onosproject.drivers.bmv2         1.13.0.SNAPSHOT BMv2 Drivers

Push From T3, now push the network configuration from another new terminal window:

Code Block
languagebash
$ cd ~/routing/trellis
$ onos-netcfg localhost trellisp4.json

Now ONOS is running, the needed apps are correctly running and the network configuration is pushed in ONOS, we are ready to run the emulated trellis topology on P4+Mininet Docker container.

In T3 start the previously downloaded Docker container with the topology available in the "routing" repository. You can do it running the following command:

Code Block
$ docker run --rm  --privileged -v /tmp/p4mn:/tmp -v~/routing:/routing -w/routing/trellis -it --name p4trellis --hostname p4trellis -p 50001-50030:50001-50030 --env PYTHONPATH=/root --entrypoint python  opennetworking/p4mn:stable ~/routing/trellis/trellisp4.py --onos-ip 127.0.0.1


Start mininet topology on new terminal using trellisp4.py python script
trellisp4.py creates:

...