Starting up ONOS and your data network
After you've completed the prerequisites and built ONOS in the VM, you cam use Mininet and onos.py
to start up a virtual ONOS cluster and data network:
cd ~/onos/tools/dev/mininet sudo mn --custom onos.py --controller onos,1 --topo tree,2,2
(In this example, our "cluster" is a single node, but we will change that in a minute!)
You should see a bunch of output showing the startup of the control network and the data network.
After ONOS starts up and the switches connect, you should see the customized mininet CLI prompt:
mininet-onos>
At this point, you can enter mininet commands like pingall
(all-to-all ping test) or help
(to find out about Mininet CLI commands.)
You can also enter ONOS commands like onos:apps
or onos:balance-masters
and they should be invoked via karaf's client
command on onos1
.
You can also invoke the ONOS client using the onos
command - press control-D
to exit.
You can also connect to the ONOS GUI by following the instructions below.
To exit Mininet, use the exit
command or press control-D
.
Once you have verified that a single-node ONOS cluster and simple topology are working correctly, you can try a larger cluster (we recommend 3 nodes if you have configured your VM to use 6-12 GB of RAM) and a larger or more interesting topology (such as a 4x4 torus):
sudo mn --custom onos.py --controller onos,3 --topo torus,4,4
Pay close attention to error messages!
If things don't start up correctly, look carefully at any error messages or exceptions which may have been generated - usually they give you important information which will enable you to figure out what is going wrong and to fix the issue. Also check out the troubleshooting section below.