Skip to content

Veeresh464/Intelligent-Routing-in-SDN

Repository files navigation

🧠🤖 Intelligent-Routing-in-SDN 🚀

Intelligent Routing Management in SDN: A system that combines Dijkstra’s algorithm and machine learning to dynamically select optimal network paths, improving latency, resource utilization, and QoS for critical applications in data center networks.

Project Structure

/
│
├── Dataset_generation/           # Generates dataset for QoS based and ML based routing
├── Hop-count-Based-Routing/      # Hop count based routing on (Abilene, AboveNet, German50) topologies 
├── QoS-Based-Routing/            # QoS based routing on (Abilene, AboveNet, German50) topologies 
├── ML-Based-Routing/             # ML based routing on (Abilene, AboveNet, German50) topologies 
├── LSTM_Model/                   # LSTM model training, prediction scripts, datasets for ML based routing
├── Using-Tools/                  # Using various tools such as D-ITG, ping and iperf
├── example_images/               # Image folder for images used in README file
├── images/                       # Images from the Project Report
├── Project Report/               # Detailed Project Report       
├── README.md                     # This file
└── requirements.txt              # Python dependencies to install

1. 📚 Introduction

In today’s interconnected world, networks are the backbone of communication, business operations, and data management. Routing is crucial for maintaining efficient network performance by determining the optimal path for data to travel from its source to its destination. However, traditional routing methods, which are based on static rules and protocols like OSPF and RIP, have become increasingly inadequate. These methods struggle to handle the dynamic and unpredictable traffic patterns driven by cloud services, video streaming, and IoT devices. As a result, static approaches often lead to congestion, delays, and a degraded Quality of Service (QoS), especially in large and complex networks.

The growing demand for high-performance networks necessitates intelligent routing to address these challenges. Software-Defined Networking (SDN) combined with Machine Learning (ML) provides a centralized, adaptive approach to routing. SDN offers a global view of the network, enabling dynamic adjustments, while ML analyzes real-time traffic patterns to optimize routing decisions. This intelligent routing prioritizes critical applications like video calls, reduces latency, and adapts to fluctuating network conditions, ensuring efficient data flow and enhancing the overall user experience. By intelligently managing routing, networks can become more scalable, resilient, and capable of meeting the demands of modern digital services.


2. ⚠️ Problem Statement

** To develop a intelligent routing management model using Machine Learning for optimizing routing in Software Defined datacenter Networks. **

2.1 🎯 Objectives of Proposed Work 📈

  • Monitor the traffic in the network and create the dataset.
  • Build the prediction model using the dataset.
  • Use the model for intelligent routing management.
  • Compare proposed work with existing work.

🕵️‍♀️ This project aims to design an Intelligent Routing Management System using Software-Defined Networking (SDN) and Machine Learning (ML) to optimize network traffic routing. It will centralize traffic control through SDN and apply ML to analyze real-time traffic patterns for dynamic routing decisions. The system’s performance will be tested against traditional routing methods, focusing on metrics like delay, jitter, throughput, and network efficiency ⚡.


3. 📝 Requirement Analysis 🔍

3.1 🔍 Functional Requirements ⚙️

  • The system should be able to generate traffic.
  • The user shall be able to view created topology.
  • The ML model should efficiently predict the routes based on delay.
  • The system must be able to generate the cost matrix based on delay to get the shortest path.
  • The SDN Contoller should automatically manage flows via base code and configuration file.

3.2 🚀 Non Functional Requirements 💡

  • The agent’s response time should not exceed 500ms.
  • The efficient path should be calculated every 5 sec.
  • The system must update the cost matrix every 5 sec.

3.3 ⚙️ Minimum Hardware Requirements 💻

  • 8GB RAM
  • Minimum 20 GB storage

3.4 💻 Software Requirements 📝

  • OS: Ubuntu (image)
  • Programming languages: Python, Java, JSON
  • Development Tool: Visual Studio Code

📒 More Detail refer our Report.


3. 🛠️ System Design

System Model

