Skip to content

JacCons/NGN_Project

Repository files navigation

Next Generation Networks Project - Automatic deployment of "containers" - Berardo C., Castagnaro T., Consolaro J.

NOTE: to visualize this file on VSCode press Ctrl+Shift+V or Cmd+Shift+V on Mac

INTRODUCTION

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.

Presentation

This is the PDF Presentation of the project.

KEY FEATURES

  • 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.

PREREQUISITES

  • Install Virtualbox and the Comnetsemu Virtual Machine

  • Import comnetsemu.ova in Virtualbox

  • Clone this repository

  • Add NGN_Project folder 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 vboxsf is 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.

FILES WITH DESCRIPTION

  1. ngn_gui.py: graphical user interface
  2. topology_generator.py: generates the topology and assign services to servers
  3. ./Tools/topology_parameters.txt: contains user-input parameters to create the topology
  4. simple_switch_stp_13.py: contains the ryu controller configuration
  5. openShellWithPy.py: executes shell scripts on external consoles
  6. Servers folder: contains configuration files for servers and server's status files, that tell if they are on/off
  7. client.py: slient configuration file
  8. img Folder: contains images

HOW TO RUN THE APPLICATION

  1. Open VirtualBox and start Comnetsemu Virtual Machine (comnetsemu)

  2. 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

  3. Change directory to the shared folder sf_NGN_Project. Under default settings run:

      cd /media/sf_NGN_Project
  4. Run the ngn_gui.py program, it open the GUI and start controller and mininet:

      python3.7 ngn_gui.py
  5. Now you should see some error like: ModuleNotFoundError: No module named 'customtkinter'

  6. To install required libraries you must run the following scripts:

    python3.7 -m pip install <library_name>

    NOTE: you probably only need to install matplotlib on 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 matplotlib on 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, matplotlib and requests)

  7. Now the program will open the Graphical User Interface and the RYU controller will be turned-on.

    You should see the following:

    Controller Controller
  8. Use the textboxes to set the number of hosts and switches.

    Then press the button CREATE topology to generete the Mininet.

    Wait for the topology image to display...

    Controller Controller
  9. 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.

    Controller
  10. 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.

    Controller
  11. To delete all flows press the REMOVE all flows button.

    This will automatically update the flow tables and delete previously added entries.

REQUIREMENTS

  • 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
  • Show that applications can actually talk
    • Example of communicating applications are a web server and a database (create fake ones)

Immage of the final project

About

Develop an SDN-based network using Mininet with multiple switches and automate the deployment of services.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages