Tuesday, September 10, 2013

Install Mininet on ubuntu 12.04 +

Mininet [Bob Lantz and McKeown 2010] is an emulation environment which creates a complete network of hosts, links, and switches on a single machine. It creates virtual networks using process based virtualization and network namespaces (features available in Linux kernels). 

In Mininet, hosts are emulated as bash processes running in a network namespace. So any code that would run on a Linux server can be run within
a Mininet “Host”. The Mininet “Host” has its own private network interface and can only see its own processes. Switches in Mininet are software-based OpenFlow switches. Links are virtual ethernet pairs, which resides in the Linux kernel and connect emulated switches to emulated hosts. 

Mininet is useful for SDN interactive development, testing and demonstrations. SDN prototypes in Mininet can be transferred to hardware with minimal changes for real time execution.

Installation from Packages

#remove any traces of earlier versions of Mininet and Open vSwitch from /usr/local/

$sudo rm -rf /usr/local/bin/mn /usr/local/bin/mnexec \
    /usr/local/lib/python*/*/*mininet* \
    /usr/local/bin/ovs-* /usr/local/sbin/ovs-*


#to confirm which OS version you are running
$lsb_release -a

#install the base Mininet package corresponding to the distribution you are running
Mininet 2.1.0 on Ubuntu 13.10: sudo apt-get install mininet
Mininet 2.0.0 on Ubuntu 13.04: sudo apt-get install mininet
Mininet 2.0.0 on Ubuntu 12.10: sudo apt-get install mininet/quantal-backports
Mininet 2.0.0 on Ubuntu 12.04: sudo apt-get install mininet/precise-backports


#deactivate openvswitch-controller if it is running

$sudo service openvswitch-controller stop
$sudo update-rc.d openvswitch-controller disable


#test Mininet
$sudo mn --test pingall

#If Mininet complains that Open vSwitch isn’t working, you may need to rebuild its kernel module:
$sudo dpkg-reconfigure openvswitch-datapath-dkms
$sudo service openflow-switch restart


#install additional software

$git clone git://github.com/mininet/mininet
$mininet/util/install.sh -fw

1 comment: