Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sdn-project

Network Topology Project with Python Ryu and Mininet

Requirements

  • WSL2 with Ubuntu 22.04 LTS
  • Python 3.8.x

Installation Steps

  1. [Only if you are using windows] Set up WSL2 with Ubuntu 22.04 LTS: Follow the official Microsoft documentation to install WSL2 and set up Ubuntu 22.04 LTS. Install WSL2

  2. Install Mininet: Open your WSL2 terminal or Ubuntu terminal and run the following commands:

    sudo apt update
    sudo apt install mininet openvswitch-switch -y

    Test it (remember: Mininet only works as root):

    sudo mn --test pingall
  3. Install Python 3.8.x: Open your WSL2 terminal or Ubuntu terminal and run the following commands:

    sudo apt update
    sudo apt install python3.8 python3.8-venv python3.8-dev -y

    Maybe you'll have to run this before:

     sudo add-apt-repository ppa:deadsnakes/ppa -y
  4. Clone this repository, enter the folder where it is located at and set up a virtual environment:

    git clone <repo>
    cd sdn-project
    python3.8 -m venv .venv
    source .venv/bin/activate

    Only the Ryu controller and not Mininet will use the venv.

  5. Inside the virtual environment, install the Requirements:

    pip install -r requirements.txt

Running steps

  1. Run the Ryu Controller: Open a terminal where the folder sdn-project is located, activate the venv and run the controller

    source .venv/bin/activate
    ryu-manager ./controller/sdn_controller.py
  2. Run Mininet with your Topology: You have to run the Ryu controller in a terminal with the venv activated, and Mininet in another one, outside the venv. So open a new terminal and run:

    sudo python3 ./topology/geant_topology.py
    
  3. Plot the Graphs: After stopping Mininet and the Ryu controller, you can plot the graphs by running:

    source .venv/bin/activate
    python3 ./plot_graphs.py

Notes

  • Ensure that you have administrative privileges to run Mininet.
  • If you encounter any issues, refer to the official documentation of Mininet and Ryu for troubleshooting tips.
  • If the eventlet error on ryu occurs, try uninstalling and reinstalling a specific version:
    pip uninstall eventlet
    pip install eventlet==0.30.1

About

Network Topology Project with Python Ryu and Mininet

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages