This is a simple collection of instructions and scripts to accompany the computerphile video about mininet and openflow.

Overview

How to get going.

This project should work on Linux or MacOS. I used Ubuntu 20.04 and provide some notes here. Note, this is certainly not intended as a working guide to installing an OpenFlow controller in a real production environment. This is about how to investigate it as a hobby or because you are interested in networking. Floodlight is not the most well maintained controller out there, I use it because I'm familiar with it even though it is very old now. Similarly I use pox here as a demo not because it is useful in a production environment. Opendaylight is more modern but more effort to set up.

  1. Install floodlight

  2. Install mininet

  3. Install pox. This should be as simple as

    git clone http://github.com/noxrepo/pox

  4. Clone this repository somewhere. (Note I am using http in case you are working inside the VM).

    git clone http://github.com/richardclegg/open_flow_simple_demos.git

Working with mininet

This is very simple. It must be run as root so typically you need sudo to get it to work

sudo mn 

is enough to get you running. This sets up the simplest toplogogy two hosts h1,h2 connected via switch s1. You will now be at the mininet prompt

mininet> h1 ping h2

will have host h1 ping host h2. In general typing a hostname and a command runs that command on that hostname e.g

mininet> h1 ls

lists files from h1 (it will look the same from everywhere). There is a special command

mininet> pingall

that makes every host contact every other host. Exit mininet with Ctrl-D. You usually should clean up afterwards just to be safe so

sudo mn -c

should clean up anything that did not get properly cleaned in the exit process.

Mininet toplogies

There are a few topology generators. A nice one I use in the video on Computerphile is "tree"

sudo mn --topo tree,depth=3,fanout=2 

Warning, do not try this with too much depth and fanout. It gets big quickly.

You can also generate your topology programatically from python. An example is included in this repos if you have checked it out. Run

sudo mn --custom minitop.py --topo CPtopology 

from a directory containing the file minitop.py (in this repos) will create the topology in the python file that I demonstrated in the Computerphile video.

Starting a POX based openflow controller

Now to work with a POX based openflow controller. These are controllers "handcrafted" in python.

Open a terminal and change to the directory where you installed pox:

cd ~/pox #or wherever
./pox.py samples.pretty_log misc.of_tutorial

You could then do.

./pox.py samples.pretty_log misc.of_tutorial

This will start a controller on your localhost 127.0.0.1 listing on port 6633. You connect this to mininet with:

sudo mn --topo tree,depth=3,fanout=2  --controller remote --switch ovsk

Note that this simple controller is a little old now and only works with openflow v1.2. You may see the pox controller throw some errors related to dns but you can also see now that in mininet you can do

mininet> h1 ping h2

When you are finished shut down mininet and the pox controller. Don't forget to clear mininet with

sudo mn -c

If you want to use the code I used in the computerphile video you would need to copy simplehub.py into the pox directory subdirectory pox/misc and run

./pox.py samples.pretty_log misc.simple_hub

Working with floodlight

If you want to do the same with floodlight then in the directory you installed floodlight.

cd ~/floodlight #or wherever you installed
java -jar target/floodlight.jar

In a browser window you should now be able to browse to http://127.0.0.1:8080/ui/pages/index.html

This will show you various bits of information about the floodlight controller.

Now if you set up mininet you should also tell it to use OpenFlow 1.3 or higher so that floodlight can get controller information: You could try a simple tree

sudo mn --topo tree,depth=3,fanout=4 --controller remote --switch ovsk,protocols=OpenFlow13

If you go to your web browser at http://127.0.0.1:8080/ui/pages/topology.html you should be able to see a nice tree topology. If you experiment you can get quite large topologies going. If you experiment with the code in minitop.py you can create your topology programatically.

Pox and floodlight are not bits of code I would put in production (Open vSwitch is). These demos are intended to get you started in a simple way with OpenFlow and SDN, not show you the "latest and greatest" new developments.

Owner
Richard G. Clegg
Richard G. Clegg
Some examples regarding how to use the Twitter APIs for academic research

Twitter Developer Platform: Using Twitter APIs for Academic Research All the scripts require a config.ini file in which the keys are put. There is a t

Federico Bianchi 6 Feb 13, 2022
This Server Cloner can clone the server you want with all the perms of roles in every particular channel.

