Project for "Virtualized and Softwarized mobile networks" course held by Dr. Granelli @ UniTN
The project's name is composed of an acronym: focses
- GUI
- Live
- Slicing
- Requirements
- Goal
- Project Structure
- Installation Procedure
- Tunneling
- How to run the project
- Topology and slicing
- Useful Mininet commands
- Documentation
- Contributors
- Vagrant
- VirtualBox
- NodeJS
- npm
- python3
- Mininet
- Ryu
- ComNetsEmu
We decided to mix two projects into one:
Interactive topology display for SDN networks
: Providing an interactive display of the topology of an SDN network.On Demand SDN Slices in ComNetsEmu
: Implement a network slicing approach to enable dynamic activation/de-activation of network slices via CLI/GUIcommands
Here is represented the project tree expanding only the relevant files.
The main folders and file are:
starter.sh
that calls everything necessary to set up the applicationserver.js
lets the visualizer launch bash scripts to dynamically change the status of the slicesshell/
folder contains all the bash files needed to update in real time the slicesVisualizer/
contains the ryu controller, the gui_start needed to visualize the webapp, the topology of the network and an html folder that contains all of the necessary scripts, style sheets and html to run the webapp
Assuming you already have npm, python3 and nodejs on your machine.
Since it is Strongly advised to set up comnetsemu in a Virtual Machine in order to ensure portability you are going to:
- Install Vagrant and VirtualBox
- Install Comnetsemu
In order to be able to see the visualizer in your favourite browser you need to create a private network between the Virtual Machine and your local machine. To achieve this you have to:
- Go to comnetsemu installation folder
~$ cd <comnetsemu_location>
- Once you are in the directory you can perform an
ls
and you should see theVagrantfile
. From here open it with your favourite text editor and copy this line in the file to create the private network
config.vm.network "private_network", ip: "192.168.56.2"
Now this ip address is assigned to the vagrant machine and now we can see the visualizer through the browser.
Now that you have installed all the tools and now that you have performed the tunneling you can finally run the project!
Our <comnetsemu_location>
is ~/comnetsemu
, so we're going to use this from now on.
- Go to comnetsemu location
~$ cd comnetsemu
- Start your Virtual machine
~$ vagrant up comnetsemu
- Connect to it trough Secure Shell
~$ vagrant ssh comnetsemu
- Go to the project folder
~$ cd comnetsemu/GranelliGLS
- Run the bash file to start server, visualizer, controller and topology!
~$ bash ./starter.sh
- Once the webapp is up and running open your favourite browser and paste
http://192.168.56.2:8080
Now you can interact with the WebApp!
In the terminal where you ran the bash script you are given the mininet's CLI. In this way you can perform checks on the slices in real time!
Note in step 2 and 3 it is not necessary to call comnetsemu
after vagrant up and ssh, but it is advised in case of multiple VMs running in your machine at the same time.
We decided to keep this topology for the project:
Immagine Topologia
In the Default Scenario we have 4 hosts, 3 switches and 2 slcies are active:
- Upper slice between h1 and h3 using a 10 Mbps link
- Lower slice between h2 and h4 using a 10 Mbps link
This is what we are going to get with the pingall command
If we check the connection among the hosts we get:
In the lower critical scenario we add host 5 and host 6 to the network with an higher priority than the one before.
This scenario has 6 hosts, 3 switches and 3 slices:
- Upper slice between h1 and h3 using a 10 Mbps link
- Slice between h2 and h4 using a 3 Mbps link
- Slice between h5 and h6 using a 7 Mbps link
This is what we are going to get with the pingall command
If we check the connection among the hosts we get:
In the upper critical scenario we add host 7 and host 8 to the network with an higher priority than the one before.
This scenario has 6 hosts, 3 switches and 3 slices:
- Slice between h1 and h3 using a 3 Mbps link
- Slice between h2 and h4 using a 10 Mbps link
- Slice between h7 and h8 using a 7 Mbps link
This is what we are going to get with the pingall command
If we check the connection among the hosts we get:
In this special scenario we add both host 5 and 6, and host 7 and host 8 to the network with an higher priority than the one before.
This scenario has 8 hosts, 3 switches and 4 slices:
- Slice between h1 and h3 using a 3 Mbps link
- Slice between h2 and h4 using a 3 Mbps link
- Slice between h5 and h6 using a 7 Mbps link
- Slice between h7 and h8 using a 7 Mbps link
This is what we are going to get with the pingall command
Note that here all hosts are connected.
If we check the connection among the hosts we get:
Once the application is up and running you can run some code in mininet to check the status of the network.
The mininet>
is used instead of ~$
to underline the fact that we are inside the mininet CLI while the application is running and not on the standard terminal.
it foces you to do somethign that you don't like The most useful commands are:
mininet> nodes
to check the available nodes in the networkmininet> links
to display network's linksmininet> pingall
, which lets all hosts ping each othermininet> <src_host> ping <dst_host>
e.g.h1 ping h3
which lets an host send some packets through the network to check its reachabilitymininet> iperf <src_host> <dst_host>
e.g.iperf h1 h3
which lets an host check the bandwidth available
Note: To stop commands that do not end like ping
command it is advised to launch a SIGINT
via ctrl+c
.
For more information on the tools used please read these: