IntelliHome SDN

System Architecture

1) High‑Level Design


IntelliHome separates the control plane (Ryu apps + policy/analytics) from the data plane (Open vSwitches in Mininet). Packets traverse programmable switches, followed by decisions (allow/blocked/malicious/benign) made centrally using MUD policy checks, ML inference, and a PageRank‑style trust score.


System Diagram

The following diagram illustrates the core components and data flow within IntelliHome SDN:

System Architecture Diagram

Module Map (This Project)

The Ryu app in ryu_project.py drives the control plane. Switches (OVS) form the data plane in Mininet. For each new flow: MUD baseline check → ML inference via model_engine.classify_flowTrust (PageRank) → fused decision → OpenFlow rules.

2) Components & Responsibilities

3) Data & Control Flow

  1. PacketIn → Ryu.
  2. MUD pre-check. If src⇢dst violates the device baseline from mud_policy, mark and block/quarantine.
  3. Feature extraction. proto, pkt_len, src_port, dst_port (passed to ML).
  4. ML inference. from model_engine import classify_flowclassify_flow(features).
  5. Trust update. Add edge src→dst to trust_graph, recompute PageRank periodically.
  6. Decision. Fuse MUD ∧ ML ∧ Trust → allow / rate-limit / quarantine / block.
  7. Program switch. Issue flow_mod with timeouts & priority.
  8. Expose state. Append to logs & expose via REST for UI.

4) OpenFlow Pipeline (Tables)

# conceptual rules installed by ryu_project.py
      table=0  match:ip_proto=6,tp_dst=443                actions:set_field:device=cam1,GOTO:10
      table=10 match:device=cam1,policy=allow_tls         actions:meter:1,GOTO:20
      table=10 match:device=cam1,ip_proto=17,tp_dst=23    actions:drop
      table=20 match:nw_dst=10.0.0.42                     actions:output:3
        

5) Decision Logic (Fusion)

// in ryu_project.py (conceptual)
      if MUD == "DENY":
        action = DROP
      elif ML == "malicious":
        action = QUARANTINE if Trust < 0.2 else DROP
      elif MUD == "ALLOW" and ML == "benign" and Trust > 0.4:
        action = ALLOW
      else:
        action = RATE_LIMIT
        

6) Northbound REST API (from MudRestController)

{
        "device": "thermostat-1",
        "flow": "10.0.0.5:443/tcp → 8.8.8.8",
        "mud": "ALLOW",
        "ml": "benign",
        "trust": 0.63,
        "decision": "ALLOW",
        "switch": "s1", "table": 20, "priority": 200, "idle_timeout": 60
      }
        

7) MUD Policy Engine

8) ML Inference (model_engine.py)

9) Trust Scoring (PageRank in ryu_project.py)

Maintain trust_graph (directed src→dst edges on allowed flows). Recompute trust with networkx.pagerank() periodically (e.g., every 20 new edges) and expose via /api/trust.

10) Telemetry, Logging & Storage

11) Security & Failure Considerations

12) Performance & Scalability

13) Configuration (Excerpt)

{
        "openflow": "1.3",
        "timeouts": { "idle": 60, "hard": 0 },
        "flood": { "PACKET_THRESHOLD": 1000, "TIME_WINDOW_SEC": 200 },
        "ml": { "module": "model_engine.py", "model_file": "rf_model.pkl" },
        "trust": { "recompute_every_edges": 20, "alpha": 0.85 },
        "mud": { "file": "mud_policy.json", "default_policy": "deny" }
      }
        

14) Demo Runbook

  1. Start controller: ryu-manager ryu_project.py --observe-links
  2. Launch Mininet: sudo mn --custom topo.py --topo intellihome --controller=remote,ip=127.0.0.1,port=6633 --switch ovs,protocols=OpenFlow13
  3. Generate benign + attack traffic; watch Demo & Results pages pull from /mud/blocked and /api/trust.

15) See Also