There are mainly three layers in the system.

  • The Data Layer is where the network topology is created to reflect real-world network connections. It mainly consists of hosts, Layer 2 and Layer 3 switches, and the interconnecting links between them. This layer provides complete details of the network configuration and connections.
  • The Control Layer consists of the SDN controller OpenDayLight, which separates the control plane from the forwarding plane and centrally controls the networking decisions. The process of modifying the route table and managing the flow table with flow rules is done via the REST API provided by the SDN controller.
  • The Application Layer mainly consists of the topology, from which information is used for selecting the best path. Through the process of modifying the flow rules of the network topology with the help of SDN and updating the flow table according to the selected path, it controls the forwarding of packets and routing.

4. ➡️ Work Flow ➡️⚙🔄

  • The process describes managing routing in a Software-Defined Networking (SDN) environment using Mininet, OpenDaylight (ODL), and an LSTM-based prediction model. It starts with creating a Mininet topology and verifying its visibility in ODL.
  • If the topology is visible, the delay for all network links is predicted using the LSTM model, and a cost matrix is constructed. The shortest path between the source and destination is then identified based on the cost matrix.
  • The system updates flow rules in the network according to the calculated shortest path, ensuring efficient routing. This loop continues until all flow rules are updated, at which point the process terminates.

Throughput Comparison


5. 💻 Implementation 🛠

A detailed implementation process is described in the project report follow this for in deep understanding of implementation process.

System SetUp

1. Installing mininet

👽🕵️‍♀️ To install everything (using your home directory)

  • Clone Repository
git clone https://github.com/mininet/mininet
cd mininet
sudo ./util/install.sh -a
  • Test Installation
sudo mn --test pingall

You should see hosts pinging each other successfully.


2. Installing OpenDayLight (ODL)

  • Install Java 8
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
  • Download and Install the ODL Packages

wget https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.6.0-Carbon/distribution-karaf-0.6.0-Carbon.tar.gz

sudo tar -xvzf distribution-karaf-0.6.0-Carbon.tar.gz
cd distribution-karaf-0.6.0-Carbon
./bin/karaf
  • Install the ODL Features (Including Web UI).

Recomonded to install these features one by one.

 feature:install odl-restconf odl-mdsal-clustering odl-dlux-core odl-dlux-node odl-dlux-yangui odl-dlux-yangvisualizer odl-l2switch-all
  • Test Mininet Connectivity with OpenDayLight
sudo mn --topo single,2 --controller=remote,ip=127.0.0.1
mininet> pingall
  • Enjoy the Web UI of ODL

http://<Controller IP or localhost>:8181/index.html


3. Install Python package

sudo apt install python3
sudo apt install python3-pip
pip3 install -r requirements.txt

🫣 Setup is complete

1. Abilene Topology

Abilene Network

2. AboveNet Topology

AboveNet Network

3. German50 Topology

German50 Network

Approach 1: Hop-Count Based Routing

  • Topology Creation: Constructed the network topology by assigning random link delays within the range 0.000199 to 0.000262 seconds. This range was derived by measuring link costs over time, and the average values were used as link weights.

  • Cost Matrix Construction and Path Calculation: Built a cost matrix based on the link Hop counts and computed the shortest paths from source to destination nodes using hop-count metrics (Dijktras Algorithm).

  • Flow Rule Updates: Installed flow rules in the SDN switches according to the calculated shortest paths to direct traffic efficiently.

  • Performance Measurement: Evaluated network performance by measuring delay, bandwidth, and jitter using tools like ping and iperf and D-ITG Tool.

Note: Here the Delay can be assigned any thing between the nodes as the routing is based on the hop counts. Instead of using the random values we used 0.000199 to 0.000262 seconds this range that we got from the maximum and minimum delay through the dataset.

For 3 Topology run the code from Hop-count-Based-Routing folder

Run the scripts for each topology:

python3 ./Hop-count-Based-Routing/Abilene.py
python3 ./Hop-count-Based-Routing/AboveNet.py
python3 ./Hop-count-Based-Routing/German50.py

After Running each script run the ping and iperf command to measure various metrics such as delay,bandwidth and jitter

For Measuring metrics refer this folder Using-Tools

Results for Network Topologies Simulated:

i. Abilene Topology

Abilene Network Hopcount Result

ii. AboveNet Topology

Abovenet Hopcount Result

iii. German50 Topology

German50 Hopcount Result

