# ashwinn-v/traffic-classifier-sdn architecture

> Architecture diagram of the GitHub repository ashwinn-v/traffic-classifier-sdn, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ashwinn-v/traffic-classifier-sdn
- Repository: https://github.com/ashwinn-v/traffic-classifier-sdn

## Overview

This repository is an SDN traffic-classification system: traffic is generated or observed in a Mininet/Open vSwitch network, flow counters are collected by a Ryu monitor, and the classifier derives bidirectional flow features for prediction or training-data collection. The README also identifies traffic categories and six model families; the tree contains corresponding datasets and model artifacts. The excerpts show the monitor’s statistics output and the classifier’s parsing and prediction, but not the full training implementation or all runtime configuration, so those relationships are omitted or marked unverified.

Main entry points: [`datasets`](https://github.com/ashwinn-v/traffic-classifier-sdn/tree/main/datasets) (Training datasets), [`traffic_classifier.py`](https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/traffic_classifier.py) (Traffic classifier), [`D-IGT_scripts`](https://github.com/ashwinn-v/traffic-classifier-sdn/tree/main/D-IGT_scripts) (D-ITG scripts), [`simple_monitor_13.py`](https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/simple_monitor_13.py) (Flow monitor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_traffic["Traffic sources"]
  node_ditg["D-ITG scripts"]
  node_traffic_classes["Traffic classes"]
end

subgraph group_sdn["SDN monitoring"]
  node_mininet_ovs["Mininet and OVS"]
  node_ryu["Ryu controller"]
  node_monitor["Flow monitor"]
end

subgraph group_classification["Classification"]
  node_classifier["Traffic classifier"]
  node_flow_features["Flow features"]
  node_prediction["Traffic prediction"]
  node_training_capture["Training capture"]
end

subgraph group_data["Training assets"]
  node_training_data["Training datasets"]
  node_model_families["Model artifacts"]
  node_dns_data["DNS data"]
  node_game_data["Game data"]
  node_ping_data["Ping data"]
  node_telnet_data["Telnet data"]
  node_voice_data["Voice data"]
end

node_operator(("Operator"))

node_operator -.->|"starts traffic"| node_ditg
node_ditg -.->|"simulates flows"| node_mininet_ovs
node_operator -->|"starts topology"| node_mininet_ovs
node_mininet_ovs -.->|"uses controller"| node_ryu
node_ryu -->|"dispatches events"| node_monitor
node_monitor -->|"emits stats"| node_classifier
node_classifier -->|"updates flows"| node_flow_features
node_flow_features -->|"predicts labels"| node_prediction
node_classifier -->|"collects samples"| node_training_capture
node_training_capture -->|"writes samples"| node_training_data
node_training_data -.->|"trains models"| node_model_families
node_classifier -->|"loads model"| node_model_families
node_training_data -->|"includes"| node_dns_data
node_training_data -->|"includes"| node_game_data
node_training_data -->|"includes"| node_ping_data
node_training_data -->|"includes"| node_telnet_data
node_training_data -->|"includes"| node_voice_data

click node_ditg "https://github.com/ashwinn-v/traffic-classifier-sdn/tree/main/D-IGT_scripts"
click node_traffic_classes "https://github.com/ashwinn-v/traffic-classifier-sdn/tree/main/datasets"
click node_monitor "https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/simple_monitor_13.py"
click node_classifier "https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/traffic_classifier.py"
click node_flow_features "https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/traffic_classifier.py"
click node_prediction "https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/traffic_classifier.py"
click node_training_capture "https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/traffic_classifier.py"
click node_training_data "https://github.com/ashwinn-v/traffic-classifier-sdn/tree/main/datasets"
click node_model_families "https://github.com/ashwinn-v/traffic-classifier-sdn/tree/main/models"
click node_dns_data "https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/datasets/dns_training_data.csv"
click node_game_data "https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/datasets/game_training_data.csv"
click node_ping_data "https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/datasets/ping_training_data.csv"
click node_telnet_data "https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/datasets/telnet_training_data.csv"
click node_voice_data "https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/datasets/voice_training_data.csv"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ditg,node_traffic_classes toneBlue
class node_mininet_ovs,node_ryu,node_monitor toneAmber
class node_classifier,node_flow_features,node_prediction,node_training_capture toneMint
class node_training_data,node_model_families,node_dns_data,node_game_data,node_ping_data,node_telnet_data,node_voice_data toneRose
class node_operator toneIndigo
```

## Components

### Traffic sources

- [D-ITG scripts](https://github.com/ashwinn-v/traffic-classifier-sdn/tree/main/D-IGT_scripts): `D-IGT_scripts`
- [Traffic classes](https://github.com/ashwinn-v/traffic-classifier-sdn/tree/main/datasets): `datasets`

### SDN monitoring

- **Mininet and OVS**
- **Ryu controller**
- [Flow monitor](https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/simple_monitor_13.py): `simple_monitor_13.py`

### Classification

- [Traffic classifier](https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/traffic_classifier.py): `traffic_classifier.py`
- [Flow features](https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/traffic_classifier.py): `traffic_classifier.py`
- [Traffic prediction](https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/traffic_classifier.py): `traffic_classifier.py`
- [Training capture](https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/traffic_classifier.py): `traffic_classifier.py`

### Training assets

- [Training datasets](https://github.com/ashwinn-v/traffic-classifier-sdn/tree/main/datasets): `datasets`
- [Model artifacts](https://github.com/ashwinn-v/traffic-classifier-sdn/tree/main/models): `models`
- [DNS data](https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/datasets/dns_training_data.csv): `datasets/dns_training_data.csv`
- [Game data](https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/datasets/game_training_data.csv): `datasets/game_training_data.csv`
- [Ping data](https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/datasets/ping_training_data.csv): `datasets/ping_training_data.csv`
- [Telnet data](https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/datasets/telnet_training_data.csv): `datasets/telnet_training_data.csv`
- [Voice data](https://github.com/ashwinn-v/traffic-classifier-sdn/blob/main/datasets/voice_training_data.csv): `datasets/voice_training_data.csv`

### Other components

- **Operator**

## Connections

- Operator → D-ITG scripts: starts traffic (evidence: `README.md`)
- D-ITG scripts → Mininet and OVS: simulates flows (evidence: `README.md`)
- Operator → Mininet and OVS: starts topology (evidence: `README.md`)
- Mininet and OVS → Ryu controller: uses controller (evidence: `README.md`)
- Ryu controller → Flow monitor: dispatches events (evidence: `simple_monitor_13.py`)
- Flow monitor → Traffic classifier: emits stats (evidence: `traffic_classifier.py`)
- Traffic classifier → Flow features: updates flows (evidence: `traffic_classifier.py`)
- Flow features → Traffic prediction: predicts labels (evidence: `traffic_classifier.py`)
- Traffic classifier → Training capture: collects samples (evidence: `traffic_classifier.py`)
- Training capture → Training datasets: writes samples (evidence: `traffic_classifier.py`)
- Training datasets → Model artifacts: trains models
- Traffic classifier → Model artifacts: loads model (evidence: `traffic_classifier.py`)
- Training datasets → DNS data: includes (evidence: `README.md`)
- Training datasets → Game data: includes (evidence: `README.md`)
- Training datasets → Ping data: includes (evidence: `README.md`)
- Training datasets → Telnet data: includes (evidence: `README.md`)
- Training datasets → Voice data: includes (evidence: `README.md`)
