The contents of this tutorial are slightly outdated, but it is still a good way to play with the fabric. Note that we no longer configure ONOS with the example file shown below, and we have upgraded the software switch-driver from the one used in this tutorial (so that it now supports L2 bridging within a rack).
Welcome to the Cord Fabric - Tutorial!
In this tutorial, we will go through a set of exercises to illustrate the behavior of the Cord Fabric use case on ONOS. With this tutorial, we hope you'll become familiar with the capabilities of the segment routing app and how it enables you to achieve better control of IP traffic. You will also play with the leaf-spine topology that represents the CORD Fabric.
If you haven't done it already, it's highly recommended that you go through the ONOS Tutorial first. This will give you some familiarity with the basic functionality of ONOS.
Email us (email@example.com) if you’re stuck, think you’ve found a bug, or just want to send some feedback.
1 - Download the tutorial VM
This VM already has all the dependencies necessary to run the Segment Routing application. Login in the VM with the following credentials:
2 - Start an ONOS Cluster
We configured the VM to automatically bring up 3 ONOS instances using LXC containers. They are already configured to form an ONOS cluster. To access its CLI type:
This command may take a while to return. After you see the ONOS CLI, make sure the correct apps are running and the ONOS cluster is formed correctly:
3 - Start the Fabric
The 2x2 Leaf-Spine topology is described in this figure.
Each Leaf switch is connected to each Spine, all hosts under a Leaf share the same subnet.
Let's take a look at the configuration file inside ONOS.
Let's start the mininet topology:
Notice h1 has IP 10.0.1.1 and its gateway to the outside world is 10.0.1.254, a interface of the Leaf Router 1.
Let's try to ping that interface.
Verify, h4 has IP 10.0.2.2 and its network gateway is 10.0.2.254, on the Leaf Router 2.
Now let's verify connectivity between the two hosts:
Communication between hosts in the same rack (ie. in the same subnet) is L2 bridged (not segment-routed). Unfortunately, we have not implemented this functionality yet. As a result pinging between h1 and h2, and also between h3 and h4 will not work
4 - Understand Segment Routing
The following figure describes the Segment Routing topology.
Notice that each Router is identified by a Label. The edge routers will encapsulate IP traffic with the MPLS label associated to the destination of the packet.
The spines will simply forward traffic based on MPLS labels.
The Segment Routing application allows the expression of POLICIES via TUNNELS.
A tunnel is defined as a set of LABELS, defining the path taken by a flow. The following command instantiate a tunnel called FASTPATH through the routers 101, 105, and 102 in that order.
Then, a policy can be applied to a subset of traffic, for example, policy1 = tcp_port=80 >> fwd( TUNNEL_1)
5 - GUI
To configure the location of the nodes in the ONOS GUI we have to push the following json files using these commands:
Next, go ahead and access the following url: http://<VM_IP>/onos/ui?sprites=segmentrouting
6 - Topology
Now, restart the VM and let's try a bigger topology: