Table of Contents
icn ccn ndnsim
ICN Simulation
Work log
Workspace: /home/dang/data/src/01imaws/50ndnsimulation_ws/ndnSIM
15 Sep 2014
- Getting started: http://ndnsim.net/getting-started.html
Simulating using ndnSIM
While it is possible to write simulations directly inside NS-3 (in scratch/ folder) or ndnSIM (in examples/), the recommended way is to write your simulation scenarios, as well as any custom extensions, separately from the NS-3 or ndnSIM core.
For example, you can use the following template to write your extensions, simulation scenarios, and metric processing scripts: http://github.com/cawka/ndnSIM-scenario-template:
mkdir ndnSIM cd ndnSIM git clone git://github.com/cawka/ns-3-dev-ndnSIM.git ns-3 git clone git://github.com/cawka/pybindgen.git pybindgen git clone git://github.com/NDN-Routing/ndnSIM.git ns-3/src/ndnSIM # Build and install NS-3 and ndnSIM cd ns-3 ./waf configure -d optimized --enable-examples ./waf sudo ./waf install cd ..
Create Scenario:
git clone git://github.com/cawka/ndnSIM-scenario-template.git scenario cd scenario export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
./waf configure ./waf --run <scenario>
Using scratch folder **Not tried**
cd ns-3/scratch git clone git://github.com/cawka/ndnSIM-scenario-template.git scenario ./waf configure ./waf --run <scenario>
Troubleshooting
- Directory structure: https://groups.google.com/forum/#!msg/ns-3-users/ppP8A9vVloo/MtxYbb-dCEkJ
- ns3-ndnSim not found: http://www.lists.cs.ucla.edu/pipermail/ndnsim/2013-March/000172.html
Lib, include not found
Run with prefix and ENV exports.
./waf configure --prefix=/home/ndnSIM
Log files:
- in separated scenario folder: build/config.log
Configure ns3 with
./waf configure -d optimized
Configure and compile scenario with ENV:
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./waf configure
or
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./waf configure --debug
Run scenario with ENV:
LD_LIBRARY_PATH=/usr/local/lib ./waf --run <scenario_name>
When running using ./waf, it is possible to run scenario with visualizer:
./waf --run <scenario_name> --vis
Sep 2014 29-30: build simple test simulation
All NDN Examples are here and not coupled in ns-3 / ndnSim packages: https://github.com/cawka/ndnSIM-examples.git
Working also with –vis
To see NS_LOG=DumbRequester:ndn.Producer ./waf –run=ndn-simple-with-content-freshness the simulation must be compiled with –debug
./waf configure --debug
My example:
NDNsim tutorial has examples: http://ndnsim.net/cs.html
git clone https://github.com/thuydang/ndnSIM-scenario-template.git td-simple-ndn