How sandeepelayath/capstone_2026_pw25_rmh_01 works
Project type and purpose
• This is a full-stack SDN (Software-Defined Networking) application with built-in ML-based anomaly detection and a real-time analytics dashboard.
• It simulates traffic in Mininet, uses Ryu as the SDN controller, processes flow data through a trained LSTM (and hybrid LSTM-RANN) model for anomaly detection, then triggers adaptive QoS or honeypot mitigation, and visualizes metrics via a Streamlit dashboard.
File structure
• Top-level scripts:
• admin_interface.py (CLI or REST endpoint for on-demand actions)
• analytics_dashboard.py (Streamlit or Flask dashboard)
• demo_attack_simulation.py (drives simulated attack traffic)
• run_dashboard.sh
• controller/
• ryu_controller.py (entry point for Ryu controller)
• process-and-predict.py (ingests flows, invokes ML model)
• flow_classifier.py (abstraction for model inference)
• mitigation_manager.py (QoS or honeypot logic)
• data_processing/
• preprocess_cicids.py (feature-engineering pipeline for CIC-IDS dataset)
• ML_Model_Latest/, lstm_finetuned_ml_model/, lstm_rann_hybrid_finetuned_ml_model/
• CSV storage, model files (.h5, .keras), pickled scaler & feature names
• mininet/
• test_topology.py (defines network topology)
• fix_connectivity.py, mininet-data-collector.py (live flow capture)
• Configuration & environment: requirements.txt, .gitignore, DASHBOARD_README.md
README for additional insights
• Describes dependencies (Mininet, Open vSwitch, Python 3.9, Ryu).
• Details setup, data preprocessing, model training, controller launch, topology simulation, and dashboard launch.
• No external database—models and flow data are file-based.
a. Main components
1. Mininet Layer (Simulated switches & hosts)
2. SDN Controller (Ryu)
3. Data Processing & ML Engine (process-and-predict, flow_classifier, mitigation_manager)
4. Storage (local CSV, pickle/keras model files)
5. Analytics Dashboard (Streamlit UI)
6. Admin Interface (optional CLI/REST endpoint)
b. Relationships & interactions
• Mininet test_topology.py spins up virtual network → forwards flow statistics (via OpenFlow) to Ryu controller.
• ryu_controller.py emits PACKET_IN or STATS_REPLY events → process-and-predict.py extracts features.
• flow_classifier applies the LSTM (or LSTM-RANN) model, scaler, and feature_names → outputs anomaly score/class.
• mitigation_manager triggers QoS adjustments via Ryu APIs or redirects suspicious flows to honeypot.
• analytics_dashboard.py polls log files or exposes WebSocket/REST endpoints on controller to display real-time stats.
• admin_interface.py allows manual overrides or policy changes via controller RPC.
c. Architectural patterns & principles
• Layered architecture: data-plane (Mininet), control-plane (Ryu controller), application-plane (ML engine, mitigation logic), presentation-plane (dashboard).
• Modular design: each responsibility (flow capture, preprocessing, classification, mitigation, visualization) is decoupled into separate modules.
• Asynchronous event-driven flow handling within Ryu.
d. Key technologies
• Mininet & OVS for network emulation
• Ryu SDN controller framework (Python, event handlers)
• TensorFlow/Keras LSTM and hybrid LSTM-RANN models
• Scikit-learn for feature scaling
• Streamlit (or equivalent) for dashboard UI
• Python 3.9 environment managed by pip and virtualenv
Detail
• Event flows: PACKET_IN → feature extraction → predict() → mitigate().
• Configuration paths (requirements.txt → environment setup).
• Tuning or phase scripts (e.g., LSTM_Phase3 scripts under ML_Model_Latest).
• How demo_attack_simulation.py integrates with Mininet to generate traffic patterns your detection pipeline processes.