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.
Setup an ONOS cluster with 3 instances. Here we only show brief steps. Please refer to Installing and Running ONOS for detail.
- Fetch and compile ONOS
Enable Segment Routing applications in your cell configuration:
Configure Segment Routing
You can copy and modify from the following sample json file:
Running remotely (1, 3+ instances)
Push the sample json file to the remote machine using onos-netcfg command
Run stc setup to start ONOS with new configuration.
Running locally (1 instance)
Copy the sample json file to the following location and rename it to network-cfg.json:
Run ok clean to start ONOS with the new configuration.
Mininet and CpqD Software Switch
Install Mininet from source code. Please refer to Install Mininet from source code for detail.
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:
Install Mininet and CpqD Software Switch
Start the Fabric
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.
Check 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.
(Optional) GUI Configuration
and then access the URL: http://<ONOS_IP>/onos/ui?sprites=segmentrouting
Configure topology view