This is an archive of the ONOS 1.4 wiki. For the current ONOS wiki, look here.

This section describes how a user may set up the packet optical use case, or by extension, a multi-layer network topology.  One of the key drivers for this use case is that network designers can spin up a relatively large emulated packet-optical network on their personal computer.


Overview

The following diagram represents the full software stack that will emulate the packet/optical network environment. Mininet is the orchestration tool that will create all network switches, links, and hosts. The forwarding behavior of the switches is controlled by ONOS using the OpenFlow protocol. The packet switches are based on Open vSwitch and use OpenFlow 1.0, while the optical switches rely on LINC and use OpenFlow 1.3 (with vendor extensions as defined by the Optical Transport Working Group in ONF).

 

 


Installation

You should start with a fresh install of Ubuntu Server. Alternatively, you can start with the Mininet VM; this way you can skip the first step in following instructions.

  1. Install Mininet, for instance using the Native Installation from Source approach; this installs a lot of useful extra packages such as Wireshark and an OpenFlow dissector. We've had reports that Mininet version 2.1.0 does not work correctly (this is the default if you install from binary on Ubuntu 14.04). The dev team has been using Mininet 2.2.1 without any issues.

  2. Install, configure and build LINC Switch: https://github.com/FlowForwarding/LINC-Switch

    $ cd
    $ sudo apt-get install erlang git-core bridge-utils libpcap0.8 libpcap-dev libcap2-bin uml-utilities curl
    $ git clone https://github.com/FlowForwarding/LINC-Switch.git linc-oe
    $ cd linc-oe
    $ sed -i s/3000/300000/ rel/files/vm.args
    $ cp rel/files/sys.config.orig rel/files/sys.config
    $ make
    $ cd
  3. Install LINC-config-generator: https://github.com/FlowForwarding/LINC-config-generator

    $ cd
    $ git clone https://github.com/FlowForwarding/LINC-config-generator.git
    $ cd LINC-config-generator
    $ cp priv/* .
    $ make
    $ cd
  4. Only perform this step if you are running ONOS versions 1.2 and earlier. Starting from 1.3 this step is not needed anymore!

    Clone ONOS, checkout the 1.1 branch, and compile the oecfg application. This requires you have installed Java 8 and Apache Maven; go here for instructions on how to do that.

    $ cd
    $ git clone https://github.com/opennetworkinglab/onos
    $ git checkout origin/onos-1.1
    $ cd onos/apps/oecfg
    $ mci
    $ cd

Instantiate Multi-Layer Topologies

Before spawning the packet/optical topology, you should ensure ONOS has loaded the optical application. You can do so by including onos-app-optical in your Karaf features. You also want to make sure that you have onos-app-proxyarp installed (alternatively, you can use onos-app-fwd).

The ONOS source tree comes with two example scripts that create a multi-layer topology. These can be found in onos/tools/test/topos/ and are called opticalTest.py and opticalTestBig.py.

First, make sure the ONOS_ROOT environment variable is set. The easiest way is to set it in your cell definition, this way you'll also get OCx environment variables that point to your ONOS instances. Then, to create spawn a large packet-optical topology, run the following command (note the -E parameter passed to sudo which preserves the environment variables):

$ sudo -E python onos/tools/test/topos/opticalTestBig.py $OC1 $OC2 $OC3

In this example, three ONOS instances are running; feel free to change this to your setup. The script will ensure all switches (both packet and optical) will be configured to use the listed instances as their OpenFlow controller.

Both Mininet scripts rely on opticalUtils.py, which has the following functionality:

  • TBD

If, for some reason, the script failed to inject the optical topology in ONOS, you can re-run this step as follows:

$ ~/onos/tools/test/bin/onos-topo-cfg $OC1 Topology.json

If you get 404 responses back, you should check that you have onos-rest (not to be confused with onlab-rest) loaded as well.


LINC Cheat Sheet

You can attach to the console of a running LINC instance as follows:

$ sudo linc-oe/rel/linc/bin/linc attach

In the LINC console, the following commands are available. Please note that Erlang is very picky regarding syntax, so make sure you are not missing any spaces or the dot ('.') at the end of each command!

CommandDescription

rp(application:get_all_key(linc)).

Get running config
linc_logic:get_datapath_id(SwitchId).Get DPID of logical switch
linc:stop_switch(SwitchId).Stop logical switch

linc:port_down(SwitchId, PortId).

Disable port
linc:port_up(SwitchId, PortId).Enable port
linc:ports(SwitchId).List ports on logical switch
linc_us4_oe_flow:get_flow_table(switchId, tableId).Get flow table of logical switch (use tableId 0)

Background

 

 

  • No labels