Versions Compared

Key

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

This page is deprecated and may be removed in a near future.
The new entry point of Trellis underlay fabric installation guide can be found at Fabric Installation Guide

 

Table of Contents

Introduction

In this article, we are going to show you how to setup a CORD Fabric environment with Mininet and CpqD software switches.
This pure software environment allows us to develop and test the control logic (i.e. the Segment Routing app on ONOS) without any hardware switches.

ONOS

Setup an ONOS cluster with 3 instances. Here we only show brief steps. Please refer to Installing and Running running ONOS for detail.

  1. Fetch and compile ONOS
  2. Enable Segment Routing applications in your cell configuration:

    Code Block
    languagetext
    ONOS_APPS=drivers,openflow,segmentrouting
  3. Configure Segment Routing

    You can copy and modify from the following sample json file:

    No Format
    $ONOS_ROOT/tools/package/config/samples/network-cfg-fabric-2x2-min.json
    Note

    By default ONOS will use SpringOpen pipeline for CPqD switches. Addition configuration is required if you wish to use OFDPA pipeline. Please refer to this page for detail.

     

    1. Running remotely (1, 3+ instances)

      Run stc setup to start ONOS.
      Push the sample json file to the remote machine using onos-netcfg command.

      No Format
      onos-netcfg <IP> $ONOS_ROOT/tools/package/config/samples/network-cfg-fabric-2x2-min.json
    2. Running locally (1 instance)
      Copy the sample json file to the following location and rename it to network-cfg.json:

      No Format
      ~/Application/config/network-cfg.json

      Run ok clean to start ONOS with the new configuration.

Note
Right now segment routing does not support dynamic configuration. Restarting segment routing app is required after pushing new config

Mininet and CpqD Software Switch

    1. Install Mininet from source code. Please refer to Install Mininet from source code for detail.

      Code Block
      languagetext
      titleFetch Mininet
      $ git clone git://github.com/mininet/mininet
      $ cd mininet
      $ git checkout -b 2.2.1 2.2.1
    2. Patch Mininet.

      Info

      We will probably commit this back to the Mininet main stream.

      A patch multi_controller.patch is required to allow CpqD software switches to connect to multiple controller instances simultaneously. 
      Apply the patch using:

      Code Block
      languagetext
      titlePatch Mininet
      # In the Mininet root directory 
      $ git apply multi_controller.patch
    3. Install Mininet and CpqD Software Switch

      Code Block
      titleInstall Mininet
      $ sudo ./util/install.sh -n3f

Start the Fabric

    1. Start the Fabric
      We write a Mininet script cord_fabric.py that can help you easily create a leaf-spine topology with CpqD software switches.

      Tip
      titleCheck cell configuration

      Since cord_fabric.py reads controller information from cell configuration, you should check your cell and see if $OC[1-9] is correctly set up before running the script. 

      Code Block
      titleStart the leaf-spine topology
      $ sudo -E ./cord_fabric.py --spine=2 --leaf=2 
    2. Run pingall

      Code Block
      titleTest host connectivity
      mininet> pingall
      *** Ping: testing ping reachability
      h1 -> h2 h3 h4
      h2 -> h1 h3 h4
      h3 -> h1 h2 h4
      h4 -> h1 h2 h3
      *** Results: 0% dropped (12/12 received)

(Optional) GUI Configuration 

    1. Configure sprites

      Code Block
      $ onos-upload-sprites $OC1 onos/web/gui/src/main/webapp/data/sprites/segmentRouting.json

      and then access the URL: http://<ONOS_IP>/onos/ui?sprites=segmentRouting

    2. Configure topology view

      Code Block
      $ onos-topo-cfg $OC1 onos/tools/test/topos/cord.json

...