Posts

Showing posts from August, 2019

Future References

Image
Hello All, Hope you learned something useful with respect to SDNs and ML through this workshop. In case if you are interested to work further in this amazing domain, you might face many problems. This post is to help you out at such a point. One very common problem one might face while working with Zodiac FX switches are that it might just stop working sometimes. Try checking with different USB cables, Ethernet cables, and laptop ports. If you have exhausted the above possibilities, you can install and/or update the firmware of the Zodiac FX switch. The below videos helps you to the same. In case you face any other problem, you can refer to our blog we have created exclusively for our SDN based final year project. In the blog, we have explained the errors we have previously got, how we fixed those errors, various software packages we've used, how to use them and how to create a real-time prototype of any topology you wish to build. https://aristasdn.blogspo...

List of commands for Day 3

Here is the list of commands we shall be needing for Day 3: To open putty: sudo putty Inside the putty terminal: openflow show flows To run the Ryu controller: cd ryu ryu-manager ryu.app.ofctl_rest ryu.app.simple_switch_13 ryu-manager ryu.app.ofctl_rest ryu.app.rest_router Curl Commands: curl -X GET http://localhost:8080/stats/switches curl -X POST -d '{"dpid": 123917682136693,"priority": 1030 , "match" : { "ipv4_src" : "192.168.1.30", "ipv4_dst":"192.168.1.40"},"actions":[{"type": "SET_FIELD","field": "ipv4_src","value": "192.168.1.50" },{"type": "SET_FIELD","field": "eth_type" , "value" : 2048}, {"type":"OUTPUT","port": 3}]}' http://localhost:8080/stats/flowentry/add To create a DDoS attack: hping3 -c 10000 -d 120 -S -w 64 --flood --r...

Session 1 Day3

Hi folks, The agenda for today is to learn the intuition for decision trees and artificial neural networks. The dataset and scripts for decision trees: https://drive.google.com/drive/folders/1n386wJlSC0gUX2Ty6PsfPLEIgtvtcJt9?usp=sharing The dataset and scripts for Neural nets: https://drive.google.com/open?id=1gDPDemTfG26iMqiweRQg1l6J6yPX3Ufk

Day 3 : Session 1 - ML prerequisites

Hi folks, Updates 1. pip3 install pydotplus 2. pip3 install IPython If graphviz executable is failing to load, then do the following in the terminal,                    sudo apt-get install graphviz Please install keras and tensorflow to implement neural nets using the following commands 1. pip3 install tensorflow 2. pip3 install keras Stay tuned for more updates! :)

ML resources

Hi folks! Here are some useful links for deeper understanding of ML,amd the concepts covered in the workshop. 1. Linear regression https://medium.com/datadriveninvestor/basics-of-linear-regression-9b529aeaa0a5 2. Reinforcement learning Tic Tac Toe example https://towardsdatascience.com/reinforcement-learning-implement-tictactoe-189582bea542 The basics https://deeplizard.com/learn/video/my207WNoeyA The pros and cons https://pythonistaplanet.com/pros-and-cons-of-reinforcement-learning/ 3. KNN https://www.datacamp.com/community/tutorials/k-nearest-neighbor-classification-scikit-learn 4. Overall example of what algorithm to use when https://blog.statsbot.co/machine-learning-algorithms-183cc73197c 5. Neural Nets The video for basics https://www.youtube.com/watch?v=aircAruvnKk Theory for Artificial neural networks http://www.theprojectspot.com/tutorial-post/introduction-to-artificial-neural-networks-part-1/7 How to set up your first simple neural net with keras...

Day 3 Session 2: Building an SDN network

In this session, we shall initially be building a basic SDN network with 1 Controller, 1 Zodiac FX switch and 2 Hosts. Later, we shall look into how OpenFlow protocol installs flows in the Zodiac FX switch using 2 software packages: putty Wireshark After this, we shall create DDoS attacks and see how the controller reacts. We shall also see how to detect DDoS attacks from the controller. Here is a recap of Day 2, which is necessary to understand tomorrow's session: Step 1: Connect a USB cable to power the Zodiac FX switch and the other end to the laptop. Note that the Zodiac FX switch can be powered from any device and not just the controller. Step 2: Open a terminal and execute the command dmesg | grep tty Note the port of the system the USB ACM device is connected to. It's usually ttyACM0 or ttyACM1. Step 3: Open putty terminal by executing this command sudo putty Go to the Serial Connection Type and give /dev/ttyACM0 or /dev/ttyACM1 ...

Day 2 : Session 4 - ML Hands-on

Hi Folks! :) Hope you are having fun learning machine learning basics. A wise man once said you never really know it until you code it. So, why not get our hands a little dirty? Here's the link for the hands-on planned for this session. The link contains the dataset, and the script for running the algorithm. Download it and place it in the same folder. Watch this! :) https://www.youtube.com/watch?v=-wCN-Y3Ya0Y

Day 2 Session 1: Introduction to Zodiac FX switch

Image
Hello All, The Zodiac FX switch something like this: The first three ports from the left can be used to connect to any host or any other Zodiac FX switch while the fourth port must be connected only to the controller. Here, the controller refers to the system where you are running any Ryu controller code (or any other controller like ODL, Pox or so on). We need the putty software to set up this piece of hardware before we could use it. TO set it up, we can follow the following command once we have opened a Serial Input SSH terminal from Putty. To know more about Zodiac FX switch, how to install and update its firmware and know its various components, refer to this link: https://forums.northboundnetworks.com/index.php?topic=52.0 https://forums.northboundnetworks.com/downloads/zodiac_fx/guides/ZodiacFX_UserGuide_0517.pdf The following commands are to be typed in a Putty session connected to the Zodiac FX switch- config show config set name ZodiacFX1 set ip-address 192...

Session 4: Coding topologies in Mininet

The commands in the previous post help us to use the in-built topologies of Mininet. We could use Python to code our own topology. Here is a sample code to the below topology-             H1    H2    H3     H4                \   /             \    /                 S1              S2                     \            /                   Controller #!/usr/bin/python from mininet.net import Mininet from mininet.node import Controller, OVSKernelSwitch, RemoteController from mininet.cli import CLI from mininet.log import setLogLevel, info def emptyNet():     net = Mininet(controller=RemoteController, switch=OVS...

Session 3: Introduction to Mininet

Hello All, Download the package xterm before starting: sudo apt install xterm The commands you need to know: sudo mn sudo mn -c The commands inside the Mininet terminal we shall be looking at: help nodes net xterm host/switch dump host/switch ifconfig -a pingall  exit Please refer to the below link for a more detailed walkthrough of Mininet as the above list is not exhaustive, but ones I found most important: http://mininet.org/walkthrough/#display-startup-options

Prerequisites for Machine Learning part of the Workshop :)

Image
Hi folks! Prerequisites for the Machine Learning section of the workshop are as follows: Software requirements: 1. Ubuntu 18.04 Operating System Since we will be running python scripts for machine learning model building, we need to have python installed. Also, to install the python related machine learning libraries and preprocessing modules, we need pip. Pip is a package management system that simplifies installation and management of software packages written in Python such as those found in the Python Package Index (PyPI). Pip is not installed by default on Ubuntu 18.04, but the installation is pretty straightforward. Ubuntu 18.04 ships with Python 3, as the default Python installation. Complete the following steps to install pip (pip3) for Python 3: Start by updating the package list using the following command:           sudo apt update Use the following command to install pip for Python 3:           sudo...