TA Page for CS276 : Advanced Topics in Networking

Please contact the TAs (kharras@cs.ucsb.edu, gayatri@cs.ucsb.edu) with any questions pertaining to the class.

Preface the subject line of your e-mails with "[CS 276]:" for a faster response to your questions.
 

The Network Simulator: NS-2

Installing NS-2    |    Related Tools    |     Getting Started With NS-2    |    Homework3 FAQs  

Installing NS-2

In order to run ns-2, you could type in the complete path or modify your PATH: 

% /usr/local/ns-allinone-2.28/ns-2.28/ns your-tcl-program.tcl

For example, download: ex-tcl.tcl and type:

% /usr/local/ns-allinone-2.28/ns-2.28/ns ex-tcl.tcl

The program should output:

k < 5, pow = 1.0
k < 5, pow = 1120.0
k < 5, pow = 1254400.0
k < 5, pow = 1404928000.0
k < 5, pow = 1573519360000.0
k >= 5, mod = 0
k >= 5, mod = 4
k >= 5, mod = 0
k >= 5, mod = 0
k >= 5, mod = 4

Note: The global copy of ns2 is sufficient for Homework 3.
 

If you plan to develop new protocols (as part of your project work) using ns2, you will need to install a local copy of ns2. A local install is necessary if you need to implement new protocols, make changes to existing protocols, compile the makefile, etc.  Here are the instructions to perform a local install.

1) cd to your sandbox account.
2) At the shell prompt, type the following command: % ulimit -f unlimited
This will remove the upper limit on the file size (**make sure to do this in the bash shell**)
3) download the ns-allinone-2.28 package using the following command: % wget http://www.isi.edu/nsnam/dist/ns-allinone-2.28.tar.gz
4) cd to the ns-allinone-2.28 directory. Run the install script: % ./install

Check the ns-2 installation problems page if you run into any compile errors. Know more about the building ns from here.

Note: Check this webpage frequently, as we may post additional installation instructions or patches.
 

Related Tools

All of the related tools (e.g. nam, xgraph) can be found within the /usr/local/ns-allinone-2.28 directory.  To make accessing these tools more convenient, update the following
environment variables for your shell:

PATH variable
- Add /usr/local/ns-allinone-2.28/bin

LD_LIBRARY_PATH variable
- Add /usr/local/ns-allinone-2.28/otcl-1.9
- Add /usr/local/ns-allinone-2.28/lib



Network Simulator NS-2  

Getting started with NS-2

Sample NS-2 assignment

Homework 3