Installing and Running ONOS on Windows 10

Dilara ÜNBAY
Pia-Team Tech
Published in
6 min readNov 15, 2021

As we all know Windows 10 tends to cause a lot of issues during the installations when it comes to lesser-known open source projects. For ONOS (Open Network Operating System) I’ve tried countless installations and struggled for weeks. But in the end, I’ve found a method that ran perfectly. So today I’m going to teach you how I made ONOS work on Windows 10.

Prerequisites:

· Oracle VM VirtualBox

SETTING UP A LINUX ENVIRONMENT

First of all, we need to set up a linux environment where we will initially run ONOS. For this tutorial I’ve downloaded an Ubuntu 18.04.3 image. We can import the VDI file to the VirtualBox following these basic steps:

Open your VirtualBox manager and click on the “New” button.

Adjust the settings to fit your VDI file.

You can continue with the recommended settings until you reach the page shown below. Here toggle the “Use an existing virtual hard disk file” and choose the VDI file you have downloaded.

After pressing “Create” you should be able to see your virtual Linux machine on “Powered Off” state. Before starting your VM go to “Settings”.

Then go to the “Network” tab and change the adapter to “Bridged Adapter”.

After switching your adapter, you can start your VM and fill in the login credentials. If you are following the link provided in this tutorial, you can access the credentials on the download page under the “Info” segment.

INSTALLING DOCKER

We are going to install Docker to help us ease the process. Since we have a running Linux machine, we can do the installations through the terminal. Open your terminal and use these commands:

sudo apt update
sudo apt install docker.io
sudo systemctl start docker
sudo systemctl enable docker

Make sure that you don’t have an ongoing daily update before using the “apt” command to avoid temporarily unavailable errors. After using the commands, you should have a running Docker service on your machine. Use below command to verify that your installation was successful:

sudo docker --version

INSTALLING ONOS WITH DOCKER

Now that we have Docker, we can start installing the required containers. Open your terminal and use this single command to install the latest version of ONOS:

sudo docker pull onosproject/onos

Use this command to run the installed container with the name “onos”:

sudo docker run -t -d -p 8181:8181 -p 8101:8101 -p 5005:5005 -p 830:830 --name onos onosproject/onos

We have a running ONOS image but we have no idea on which IP address its running. We need this information for future steps. Use this command to list all the information about the image:

sudo docker inspect onos

Find the IP address from the listed information. As seen below IP address is “172.17.0.2”:

Use this IP address (172.17.0.2:8181/onos/ui/login.html) to access the login page of ONOS. After accessing the login page enter the standard login credentials “onos” and “rocks” respectively.

We need to activate some applications within ONOS prior to creating topologies. We are going to take advantage of the ONOS GUI for this step. Open the menu which is located at the top left corner and select “Applications”.

Make sure that you activate every single application listed below:

To activate these applications, enter the application name to the search bar. Click on the required application within the search results and activate it through the icon located on the top right of the navigation bar.

INSTALLING MININET

In order to create topologies with ONOS we need to install Mininet. We don’t need to use Docker because Mininet can be installed with the “apt-get” command on Linux. So, use this single command to install the latest version of Mininet:

sudo apt-get install mininet

We need to disable Open vSwitch controllers before trying any connections with ONOS. You can skip this step if Open vSwitch services are not loaded on your machine. Use these commands to stop and disable Open vSwitch services:

sudo service openvswitch-controller stop
sudo update-rc.d openvswitch-controller disable

Now we can create a topology on ONOS using Mininet. Use this command to create a simple topology which consists of two hosts:

sudo mn --controller remote,ip=172.17.0.2

Ping the hosts to make sure that the connection between hosts is established. Use this command:

h1 ping h2

Your output should be similar to this if the ping test is successful:

Now we can see our topology on the ONOS GUI. Refresh the ONOS main page and press “H” key to set hosts to visible. You should see a topology similar to this one:

INSTALLING PUTTY & XMING SERVER

Lastly, we need to establish a connection between our virtual machine and real machine. Since our real machine runs Windows, we can access the ONOS page with the use of PuTTY and Xming Server.

You can access the PuTTY installation under the “Download PuTTY” header on their website. You can install the Xming Server from the sourceforge website. Launch PuTTY and Xming Server with the default settings after completing the installation.

First, we need to install and start SSH server on our Ubuntu VM to establish a connection through PuTTY. Use these commands:

sudo apt-get install openssh-server
sudo service sshd start

Also, we need to get the IP address of our Ubuntu VM. Use this command on Ubuntu terminal to get the IP address:

hostname -I

Enter the retrieved IP address and select SSH connection type on your PuTTY session as shown below:

Don’t forget to configure the SSH X11 forwarding as shown below:

X display location must match your Xming Server (e.g. Xming Server:0.0). After opening the connection enter your Ubuntu VM login credentials into the terminal. Your terminal should be similar to this upon a successful PuTTY connection:

Now we can finally access the ONOS GUI through our real machine. To do this open your browser and enter the ONOS GUI url. Your url must consist of your Ubuntu VM IP address (e.g. 192.168.1.15) and ONOS docker port (8181). Full url must be similar to this: 192.168.1.15:8181/onos/ui/login.html. Lastly, enter the default ONOS login credentials and access your ONOS GUI.

Congratulations on finishing the tutorial and thank you for reading through my post. If you faced any problem following this tutorial you can reach out to me in the comments section.

--

--