From ResiliNetsWiki
Jump to: navigation, search


Writing and Presentation Tools


Unless there is a compelling reason* to do otherwise, all ResiliNets papers, reports, proposals, theses, and dissertations must be prepared using LaTeX.

  • Mac OS X
    • TeXShop IDE for Mac OS X – free open source
    • BibDesk GUI for creating BibTeX entries – free open source
  • MS Windows: TeXnicCenter IDE – free open source
    • install MiKTeX first
    • when you run TeXnicCenter you must indicate where you installed MiKTeX; when prompted push the button on the right to navigate to C:\Program_Files\MiKTeX_2.x\miktex\bin (or your location if you didn't do a default install)

 *such as a requirement from a funding sponsor

MS Thesis Template

MS Proposal Template


For better or worse, MS-PowerPoint is the de facto standard for presentation. While it would be nice if open source alternatives such as OpenOffice were totally compatible, they are not. Unfortunately, different versions of PowerPoint are utterly incompatible with one another, and meerly opening a PowerPoint 2003 file with PowerPoint 2006 can alter it. MacOffice PowerPoint 2004 not compatible with 2003 for windows, and performance is terrible for large files. Therefore, we have standardised on MS-PowerPoint 2003 for Windows in the ResiliNets group.

Figures and Diagrams

We also use PowerPoint for figures, because this allows them to be natively plugged into our presentations, as well as used in LaTeX documents (after exporting to PDF). While PowerPoint may not be the most powerful drawing tool, nor everyone's favourite tool, it should be used unless there is a compelling reason to do something else, and only after consultation with the rest of the group.

Development Tools


ResiliNets uses SVN (subversion) version control system for shared code and document access. While a web browser will read files, it will not permit you to commit or update to the repository, thus you must either use SVN commands in a shell, or use a GUI client such as:

  • CLI interface for linux
  • Versions GUI client for Mac OS X ~ €40
  • TortoiseSVN client that integrates with MS Windows Explorer – free open source
    1. download application installer .msi file (32- or 64-bit depending on your architecture)
    2. run installer and follow setup wizard instructions for default install
    3. restart Windows
    4. open Windows explorer
    5. create an empty folder for your local copy
    6. right-click on Desktop; choose TortoiseSVN -> Create repository here
    7. right-click on the folder you just created and select SVN Checkout
    8. enter the repository URL given to you by the repository administrator; substitute your ITTC username for the USERNAME part
    9. enter your username and password in the Authentication popup and check Save Authentication box
    10. you can now edit files locally; when you are done right-click on the file name and choose SVN Commit to replace into the repository
    11. to update your own local copies with others changes, right-click on the repository folder and choose SVN Update

Eclipse IDE

  • For Windows:
    • You will have to download putty and XMing for X11 forwarding to Windows. Please follow as stated below.
      1. Download binaries of putty ssh client for windows.
      2. You can get the standard X.Org X server ported for Windows; it's called XMing.Here are the links XMing,XMing fonts.
      3. Start Xming and it will ask you to allow it through the windows firewall. Click Unblock.
      4. Open the putty session and type in the hostname as, port 62.
      5. Go down to the SSH dropdown and click on X11. Check 'Enable x11 Forwarding' and in the X Display location box, type in 'localhost:0:0'.
      6. Go back to the session tab and click on save session by providing a name so that you need not go through this process always.
  • Now you are good to go with connecting to ITTC server by clicking Open.
  • Once on the ITTC machine, follow the steps present below from logging onto the BFS machine.
    1. ssh -Y bfs
    2. goto the eclipse directory specified above.
    3. type in ./eclipse -keyring $HOME/.eclipse-keyring/.keyring
    4. You can now use eclipse through your desktop/laptop.
  • Now if you want to work on projects from SVN, you can directly checkout them onto your eclipse workspace and checkin the modifications back to the repository.
    1. Open eclipse as stated above.
    2. Select you workspace on the raid5 folder or create a new workspace if not already present.
    3. Open the 'SVN repository Exploring' perspective if not opened in that.
    4. Right-click on the 'SVN Repositories' on the left side and click 'new'. Provide the SVN repository URL: ' '. Provide the necessary details if prompted for username or password.
    5. From the repository, select the project you want to download. Right-click on it and select 'checkout'.
    6. From the popup window select '...using New Project Wizard' and click 'Finish'.
    7. Select C++ project and give your project a name(select makefile, empty project and the toolchain as Linux GCC).
    8. Your project will now be downloaded into your workspace and follow the steps to build the project using eclipse as stated below.

To commit your changes back

  1. Select the file you want to commit. Right-click on it and select 'Team'->commit. You can do many more such as comparing two files looking back at the history etc.

These instructions apply to using the Eclipse installation for the resilinets project and creating ns-3 project on BFS using it.

  • Installation path: /projects/resilinets/tools/eclipse/3.5.1_x64/eclipse
  • Opening Eclipse through an SSH connection
    1. ssh -Y bfs
    2. goto the eclipse directory specified above.
    3. type in ./eclipse -keyring $HOME/.eclipse-keyring/.keyring
    4. You can now use eclipse through your desktop/laptop.
  • To create a new ns3 project in eclipse follow the below instructions.
    1. create a workspace when prompted. select workbench.
    2. Goto file->new->c++ project
    3. Select makefile->empty project
    4. Give your project name
    5. Unclick default location
    6. Give /raid5/IKUS/ns-allinone-3.7/ns-3.7 for location, the directory where you have ns3 installation
    7. Choose linux GCC as the toolchain
    8. Finish
  • To build the project in Eclispe
    1. Right click on project->properties
    2. Goto c/c++ build
    3. Unclick use default build command
    4. Provide the './waf build' or the complete path as follows 'python /raid5/IKUS/ns-allinone-3.7/ns-3.7/waf build'. Basically its "python 'your waf location' build".
    5. Click workspace tab and select your workspace->OK
    6. Add'/build' to that path as shown here ${workspace_loc:/{WorkspaceName}/build}
    7. Goto behaviour tab: remove 'all' from Build(incremental build)
    8. Apply/OK

You are now good to build the ns3 project. To run the simulation scenarios though, I would recommend you to use the terminal.


Much of the work done in the ResiliNets group requires the use of Unix-based tools. If you must use a MS-Windows system, do a full install of Cygwin, which will give you a proper shell (bash by default) window and Unix-like development environment.

Text Editors

You will need a text editor for creating and modifying source files, which include programs, scripts, configuration files, and Web pages. MS-Word is not a text editor, and is an utterly unacceptable way to manipulate text files. Popular feature-rich text editors include the following:

  • Emacs – installed by default default in all Unix distributions (including Linux and Mac OS X). Part of the cygwin distribution for Windows (in shell mode); window-based versions are also available
  • vi – installed by default default in all Unix distributions (including Linux and Mac OS X).

While not useful for serious development, MS-Windows Notepad and Mac OS TextEdit are acceptable for simple editing tasks.

Web Browser

For security reasons, MSIE (Internet Explorer) is a poor choice, unless your security model is to trust all developers of ActiveX controls that can run arbitrary software on your machine. Alternatives include:

  • Firefox: open-source cross platform including MS-Windows, Mac OS X, and Linux
    • essential security and privacy add-ons – if you click these links from Firefox you can add by clicking on the Add to Firefox green button
      • NoScript to block scripts and Flash
      • CS Lite to control cookies in a manner similar to NoScript
      • Adblock Plus removes virtually all advertisements
  • Safari: Mac OS X and MS-Windows
    • AdBlock removes virtually all advertisements; Safari must be run in 32-bit mode in Snow Leopard (but it's worth it)
  • Opera is the most standards-compliant browser; cross-platform among many operating systems and mobile devices
  • Google Chrome open source for MS-Windows; beta releases for Mac OS X and Linux

Simulation and Analysis Tools

ns-2 (deprecated)

We are no longer doing development on the ns-2 platform.


We are currently using version 3.7, and previously worked with 3.5.1. 3.6 had too many bugs so we skipped it.

There is an abundance a material on ns-3, so it is maintained on it's own page to avoid cluttering this one.

We have also done some ns-3 benchmarks.


MATLAB is a high-level programming language developed by The MATHWorks inc. for numerical computations, technical graphics and visualization. It is particularly useful while dealing with vectors or matrices of data.

ResiliNets research group uses MATLAB extensively for various computations such as topology generation for KU-Location Generator Project. The MATLAB script used here produces an adjacency matrix and node co-ordinates constrained by cost and other parameters.

The current version available on ITTC machines is (R2008b).

The latest version of the topology generation code is located on BFS server at /raid5/jinghan

The main file is Core_v16_visual.m Run this m-file in Matlab.

Steps to run topology analyzer code on an adjacency matrix

1. Save the adjacency matrix in a text file (either sparse or full) in your 'My Documents' folder as myfile.txt

2. SSH into BFS from your local machine

ssh -XY bfs

3. Change directory to /raid5/jinghan

4. Copy the text file on to BFS mserver at this location

cp ~/myfile.txt .

5. Start matlab by typing matlab

6. Verify that myfile.txt is seen in the current directory window in Matlab, you should also see the code file TopologyAnalyzerV16.m

7. From the command prompt in Matlab run the function


Note: If A is not a square matrix, then tyoe in command window




8. The output metrics should be visible in the command window for you to copy.

To determine the sorted list of link betweenness

1. From the command window copy the list of values shown under 'ec' (edge centrality). The list should be in the form shown below;

(x,y) abcd

where x: from node number

y: to node number

abcd: link betweenness

2. Paste this list in an Excel sheet and have 'space' and 'comma' as column separators.

3. Get rid of the paranthesis '(' and ')' by using find and replace

4. You should be left with one column of from node numbers, another for to node numbers and last one with link betweenness values.

5. Save this excel sheet as myfile1.xls format and copy it to the location /raid5/jinghan on BFS server

6. From the command window type these commands

a. W=xlsread('myfile1.xls'); or W=textread('myfile1.txt'); if it is a .txt file

b. [x,y]=sort(W(:,3));

c. M=[W(y,1) W(y,2) W(y,3)];

7. Now matrix M has the sorted list of link betweenness values

8. Just say 'M' in the command window to view the list. You can copy paste this list in your editor.

Usage of trace_stats script

The is a perl script used for post processing of simulations using the trace file as source of information. Various network performance parameters such as delay, goodput and packet delivery ratio could be computed using the script.

Usage of ns3-master script

The is a perl script also used for post processing of simulations using the simulation scenario by itself as source of information for the script. An added feature of the ns3-master script is the use of multiple runs to obtain more accurate averaged network performance parameters. The various network performance parameters computed by the script are similar to the trace_stats script and are delay, goodput and packet delivery ratio.

Gnuplot and gpwrapper

Excel does not produce acceptable plots for publication. gnuplot is the best option, and using the gpwrapper script developed by Abdul Jabbar will plot your data using acceptable defaults, and produce both PDF and PNG images with light, dark, and transparent backgrounds.


NS3 does not have animation support...not yet anyways. We wrote a Matlab code to analyze as well as visualize the mobility based on the processed output of ns3 mobility module. This tools lets you evaluate the average and instantaneous connectivity and produces a avi file of the mobility pattern.

Running jobs on the ITTC cluster

For performing large number of ns-3 simulations we will use the ITTC cluster. For using the cluster we need to make sure to correctly represent the resources required for the simualtion. Below are some of the general settings that could be helpful in running the simulations without much hassle.

We use 'pbs' scripts to schedule the jobs on the cluster. The pbs scripts will contain all the commands that you need to run for your simulations.

Mobility Tracing Plotter

This plotter generates a 2D plot of the all the nodes in the file. It detects the number of the nodes from the tracing file. However, the size of the plot could be specified using user parameters in the header section of the script.


NetworkX is a Python language software package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.

Path Diversity Calculations

Resilinets TopView

Resilinets TopView

This webpage allows you to visualize a variety of Layer 1 and Layer 3 network topologies from various sources. It also allows you to create combined networks from the existing topologies and download the Node list and Adjacency Matrix for every network for your own use. In the SVN, see "maps/www/v2/Instructions for Website Use.docx" for information on how to add network topologies to the website.

Website File Guidelines

Node List Entry: "[Node Location (ex. Pennsylvania,PA,USA)]",[Latitude],[Longitude],[Extra Node Qualifiers]

Adjacency List: [First Node (Number is Index in Node list)],[Second Node connect to the first one (Number is Index in Node list)],[Extra Link Qualifers]

Personal tools