This is a project developed for the course "Softwarized and Virtualized Mobile Networks" at the University of Trento. Authors are:
Samuel Casagrande Cecchin - [email protected]
Davide De Martini - [email protected]
Stefano Sacchet - [email protected]
- Vagrant
- VirtualBox
- NodeJS
- NPM
- Python3
- Mininet
- Ryu
- ComNetsEmu
GOAL: to implement a network slicing approach to enable dynamic activation/de-activation of network slices via GUI commands.
The ComNetsEmu framework is used to implement the network and Ryu for the SDN controller.
In order to have the web server running inside the vagrant machine a private network between the host machine and the vagrant machine must be created. This can be done by following the steps below:
- Exit the vagrant machine
- Add this line to the vagrant file
config.vm.network "private_network", ip: "192.168.56.2"
- Run
vagrant reload
- Run
vagrant ssh
- Now a new ip address is assigned to the vagrant machine. The ip address will be used to access the web application from outside the vagrant machine
The project is structured in two main folders:
- The folder
OnDemandSlicing
contains the code of the ryu controller, the topology and the topology visualizer - The folder
Web App
contains the web application that displays the topology and allows the user to switch between different scenarios.
├── [OnDemandSlicing]
| ├── [html]
| ├── [sh_scripts]
| | ├── bothCritical.sh
| | ├── default.sh
| | ├── lowerCritical.sh
| | ├── reset.sh
| | └── upperCritical.sh
| ├── controller.py
| ├── gui_start.py
| ├── launcher.sh
| └── topology.py
├── [images]
| ├── [Iperf]
| ├── [Pingall]
| ├── [Scenarios]
| └── [webapp]
└── [webApp]
├── [public]
│ ├── [images]
│ ├── home.html
│ ├── homeStyle.css
│ ├── index.html
│ ├── loginStyle.css
│ ├── script.js
│ ├── snake
│ └── spaceGame
├── package.json
└── server.js
In order to run the project follow these steps:
cd ~/ProgettoNet2
vagrant up
vagrant ssh
Once accessed the vagrant machine, run the following commands (to install all packages needed for the web app):
cd ~/ProgettoNet2/webApp
npm install
Then run the web app:
node server.js
Once the web app is running, open a browser and go to the following address to access the web app:
http://192.168.56.2:8081
In the default scenario there are 4 hosts and 4 switches. Two slices are active:
- Upper slice with H1 and H4 using a 10 Mbps link
- Bottom slice with H2 and H% using a 10 Mbps link
Host H3, H6, H7 and H8 are not part of any slice and are not connected to any switch.
In the lower critical scenario there are 6 hosts and 4 switches. Three slices are active:
- Upper slice with H1 and H4 using a 10 Mbps link
- H2 and H5 slice with a 3 Mbps link
- H3 and H6 slice with a 7 Mbps link Host H7 and H8 are not part of any slice and are not connected to any switch.
In the upper critical scenario there are 6 hosts and 4 switches. Three slices are active:
- H1 and H4 slice wirh a 3 Mbps link
- H7 and H8 slice with a 7 Mbps link
- Bottom slice with H2 and H5 using a 10 Mbps link Host H3 and H6 are not part of any slice and are not connected to any switch.
In the full critical scenario there are 8 hosts and 4 switches. Four slices are active:
- H1 and H4 slice wirh a 3 Mbps link
- H7 and H8 slice with a 7 Mbps link
- H2 and H5 slice with a 3 Mbps link
- H3 and H6 slice with a 7 Mbps link All the hosts are connected.
The Web App allows the user (ex. a network administrator) to switch between different scenarios and to see the topology of the network in real time. It requires at first a simple login with username and password: admin
Once the login has been performed, the user is redirected to the control page. On this page it is possible to start the network, switch between different scenarios and stop the network.
To test the network the mininet console can be used to perform some ping (for reachability tests) and iperf commands (for bandwidth tests).
ping tests can be performed in these two ways:
mininet> h1 ping h2
mininet> pingall
iperf tests can be performed in these two ways:
mininet> h1 iperf h2
Of course h1 and h2 can be replaced with any other host in the network.
- When trowing a command that do not autoterminate (like h1 ping h2) the web app functionalities stop working. In order to have the webapp working again, a restart is required.