Skip to content
Nick Feamster edited this page Jun 20, 2015 · 3 revisions

Installing a NetASM Virtual Machine

You can use vagrant to quickly spin up a VM. Vagrantfile and provision scripts are provided in the Github repository.

  • Starting the VM
$ cd "<repository's root directory>"
$ vagrant up
  • Logging in to the VM
$ cd "<repository's root directory>"
$ vagrant ssh

For more information on how to use vagrant, visit https://docs.vagrantup.com.

Manual Installation

Instructions for creating a NetASM VM using VirtualBox

  • Download Ubuntu Server 14.04.2 LTS image from http://www.ubuntu.com/download/server

  • To boot and log in to the VM, follow the "Boot VM" and "Log in to VM" instructions at http://mininet.org/vm-setup-notes/

  • Update the VirtualBox

    $ sudo apt-get update
  • Install essentials

    $ sudo apt-get install -y ssh git
    
    $ sudo apt-get install -y build-essential autoconf automake graphviz libtool vim
    $ sudo apt-get install -y python-all python-qt4 python-dev python-twisted-conch python-pip python-sphinx
    $ sudo apt-get install -y libpcap-dev
    
    $ sudo pip install alabaster psutil bitstring
  • Clone Mininet

    $ cd ~/
    $ git clone git://github.com/mininet/mininet
  • Install Mininet

    $ sudo ~/mininet/util/install.sh -a
  • Add Mininet to PATH and PYTHONPATH environment variables

    $ echo 'export PATH=$PATH:$HOME/mininet' >> ~/.profile
    $ echo 'export PYTHONPATH=$PYTHONPATH:$HOME/mininet' >> ~/.profile
  • Apply patch for POX

    $ cd ~/pox
    $ sudo git remote add netasm-patch https://github.com/PrincetonUniversity/pox
    $ sudo git pull netasm-patch carp
  • Install pxpcap

    $ cd ~/pox/pox/lib/pxpcap/pxpcap_c/ 
    $ sudo ./build_linux
  • Add POX to PATH and PYTHONPATH environment variables

    $ echo 'export PATH=$PATH:$HOME/pox' >> ~/.profile
    $ echo 'export PYTHONPATH=$PYTHONPATH:$HOME/pox' >> ~/.profile
  • Clone NetASM

    $ cd ~/
    $ git clone https://github.com/NetASM/NetASM-python.git netasm
  • Add NetASM to PATH and PYTHONPATH environment variables

    $ echo 'export PATH=$PATH:$HOME/netasm' >> ~/.profile
    $ echo 'export PYTHONPATH=$PYTHONPATH:$HOME/netasm' >> ~/.profile
  • Create sudopy alias

    $ echo 'alias sudopy="sudo PYTHONPATH=$PYTHONPATH"' >> ~/.profile

Clone this wiki locally