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.

You might also like...
Video-Player - Telegram Music/ Video Streaming Bot Using Pytgcalls
Video-Player - Telegram Music/ Video Streaming Bot Using Pytgcalls

Video Player 🔥 ᴢᴀɪᴅ ᴠᴄ ᴘʟᴀyᴇʀ ɪꜱ ᴀ ᴛᴇʟᴇɢʀᴀᴍ ᴘʀᴏᴊᴇᴄᴛ ʙᴀꜱᴇᴅ ᴏɴ ᴘʏʀᴏɢʀᴀᴍ ꜰᴏʀ ᴘʟᴀʏ

Play Video & Music on Telegram Group Video Chat
Play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat 🧪 Get SESSION_NAME from below: Pyrogram

A simple telegram Bot, Upload Media File| video To telegram using the direct download link. (youtube, Mediafire, google drive, mega drive, etc)

URL-Uploader (Bot) A Bot Upload file|video To Telegram using given Links. Features: 👉 Only Auth Users (AUTH_USERS) Can Use The Bot 👉 Upload YTDL Sup

A simple telegram bot that resolves video urls using yt-dlp

URL to Video Telegram Bot A simple telegram bot that resolves video urls using yt-dlp Copyright (C) 2021 Vítor Vasconcellos This program is free softw

Simple Python script that lets you upload image/video to imgur
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

Light weight Scripts and Apps for checking availability of Covid Vaccines in India. Notifies when vaccine becomes avialable in your area.

vaccine-checker Light weight Scripts and Apps for checking availability of Covid Vaccines in India. Notifies when vaccine becomes avialable in your ar

Prisma Cloud utility scripts, and a Python SDK for Prisma Cloud APIs.

pcs-toolbox Prisma Cloud utility scripts, and a Python SDK for Prisma Cloud APIs. Table of Contents Support Setup Configuration Script Usage CSPM Scri

Stop writing scripts to interact with your APIs. Call them as CLIs instead.
Stop writing scripts to interact with your APIs. Call them as CLIs instead.

Zum Stop writing scripts to interact with your APIs. Call them as CLIs instead. Zum (German word roughly meaning "to the" or "to" depending on the con

Scripts to help you win the Pizza Express

Slice of the Prizes Slice of the Prizes is a Python Script designed to enter the "Slice of the Action" competition hosted by Pizza Express the competi

Owner
Richard G. Clegg
Richard G. Clegg
📢 Video Chat Stream Telegram Bot. Can ⏳ Stream Live Videos, Radios, YouTube Videos & Telegram Video Files On Your Video Chat Of Channels & Groups !

Telegram Video Chat Bot (Beta) ?? Video Chat Stream Telegram Bot ?? Can Stream Live Videos, Radios, YouTube Videos & Telegram Video Files On Your Vide

brut✘⁶⁹ // ユスフ 15 Dec 24, 2022
Video Stream is a telegram bot project that's allow you to play video on telegram group video chat

Video Stream is a telegram bot project that's allow you to play video on telegram group video chat ?? Get SESSION_NAME from below: Pyrogram ## ✨ Featu

null 1 Nov 10, 2021
Video Stream: an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat ?? Get SESSION_NAME from below: Pyrogram

Jonathan 6 Feb 8, 2022
Video Bot: an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

Video Bot is an Advanced Telegram Bot that's allow you to play Video & Music on

null 5 Jan 26, 2022
Video Stream: an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music

SHU KURENAI TEAM 4 Nov 5, 2022
Cedric Owens 16 Sep 27, 2022
A collection of scripts to steal BTC from Lightning Network enabled custodial services. Only for educational purpose! Share your findings only when design flaws are fixed.

Lightning Network Fee Siphoning Attack LN-fee-siphoning is a collection of scripts to subtract BTC from Lightning Network enabled custodial services b

Reckless_Satoshi 14 Oct 15, 2022
A collection of scripts to steal BTC from Lightning Network enabled custodial services. Only for educational purpose! Share your findings only when design flaws are fixed.

Lightning Network Fee Siphoning Attack LN-fee-siphoning is a collection of scripts to subtract BTC from Lightning Network enabled custodial services b

Reckless_Satoshi 14 Oct 15, 2022
this is a telegram bot repository, that can stream video on telegram group video chat.

VIDEO STREAM BOT telegram bot project for streaming video on telegram video chat, powered by tgcalls and pyrogram ?? Commands: /vstream (reply to vide

levina 319 Aug 15, 2022
Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

WAR MUSIC / VIDEO PLAYER Bot Bot Link: ?? Get SESSION_NAME from below: Pyrogram ?? Preview ✨ Features Music & Video stream support MultiChat support P

Abhishek singh 11 Dec 25, 2022