Software Defined Network: Mininet with Ryu Controller
Installation of Ryu Controller and Mininet
I prefer installing both in a virtual machine. For that, first, we need to install Virtualbox or VMWare Workstation. Then we can download a Ubuntu Server and install it in virtualbox.
Initialize Ubuntu Server
$ sudo apt update
$ sudo apt full-upgrade -y
Install Ryu Controller
I tried installing using pip
. But, somehow, it created problem. Therefore, I switched to pip3
and now it is working fine.
$ sudo apt install python3-pip
$ sudo pip3 install ryu
$ ryu-manager --version
Install Mininet
$ git clone git://github.com/mininet/mininet
$ cd mininet
$ git tag
$ git checkout -b 2.2.2 2.2.2
$ mkdir my_mininet
While installing mininet, I faced the following issue:
E: Package 'iproute' has no installation candidate
To fix the problem, edit the install.sh
file using nano/vim.
nano ./util/install.sh
- press
ctrl+w
to find stringiproute
- replace it with
iproute2
- press
ctrl+x
->yes
to save and exit
Now run the install.sh
to install mininet.
$ ./util/install.sh -s ./my_mininet/ -a
Simulation test
Run Ryu Controller
$ ryu-manager ryu.app.simple_switch
Run Mininet topology
$ sudo mn --topo single,3 --mac --switch ovsk --controller remote
Check simulation
mininet> pingall
Leave a comment