Due to the new release of ndnSIM (version 2.1) my last post about running ndnSIM without root has become obsolete. It is also no longer necessary to compile ndn-cxx as a separate library now. However, if you still want to use the (recommended) ndnSIM scenario template without having root access, here are the steps to follow (for version 2.1):

Step 1: follow the installation (requirements, etc...) instructions on the ndnSIM website until you have to type ./waf the first time.

For instance (after having installed all pre-requesits):
mkdir ndnSIM
cd ndnSIM
git clone ns-3
git clone pybindgen
git clone --recursive ns-3/src/ndnSIM

Step 1.a: If you require BRITE, do this in addition:

hg clone
export BRITE_HOME=$(pwd)
cd ..

Step 2: Create a directory where ns-3 and ndnSIM will be "installed" into, e.g.:
mkdir ndnSIM-build

Step 3: Go to the ns-3 subfolder and compile ns-3 and ndnSIM:
cd ns-3
./waf configure --prefix ../ndnSIM-build -d optimized

Note: --prefix ../ndnSIM-build tells the build-script to not install the libraries to the default location, but to ../ndnSIM-build.

Step 3.a: If you followed Step 1.a for BRITE, you will have to add --with-brite=$BRITE_HOME to the ./waf command:
./waf configure --prefix ../ndnSIM-build -d optimized --with-brite=$BRITE_HOME

Step 4: Grab a coffee, tea, beer, etc.! This step takes some time...

Step 5: Once this has finished, type
./waf install

Note: You did not have to use sudo! ns3 and ndnSIM are now being "installed" to ../ndnSIM-build

Step 6: Set up LD_LIBRARY_PATH and PKG_CONFIG_PATH for being able to use the scenario template
cd ..
export LD_LIBRARY_PATH=$(pwd)/ndnSIM-build/lib/

Step 6.a: You might need to add those exports to your ~/.bashrc file.

Step 7: Download and configure scenario template
git clone scenario
cd scenario
./waf configure

Step 8: Create your examples in the scenario template and run them!

Apparently the tutorial suggests to download the ndnSIM scenario template, however, this does not look to be compatible with ndnSIM 2.0 (yet).

The mailing list suggests using the ns-3/scratch/ folder (for now), so here is an example of how to use that folder to run your scenario:

cd ns-3
cd scratch
mv ndn-simple.cpp
cd ..
./waf --run my-ndn-code --vis


UPDATE June 25th: ndn-cxx MUST be compiled as a shared library now, the tutorial is now reflecting this change by executing ./waf configure --enable-shared --disable-static for ndn-cxx

First of all: follow the tutorial provided here:
Second: If you feel comfortable enough, you can copy and paste the commands from this how-to, which will generate the following directory structure:


Third: This tutorial comes without warranty. Double check every command before you copy/paste it to your commandline.

Commands for Ubuntu 14.04:

# install pre-requesits for ndn-cxx, ns-3, etc...
sudo apt-get install git
sudo apt-get install python-dev python-pygraphviz python-kiwi
sudo apt-get install python-pygoocanvas python-gnome2
sudo apt-get install python-rsvg ipython
sudo apt-get install build-essential
sudo apt-get install libsqlite3-dev libcrypto++-dev
sudo apt-get install libboost-all-dev

# install mercurial for BRITE
sudo apt-get install mercurial

mkdir ndnSIM
cd ndnSIM

# clone git repositories for ndn/ndnSIM
git clone ndn-cxx
git clone ns-3
git clone pybindgen
git clone ns-3/src/ndnSIM

# download and built BRITE
hg clone
ls -la
cd ..

# build ndn-cxx
cd ndn-cxx
./waf configure --enable-shared --disable-static
# install ndn-cxx
sudo ./waf install
cd ..

# build ns-3/ndnSIM with brite
cd ns-3
./waf configure -d optimized --with-brite=/home/$USER/ndnSIM/BRITE
sudo ./waf install

Ideally, this outputs:

Modules built:
antenna aodv applications
bridge brite (no Python) buildings
config-store core csma
csma-layout dsdv dsr
emu energy fd-net-device
flow-monitor internet lr-wpan
lte mesh mobility
mpi ndnSIM netanim (no Python)
network nix-vector-routing olsr
point-to-point point-to-point-layout propagation
sixlowpan spectrum stats
tap-bridge test (no Python) topology-read
uan virtual-net-device visualizer
wave wifi wimax

Modules not built (see ns-3 tutorial for explanation):
click openflow