/SDON-emulator

Emulated optical network controlled by ONOS

Primary LanguageJavaScriptMIT LicenseMIT

Emulated optical network controlled by ONOS

JavaScript Style Guide Docker Cloud Build Status Docker Pulls

Installation

Prerequisites

Docker

Make sure that Docker and Docker-compose are installed.

Node.js

Node.js >= 8.0 required, Node.js 13 recommended.

Dependencies

Download a ONOS image through DockerHub or use an already existing ONOS instalation.

Download and run ONOS from Dockerhub

Tag 2.3.0 is recommended.

docker pull onosproject/onos:2.3.0

Run the image in the background. The container will be named onos

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

After some seconds, the ONOS GUI should be visible on your browser: http://localhost:8181/onos/ui/login.html

The default user and password is karaf

Install Node.js dependencies

To install all Node.js dependencies, use the following command inside the api folder.

npm i

Configuration

Environment

This project uses .env files for the configuration variables.

There is an existing env.example file with all the existing variables and its default values. Rename it to .env and modify the data if neccesary.

Docker

Create an internal network called sdn_optical_network

docker network create sdn_optical_network

ONOS

Use the following command to access to ONOS console

ssh onos@localhost -p 8101

Pasword for onos user is rocks. Install the apps odtn-service, roadm and optical-rest with the app activate command

app activate odtn-service
app activate roadm
app activate optical-rest

Press control + d to exit.

These installations can also be done on the ONOS GUI.

Deploy to ONOS

Run the Node.js server

node api/server.js

Then, open a browser or use a tool like Postman, and try to deploy a network

http://localhost:8000/deploy/net2plan/example7nodes

After one minute, the topology should be visible on ONOS with all devices and links ready. Refresh the GUI if some components are missing.

Topology view on ONOS

To view the nodes over a map, open the menu located at the bottom right corner and activate the options "Select background geo map" and "Toogle background geo map".

Unfortunately, it seems that ONOS does not really removes the links and nodes, so if you continue deploying more topologies, everything will be scrambled and it will be a mess. To solve this, use a new ONOS container for every topology deployment.