Network Prototype Simulation
View on GitHub

Network Prototype Simulator

Expanding Mininet on Cluster Architecture

Download this project as a .zip file Download this project as a tar.gz file

Welcome to Network Prototype Simulator Page.

Network Prototyping Simulator is a simulation system that expands Mininet network emulator to computer cluster. That allow us to reproduce the network with such an amount of nodes that hardly was possible before. The maximum size of network topology in NPS depends on number of cluster nodes with Mininet instances. One cluster node can emulate more than thousand hosts, and an modern server could execute at least 15 cluster nodes packed in virtual machines. As the result, we get about 15 thousands hosts per server. The scalability of NPS makes it possible to emulate really big networks.

By the architecture, NPS saves features of Mininet, so it does not become a clear simulation system, it remains a network prototyping system. Means one could trust the results of such simulation and there is no need to prove correctness and adequacy of the model built.


NPS Quick Start Guide

NPS architecture

NPS setup has two types of nodes: "cluster" node and "control" node. Currently both are packed into virtual machines. Naturally cluster setup consists of one control node and many cluster nodes. Virtualization system used is Oracle VirtualBox.

Creating Cluster Node VM

$sudo passwd root
$mkdir -p /home/clusternode/MininetScripts
#apt-get install python-scapy mininet
#apt-get install vim mc strace tcpdump netcat nmap
#apt-get install mininet
#cp path/to/NPS/config/services.py 
	root@clusternodename:/usr/share/pyshared/mininet/

#cp path/to/NPS/config/services.py 
	root@clusternodename:/usr/lib/python2.7/dist-packages/mininet/

Working With VM Clones

Boot each of cluster nodes and proceed with following updates

/etc/hostname:
n001
/etc/hosts:
[..]
127.0.0.1	n001
10.0.2.101	n001 
10.0.2.102	n002
10.0.2.201	ccnode
[..]
/etc/NetworkManager/NetworkManager.conf
[..]
[ifupdown]
managed=false
[..]
/etc/network/interfaces:
[..]
manual eth1

auto eth0
iface eth0 inet static
	address 10.0.2.101
	netmask 255.255.255.0
[..]

Creating NPS control node

As the basis for NPS control node we used Ubuntu Desktop 13.10 distribution. You can find an installation medium on Ubuntu site. For NPS control node one needs amd64 architecture install CD.

/etc/hostname:
ccnode
								
/etc/hosts:
[..]
10.0.2.201	ccnode.mn-cnet	ccnode
10.0.2.101	n001.mn-cnet	n001
10.0.2.102	n002.mn-cnet	n002
[..]

/etc/network/interfaces:
[..]
auto eth0
iface eth0 inet static
	address 10.0.2.201
	netmask	255.255.255.0

auto eth1
iface eth1 inet dhcp
	dns-nameservers 8.8.8.8 

[..]

/etc/NetworkManager/NetworkManager.conf: 
[..]
[ifupdown]
managed=false
[..]

apt-get install python-networkx python-matplotlib python-paramiko 
apt-get install cmake default-jdk git ant libgl1-mesa-dev freeglut3-dev libgstreamer0.10-dev libgstreamermm-0.10-dev libwebkitgtk-dev 

include/metis.h:
[..]
IDXTYPEWIDTH 64
[..]
Compile and install:
$make config shared=1
$make
$sudo make install
$sudo ldconfig

$ cd floodlight-0.90
$ ant

/home/mininet/wxPython/wxPython-2.9.5.0/build/tools/builder.py:
[..L121..]
	if options:
		args.extend(options)
[..]
[..L134..]
	if options:
		args.extend(options)
[..]

$cd /home/mininet/wxPython/wxPython-2.9.5.0/wxPython
$sudo python2.7 build-wxpython.py --build_dir=../build-wxPython/ --install
$sudo ldconfig

$ cd /home/mininet/nps
$ git clone https://github.com/ARCCN/nps.git

/home/mininet/nps/nps/config/nodelist.txt:
10.0.2.101 n001 root eth1 10.0.2.201 6633
10.0.2.102 n002 root eth1 10.0.2.201 6633

/home/mininet/nps/nps/config/config_constants.py:
[..]
nps_PATH = '/home/mininet/nps/nps'
CONTROLLER_PATH = '/home/mininet/floodlight/floodlight-0.90/'
SRC_SCRIPT_FOLDER = nps_PATH + '/scripts/'
DST_SCRIPT_FOLDER = '/home/clusternode/MininetScripts/' 

MALWARE_CENTER_IP = "10.0.2.201"
MALWARE_CENTER_PORT = 56565

FIRST_HOST_IP = '1.2.3.1'

CLUSTER_NODE_MACHINE_NAME = 'n001'
SCRIPT_FOLDER = 'scripts/nodes/'
REMOTE_CONTROLLER_IP = '10.0.2.201'
REMOTE_CONTROLLER_PORT = '10.0.2.201'
[..]

After that steps You can run NPS GUI using python2.7 interpreter


$python ./NPSGUI.py

Simple Workflow

$ python ./NPSGUI.py
NPS> help
NPS> h1 ping h2
NPS> h1 ifconfig
NPS> hosts info
NPS> exit

Support or Contact

Having trouble with NPS? Contact vantonenko@arccn.ru.


Useful Hints

If you needed to draw in NPS GUI graph size of more than 500 nodes. You need to provide some fixes in NetworkX library.

In "/usr/lib/pymodules/python2.7/networkx/drawing/layout.py", change the code in line 233

A=nx.to_scipy_sparse_matrix(G,weight=weight)

to

A=nx.to_scipy_sparse_matrix(G, weight=weight,dtype='f')

Source: here.


Authors

Antonenko Vitaly

ARCCN, Moscow

vantonenko@arccn.ru, anvial@lvk.cs.msu.su

Andrey Nikolaev

ARCCN, Moscow

anikolaev@arccn.ru, gentoorion@gmail.com


Special Thanks

Special Thanks go to the following for their help and support in the development of NPS system:

LJYBowser

Enjoy the simulation with NPS!