This repository contains implementations of multiple Software-Defined Networking (SDN) controllers using Ryu and Mininet, as part of COL334/672 coursework (IIT Delhi, Diwali 2024).
The focus is on understanding OpenFlow-based flow rules, network efficiency, and routing algorithms.
- Floods packets to all ports except incoming one.
- Installs only a table-miss rule.
- Inefficient due to high broadcast traffic.
- Dynamically learns MAC-to-Port mappings.
- Installs flow rules to reduce broadcast traffic.
- Efficient packet forwarding.
- Implements Minimum Spanning Tree (MST) using Kruskal’s Algorithm.
- Prevents broadcast loops in cyclic topologies.
- Maintains optimized forwarding rules.
- Uses LLDP (Link Layer Discovery Protocol) to measure link delays.
- Computes optimal paths using Dijkstra’s Algorithm.
- Ensures minimum-delay routing and loop prevention.
- Python 3
- Ryu Controller
- Mininet
- OpenFlow
- Algorithms: Learning Switch, Kruskal’s MST, Dijkstra’s Shortest Path
├── p1_hub.py # Hub controller ├── p1_learning.py # Learning switch controller ├── p2_spanning_tree.py # MST spanning tree controller ├── p3_spr.py # Shortest Path Routing controller ├── Assignment_3_Mininet_SDN.pdf # Assignment description ├── Assignment3_Report.pdf # Detailed implementation report
- Start Mininet with the desired topology:
sudo mn --custom p1_topo.py --topo mytopo --controller remote --switch ovsk --mac
Run Ryu controller (example for Learning Switch):
ryu-manager p1_learning.py
Test connectivity:
mininet> pingall mininet> iperf h1 h2
| Controller | Flow Rules Installed | Traffic Handling | Broadcast Traffic | Efficiency |
|---|---|---|---|---|
| Hub Controller | Only table-miss | Floods all packets | High | Low |
| Learning Switch | Table-miss + MAC-to-Port | Direct forwarding | Low | High |
| Spanning Tree | MST-based flow rules | Loop-free broadcast forwarding | Medium | High |
| Shortest Path | Delay-weighted Dijkstra’s routing | Optimized unicast + loop-free broadcast | Low | Very High |
📌 Key Takeaways
Demonstrates SDN concepts: Hub, Learning, Spanning Tree, and Shortest Path controllers.
Uses Ryu framework to implement OpenFlow rules dynamically.
Hands-on with network topology discovery, LLDP delay measurement, and routing algorithms.
Builds strong foundations for Network Security, Distributed Systems, and Cloud Infrastructure roles.
👨💻 Authors
Rohit Patidar (2024JCS2042)
Jitesh. (2024JCS2043)