Server-Cloner-with-perms 🚀 This Server Cloner can clone the server you want with all the perms of roles in every particular channel. Features Clone C

Gripz 0 Feb 17, 2022
Bendford analysis of Ethereum transaction

Bendford analysis of Ethereum transaction The python script script.py extract from already downloaded archive file the ethereum transaction. The value

sleepy ramen 2 Dec 18, 2021
vk Bot because of which everyone will lag

VK-crash-bot open cmd and write: "pip install vk-api" To configure the bot, you need to open main.py and set the value to such variables as "token" an

NotQuki 0 Jun 05, 2022
Discord-shell - Reverse shell accessible via discord.py bot

Discord-shell reverse shell on discord bot. (STILL IN DEVELOPMENT) Installation

Skultz 6 Oct 21, 2022
Script que realiza a identificação de todos os logins e senhas dos wifis conectados em uma máquina e envia os dados para um e-mail especificado.

getWIFIConnection Script que realiza a identificação de todos os logins e senhas dos wifis conectados em uma máquina e envia os dados para um e-mail e

Vinícius Azevedo 3 Nov 27, 2022
A bot that can play songs in Telegram group voice chats like AK 47

🎧 47Music Player 🎧 A bot that can play songs in Telegram group voice chats like AK 47 ✨ Easy To Deploy Pyrogram Session Config Vars API_ID : Assista

Janindu Malshan 23 Dec 07, 2022
Basic-Discord-Response-Bot, in Python

Response bot for Discord. EG: User: Hello! Bot: Hello there! About Very customizable, no credits needed. Edit the bot.py to what you want, basic Pytho

rhys 1 Nov 20, 2021
A Powerful Telethon Based Telegram Spam Bot.

Yukki Multi Spam Bot 🚀 Deploy on Heroku You can Use these API ID and API HASH while deploying String Session No Requirement of API ID and API HASH Ge

46 Dec 23, 2022
Simple Python script that lets you upload image/video to imgur

Pymgur 🐍 Simple Python script that lets you upload image/video to imgur! Usage 🔨 Git Clone this repository install the requirements (pip install -r

3 Feb 20, 2022
💀 The first raid tool of its kind. Inject Deadcord and raid servers directly from the Discord client.

💀 Deadcord The next upcoming Discord raid tool, the best for free. 🎉 Early Beta Released We have released an early version of Deadcord, please keep

Galaxzy 157 May 24, 2022
An advanced Filter Bot with nearly unlimitted filters!

Unlimited Filter Bot ㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤㅤ An advanced Filter Bot with nearly unlimitted filters! Features Nearly unlimited filters Supports all type of fil

TroJanzHEX 445 Jan 03, 2023
A muti pairs martingle trading bot for Binance exchange.

multi_pairs_martingle_bot English Documentation A muti pairs martingle trading bot for Binance exchange. Configuration { "platform": "binance_futur

51bitquant 62 Nov 16, 2022
Make low level API wrapper in fast, easy.

The lowrapper is a library for quickly and easily creating an environment for tapping the API without implementation.

tasuren 1 Oct 25, 2022
A high level library for building Discord bots.

Qord A high level library for building Discord bots. 🚧 This library is currently in development. Questions that you are having What is this? This is

Izhar Ahmad 16 May 14, 2022
Predict the Site EUI, given the characteristics of the building and the weather data for the location of the building.

wids_datathon_2022 Description: Contains a data pipeline used to predict energy EUI Goals: Dataset exploration Automating the parameter fitting, gener

1 Mar 25, 2022
Discord-Lite - A light weight discord client written in Python, for developers, by developers.

Discord-Lite - A light weight discord client written in Python, for developers, by developers.

Sachit 142 Jan 07, 2023
Simple Telegram Bot To Get Feedback from users & Some Other Features

FeedbackBot Simple Telegram Bot To Get Feedback from users & Some Other Features. Features Get Feedback from users Reply to user's feedback Customisab

Arun 18 Dec 29, 2022
The Python client library for the Tuneup Technology App.

Tuneup Technology App Python Client Library The Python client library for the Tuneup Technology App. This library allows you to interact with the cust

Tuneup Technology 0 Jun 29, 2022
A simple worker for OpenClubhouse to sync data.

OpenClubhouse-Worker This is a simple worker for OpenClubhouse to sync CH channel data.

100 Dec 17, 2022