Next Generation Networks Project - Automatic deployment of "containers" - Berardo C., Castagnaro T., Consolaro J.
NOTE: to visualize this file on VSCode press
Ctrl+Shift+VorCmd+Shift+Von Mac
This project integrates Software-Defined Networking (SDN) with Mininet to dynamically deploy and manage services composed of interconnected applications. A Python-based GUI simplifies interaction and management.
This is the PDF Presentation of the project.
- SDN Network: Simulated multi-switch network in Mininet with centralized flow control via an SDN controller.
- Service Deployment: Deploy and manage multi-application services with automated host selection and flow configuration.
- GUI: Intuitive interface for deploying services, managing flows, and monitoring network activity.
- Dynamic Flow Management: Automatically configure and clean up network flows based on application requirements.
-
Install Virtualbox and the Comnetsemu Virtual Machine
-
Import
comnetsemu.ovain Virtualbox -
Clone this repository
-
Add
NGN_Projectfolder as a shared folder in Comnetsemu VM settings (select automatic mounting). -
Start the VM and then connect to it via SSH with the following command (password: vagrant):
ssh -X -p 2222 vagrant@localhost
and run the following command to access the shared folder with privileges:
sudo usermod -aG vboxsf vagrant
Check if the
vboxsfis in the group:groups vagrant
Restart the Virtual Machine to save modifications.
-
For Mac users: install XQuartz
-
For Windows users: install MobaXterm
-
Enable forwarding
-
Install Python 3.7 version on the VIrtual Machine. You can use terminal with SSH or directly write in the VM.
- ngn_gui.py: graphical user interface
- topology_generator.py: generates the topology and assign services to servers
- ./Tools/topology_parameters.txt: contains user-input parameters to create the topology
- simple_switch_stp_13.py: contains the ryu controller configuration
- openShellWithPy.py: executes shell scripts on external consoles
- Servers folder: contains configuration files for servers and server's status files, that tell if they are on/off
- client.py: slient configuration file
- img Folder: contains images
-
Open VirtualBox and start Comnetsemu Virtual Machine (comnetsemu)
-
After boots the VM up, for a better manageability, instead of running commands directly into the VM it might be worth to use your own terminal (or MobaXterm for Windows machine) and ssh into the VM.
To do so, run:
ssh -X -p 2222 vagrant@localhost
NOTE: password: vagrant
-
Change directory to the shared folder sf_NGN_Project. Under default settings run:
cd /media/sf_NGN_Project -
Run the ngn_gui.py program, it open the GUI and start controller and mininet:
python3.7 ngn_gui.py
-
Now you should see some error like:
ModuleNotFoundError: No module named 'customtkinter' -
To install required libraries you must run the following scripts:
python3.7 -m pip install <library_name>
NOTE: you probably only need to install
matplotlibon python3.6, but it is safer to have it on both python installations, you never know :)python3.6 -m pip install <library_name>
E.g.
python3.7 -m pip install customtkinter
NOTE: you probably only need to install
matplotlibon python3.6, but it is safer to have it on both python installations, you never know :)python3.6 -m pip install customtkinter
Now restart from step 4 until no error occurs. (You should install only:
customtkinter,matplotlibandrequests) -
Now the program will open the Graphical User Interface and the RYU controller will be turned-on.
You should see the following:
-
Use the textboxes to set the number of hosts and switches.
Then press the button
CREATE topologyto generete the Mininet.Wait for the topology image to display...
-
Use the right-side buttons to turn on the servers and instantiate the flows.
Once you have turned on the servers, the result appear on the GUI.
-
You can also use the mininet command line to request a service by running the client.py program on host1 (h1) specifying the server's IP you want to connect to.
The ryu controller will automatically instantiate the required flow between the client and the server, if no flows added before.
-
To delete all flows press the
REMOVE all flows button.This will automatically update the flow tables and delete previously added entries.
- Creare una repository su GitHub
- Create an SDN network in mininet with multiple switches
- Create a software that is capable of deploying services in the network
- Services are composed of multiple applications that communicate together to deliver the service (e.g., web server and database)
- Create a GUI (python recommended) capable of:
- Deploying service in the network (i.e., starting required applications on existing hosts)
- Basic idea: choose host depending on usage (e.g., max 2 applications per host)
- Choose communication requirements for applications
- E.g., application A needs to communicate with application B
- Upon choosing requirement, the software automatically configures flows in the switches (keeping track of them, see next point)
- Stopping applications
- Upon stopping, remove flows if not required anymore
- Deploying service in the network (i.e., starting required applications on existing hosts)
- Show that applications can actually talk
- Example of communicating applications are a web server and a database (create fake ones)