Approach 2: QoS-Based Routing

  1. Building a Delay Measurement Dataset

    • Measured delays between switch links over time.
    • Saved values in Actual_values.csv.
  2. First Iteration — Assigning Lowest Delays

    • Extracted the lowest values from Actual_values.csv → saved in sorted_csv.csv.
    • Assigned these values as link weights in the topology.
  3. Cost Matrix & Path Calculation

    • Built a cost matrix from link weights.
    • Computed shortest paths from source to destination using Dijkstra's Algorithm.
  4. Flow Rule Installation

    • Installed flow rules in SDN switches according to calculated shortest paths.
  5. Second Iteration — Assigning Highest Delays

    • Extracted the highest values for the same links from Actual_values.csv → saved in reversed_rows.csv.
    • Updated link weights in the topology.
  6. Recalculate Paths & Update Flow Rules

    • Rebuilt the cost matrix with updated link weights.
    • Recomputed shortest paths and updated flow rules.
  7. Performance Measurement

    • Evaluated network performance using:
      • ping
      • iperf
      • D-ITG
    • Verified that routes shift to the next-best path when link weights increase.

For 3 Topology run the code from QoS-Based-Routing folder

Run the scripts for each topology:

python3 ./QoS-Based-Routing/Abilene.py
python3 ./QoS-Based-Routing/AboveNet.py
python3 ./QoS-Based-Routing/German50.py

Results for Network Topologies Simulated:

Abilene Network QoS Based

ii. AboveNet Topology

Abovenet QoS Based

iii. German50 Topology

German50 QoS Based

Approach 3: ML-Based Routing

  1. Building a Delay Measurement Dataset

    • Measured delays between switch links over time.
    • Saved the data in Actual_values.csv or data.csv.
  2. Training the LSTM Model

  3. First Iteration — Assigning Lowest Delays

    • Extracted the lowest delay values from Actual_values.csv → saved in sorted_csv.csv.
    • Assigned these values as initial link weights.
  4. Cost Matrix & Path Calculation

    • Built a cost matrix based on the assigned link weights.
    • Computed shortest paths from source to destination using Dijkstra's Algorithm.
  5. Flow Rule Installation

    • Installed flow rules in SDN switches according to the computed shortest paths.
  6. Second Iteration — Assigning Predicted Delays

    • Used the trained LSTM model to predict link weights dynamically.
    • In the current scripts, predicted weights are hardcoded; future work can load the model dynamically for real-time predictions.
  7. Recalculate Paths & Update Flow Rules

    • Updated the cost matrix with predicted link weights.
    • Recomputed shortest paths and updated flow rules accordingly.
  8. Performance Measurement

    • Evaluated network performance using:
      • ping
      • iperf
      • D-ITG
    • Verified that routing adapts by shifting to next-best paths when link weights change.

For 3 Topology run the code from ML-Based-Routing folder

Run the scripts for each topology:

python3 ./ML-Based-Routing/Abilene.py
python3 ./ML-Based-Routing/AboveNet.py
python3 ./ML-Based-Routing/German50.py

Other Important Things

  1. Dataset Generation
  • In the Dataset_generation folder,it has a script is provided to measure delay between each link and create a demo.csv file.
python3 ./Dataset_generation/ditg_delay_measurement.py
  1. Traffic Simulation
  • Mininet: Network emulator for creating virtual SDN topologies
  • OpenDaylight: SDN controller to program network flows
  • D-ITG: Traffic generation tool for emulating network traffic
  • Machine Learning: LSTM model for link cost prediction

6. 🧐 Results and Analysis ✅

  • The results are analyzed for three different topologies where each of them are compored with one parameter using different algorithms,the analysis are given below.

6.1 🤠 Throughput Comparison 👀

Throughput Comparison

6.2 🤠 Average Delay Comparison 👀

Average Delay Comparison

6.3 🤠 JitterComparison 👀

Jitter Comparison

6.4 🧐 The change in delay, throughput, and jitter with varying flow number

Flow Variation 1

Flow Variation 2

Credits

This repository was created and is maintained by Veeresh S Hiremath.

  • Special thanks to my teammates Manoj, Rahul, and Anoop, and to Dr. Narayan D. G. for their guidance and support throughout this project.

We would also like to acknowledge and thank the open-source communities behind Mininet, OpenDaylight, D-ITG, and all the supporting libraries and tools that made this project possible.

About

Intelligent Routing Management in SDN: A system that combines Dijkstra’s algorithm and machine learning to dynamically select optimal network paths, improving latency, resource utilization, and QoS for critical applications in data center networks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors