Skip to content

Hongwei-Z/SDN_FL_IoT_DDoS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SDN-based Federated Learning System for Detecting DDoS on IoT

CSCI 6709 - Software Defined Networking, Dalhousie University.

Han Yang, Nathanael Bowley, Hongwei Zhang, Raham Moghaddam, Ehssan Mousavipour

System Architecture:
System Architecture

Abstract:
Our system has three main components: the controller, switch, and security gateway. The controller takes responsibility for network management and acts as the model parameter aggregation server on the FL. The switch is responsible for communication and will maintain a flow table for routing. The security gateway is the network's access point, which will store the traffic data for IoT devices connected to it and train localized ML models based on saved data. Lastly, the gateway will retrieve an updated global model from the controller and then use it to monitor the communication traffic of the connected device. The controller will inject flow rules on the switch when traffic arrives, and will pass them to the security gateway for attack detection.

Dataset download:

  1. Under sampling: https://drive.google.com/file/d/1i0LeDVGU5b5x1ly2vKaobu15Stq1024v/view?usp=sharing
  2. SMOTE: https://drive.google.com/file/d/1W1cOULcJzCdCWk299eYxUmCmIU-WK49I/view?usp=sharing
  3. Original dataset: N-BaIoT Dataset to Detect IoT Botnet Attacks

Instructions:
The following instructions you need to take to run the Demo:

  1. Downloading the "processedDataset" and make it under a folder named "dataset"
  2. Open two terminals, one for the controller, and another for mininet
  3. Terminal 1 go to the path /Desktop/ryu/bin, run command:
python3 ryu-manager --observe-links <Path of controller>/controller.py
  1. Terminal 2 go to the path ./src, run command:
sudo -E mn --custom myTopo.py --topo create_topo --switch ovs --controller=remote --arp --mac
  1. In mininet, call xterm h1, xterm h2, xterm h3 to access three hosts
  2. Under host1, go to folder server, run (To enbale the aggregrator):
python3 server1.py 
  1. Under host2 go to folder client, run (To enbale the worker1):
python3 client1.py
  1. Under host3 go to folder client, run (To enbale the worker2):
python3 client2.py
  1. Repeat for other clients

About

SDN-based Federated Learning System for Detecting DDoS on IoT

Topics

Resources

Stars

Watchers

Forks

Languages

  • Jupyter Notebook 85.3%
  • Python 14.3%
  • Other 0.4%