Getting started on the ns-3 cluster

Navigation: Main -> ns-3 real-time -> Getting started on the cluster

Installation and Log In
For Windows Machines


 * 1) Install a terminal emulator such as putty
 * 2) Install a virtual network computing (VNC) viewer such as TightVNC . This will allow you to open a graphical window on the linux machine.
 * 3) Configure putty to connect to the cluster: Note that each user will need to generally connect to a different port. (Two users can use the same port at the same time, but will then "share" the window meaning they see other's activity). The instructions below are for connecting to port 5901. However, you may wish to create configurations for other ports such as 5902, 5903, etc. since port 5901 may be used.
 * 4) In Session tab, under "Host Name (or IP address)" enter 128.238.34.207.
 * 5) In Connection->SSH->Tunnels: Under "Add a new forwarded port" for "Source port" enter 5901, and for "Destination" enter 128.238.34.207:5901. Then hit "Add"
 * 6) Return to the session tab, Give a name to the session, such as "Lab-cluster:5901" and hit "save". You will then be able to load this session again.
 * 7) Once putty is configured, you can open the saved session. A terminal will appear. Enter your username and password. Contact [mailto:srangan@poly.edu Sundeep Rangan] if you need an account on the system.
 * 8) Once you are logged in, you need to start a vncserver process. You can see exsiting vnc server processes via ps -ef | grep Xvnc. Each vnc process has a port associated with it that you can see in the rfbport option. These processes may be from other users currently logged into the cluster. If you feel they are not being used, you can kill all the vnc processes via one of two ways:
 * 9) *You can kill all the vnc processes via the command sudo pkill Xvnc.
 * Or, you can find the individual process number from the ps -ef | grep Xvnc command and the kill just that process with sudo kill [processid].
 * 1) Select a port that is not currently being used. If this is not the port that you logged into, you will need to log out and connect again on the selected port.
 * 2) Start your own vnc process via vncserver -geometry 1600x900 -rfbport 5901 &. Or whatever port number is not currently being used by other vncservers.
 * 3) Start the tightVNC viewer. In remote host, enter localhost:5901. (Or, whatever port you are using). You will be prompted for a password. Note that the password is different than your account's password. Contact [mailto:srangan@poly.edu Sundeep Rangan] if forgot this password.

For Mac


 * 1) Install SSH Tunnel Manager (STM)
 * 2) Install a virtual network computing (VNC) viewer such as Chicken of the VNC
 * 3) Configure STM to connect to the cluster: Note that each user will need to generally connect to a different port. (Two users can use the same port at the same time, but will then "share" the window meaning they see other's activity). The instructions below are for connecting to port 5901. However, you may wish to create configurations for other ports such as 5902, 5903, etc. since port 5901 may be used. Under Configuration:
 * 4) Set a name for your tunnel such as "Lab-cluster:5901"
 * 5) Type your username at the server. Contact [mailto:srangan@poly.edu Sundeep Rangan] if you need an account on the system.
 * 6) Enter IP address of the server for host (128.238.34.207).
 * 7) Set the port to 22.
 * 8) Under Local redirections add a new redirection as this: Port (5901) Remote Host (128.238.34.207) Port (5901)
 * 9) Then you can close preferences window and switch to main (little) window of STM.
 * 10) Run the SSH tunnel that you created, which must be listed on main window.
 * 11) Open a terminal and ssh to the lab cluster using command:
 * 12) Enter your password.
 * 13) Once you are logged in
 * 14) *You need to start a vncserver process. You can see exsiting vnc server processes via ps -ef | grep Xvnc. Each vnc process has a port associated with it that you can see in the rfbport option. These processes may be from other users currently logged into the cluster. If you feel they are not being used, you can kill all the vnc processes via one of two ways:
 * 15) **You can kill all the vnc processes via the command sudo pkill Xvnc.
 * 16) **Or, you can find the individual process number from the ps -ef | grep Xvnc command and the kill just that process with sudo kill [processid].
 * 17) *Select a port that is not currently being used. If this is not the port that you logged into, you will need to log out and connect again on the selected port.
 * 18) *Start your own vnc process via vncserver -geometry 1600x900 -rfbport 5901 &. Or whatever port number is not currently being used by other vncservers.
 * 19) *After the first time you create your vns process it is going to ask you to set a password for it. You can use your account password for convenience. If you use something else, it is better to note it.
 * 20) ​ Start the Chicken of the VNC. In host, enter localhost:5901. (Or, whatever port you are using). Enter password and you can check Remember Password. Note that the password is the one you set when you first create the vnc process. Contact [mailto:srangan@poly.edu Sundeep Rangan] if forgot this password.

Setting up your account the first time
Instructions to be added soon

Downloading the Code and Creating the Project

 * 1) Download the code using svn from http://chic.svn.sourceforge.net/svnroot/chic/lena and save it under ~/workspace/lena
 * 2) *  // Change directory to ~/workspace
 * 3) *  // svn checkout
 * 4) Create a new C++ project using Eclipse IDE. (You can find it under /usr/bin)
 * 5) Name it as "lena" and click on Next.
 * 6) Under advance settings, C/C++ Build group:
 * 7) * Uncheck "Use default build command" and change build command to
 * 8) * Uncheck "Generate Makefiles automatically"
 * 9) * Change build directory to
 * 10) Under Behavior tab, uncheck "Build (Incremental Build)". We will build the project from the command line in a separate terminal, see commands below.

Adding Bridges
Bridges are already added. They can be used by all users if someone adds them. Then you are good to go to next step.
 * 1) Check if you can see  and   when you type.
 * 2) If you cannot see them then run these commands when you are in

Running a Simple Demo
As a simple illustration of the cluster, we will use the ns-3 software to connect two Linux virtual machines through the simulator -- one acting as if it is connected as a mobile user equipment (UE) in a LTE system.

After connecting to the cluster (with putty and VNC Viewer), and after creating bridges:
 * 1) Open a terminal window, let us call it main window.
 * 2) Run commands:
 * 3) * // to run waf shell
 * 4) * // to be able to run the code as root. It may ask you to run   first
 * 5) Then open two more terminal windows. Let us call one as left and the other one as right window.
 * 6) On the left one, run these commands to start serving an iperf application
 * 7) * // refer here for iperf options
 * 8) On the right one, run these commands to start client
 * 9) Then go back to main window and run the command below:
 * 10) After you finish your simulation, please  from   and.
 * 1) Then go back to main window and run the command below:
 * 2) After you finish your simulation, please  from   and.
 * 1) Then go back to main window and run the command below:
 * 2) After you finish your simulation, please  from   and.
 * 1) After you finish your simulation, please  from   and.
 * 1) After you finish your simulation, please  from   and.