Your e-mail messages will be slightly edited before being posted here :-) Ljiljana. Messages will be posted in a reverse chronological order (last message listed first) and grouped by the subject matter. ****************************************************************************** Date: Mon, 4 Feb 2013 14:20:55 -0800 (PST) From: Jeff Priest To: ensc-427@sfu.ca Cc: Ljiljana Trajkovic , Soroush Haeri , Majid Arianezhad Subject: Assignment 4 Issues Hi everyone, I've encountered a few issues while working on Assignment 4, and thought I'd share what I've figured out so far: The first problem you might encounter is with regards to the "scen-3-test" movement file. It doesn't exist...or at least, I couldn't find it on the ESIL machines. I found another copy elsewhere, and have attached it to this email. Just put it in the same file as your .tcl file, and change the following line in the definitions at the top of your file: -- Change this line: set val(sc) "../mobility/scene/scen-3-test" -- to this: set val(sc) "scen-3-test" #Assumes this file is located in the same directory as this .tcl file The second issue you might have to deal with is having NAM not open (the simulation still runs, however). To fix this, I made the following modifications to the stop procedure: proc stop {} { global ns_ tracefd namtrace $ns_ flush-trace close $tracefd close $namtrace exec nam out.nam & exit 0 } Now the NAM window should open, but it might be empty. To fix this, you need to comment the following two lines: $ns_ duplex-link-op $W(0) $W(1) orient down $ns_ duplex-link-op $W(1) $BS(0) orient left-down Now you should have stuff displaying in the NAM window. I hope this helps, - Jeff File "scen-3-test": set god_ [God instance] $ns_ at 50.000000000000 "$node_(2) setdest 369.463244915743 170.519203111152 3.371785899154" $ns_ at 51.000000000000 "$node_(1) setdest 221.826585497093 80.855495003839 14.909259208114" $ns_ at 33.000000000000 "$node_(0) setdest 89.663708107313 283.494644426442 19.153832288917" $god_ set-dist 1 2 2 $god_ set-dist 0 2 3 $god_ set-dist 0 1 1 $node_(2) set Z_ 0.000000000000 $node_(2) set Y_ 199.373306816804 $node_(2) set X_ 591.256560093833 $node_(1) set Z_ 0.000000000000 $node_(1) set Y_ 345.357731779204 $node_(1) set X_ 257.046298323157 $node_(0) set Z_ 0.000000000000 $node_(0) set Y_ 239.438009831261 $node_(0) set X_ 83.364418416244 ****************************************************************************** Date: Thu, 24 Jan 2013 08:00:55 -0800 (PST) From: Dong Yang To: Ljiljana Trajkovic Subject: ns-2.35 setup under cygwin & windows 7 Hi Professor Trajkovic, Here are the steps I setup ns-2.35 under cygwin & windows 7: 1. My windows version: windows 7 professional with service pack 1 2. install cygwin (please check setup.ini to see what exact package I've installed) 3. Download ns-2.35 from http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download 4. Under ns-allinone-2.35 directory, input: ./install 5. Then open X11 under cygwin by inputting: startx & 6. To run test script, under Xterm, input: ns ns-2.35/tcl/ex/simple-dyn.tcl Thanks, Dong ****************************************************************************** Date: Wed, 23 Jan 2013 18:38:09 -0800 From: Josh To: ensc-427@sfu.ca Subject: Easy ns2 install for Ubuntu Linux If you have Ubuntu Linux (or one of its derivatives) installed on your pc or laptop or if you have it running in a virtual machine there is an easy way to install ns2. Ubuntu uses a package format that comes from debian linux called deb files. This allows the easy installation of thousands of open source applications in ubuntu linux. In order to install ns2 in ubuntu linux follow these steps: 1. Open a terminal window. 2. Enter the following command "sudo apt-get install ns2 nam". 3. Follow the on screen instructions to confirm your install. And now ns2 and nam are installed ready to use and already in the PATH. If you wish to install additional documentation and examples you can use the following command "sudo apt-get install ns2-doc ns2-examples" The command above can be explained as follows: "sudo" is used to temporarily request root (or administrator) privileges "apt-get" is a program used for installing and removing packages "install" is the command we want apt-get to use followed by a list of packages we want to install I have tested this with the Ubuntu 12.10 repositories and was able to install ns2 version 2.35. This should work with older versions of ubuntu however the version of ns2 may not be as recent. Good luck everyone, hope this helps get your ns2 setup on your personal computer or laptop. Josh Ancill ****************************************************************************** Date: Tue, 22 Jan 2013 17:07:31 -0800 (PST) From: Kim Izmaylov To: ensc-427@sfu.ca Cc: Ljiljana Trajkovic , marianez@sfu.ca, Soroush Haeri Subject: ENSC 427 - Installing ns-2.35 on Ubuntu (overcoming "make: *** [tk3d.o] Error 1 tk8.4.14 make failed!" error) Hello, If you already have ns-2.35 running on your machines, please disregard this email. I know some people have had this error appear while installing ns-2 on their Ubuntu: make: *** [tk3d.o] Error 1 tk8.4.14 make failed! Attached are the instructions on how to fix this (open them with a Linux text editor, preferrably). Information from: http://tech.firdooze.com/2008/08/29/how-to-install-network-simulator-2-network-animator-nsnam-on-ubuntu-hardy/ All the credit goes to this webpage, I simply edited it to make it work for ns-2.35. I quickly put this together as I was working through the problem myself, so please let me know if something doesn't work. Cheers, Kim Izmaylov ------------------------------------------------------------------------------- Troubleshooting ns-2.35.txt Apparently there are some dependencies missing from Ubuntu that you need for tk8.4.14. To get them, type in the terminal: sudo apt-get install autoconf automake libxmu-dev Once that is complete, try installing the ns-2, it should work this time. Note that right after it installs, you will see additional instructions (right in the terminal). If you know how to do that, skip the rest of the email. You need to change some environment variables. Type: sudo gedit ~/.bashrc Add the following lines (down until "save and close the file") to the file and replace: #environment values for NS2/NAM # LD_LIBRARY_PATH OTCL_LIB=/your directory/ns-allinone-2.35/otcl-1.14 NS2_LIB=/your directory/ns-allinone-2.35/lib X11_LIB=/usr/X11R6/lib USR_LOCAL_LIB=/usr/local/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB # TCL_LIBRARY TCL_LIB=/your directory/ns-allinone-2.35/tcl8.5.10/library USR_LIB=/usr/lib export TCL_LIBRARY=$TCL_LIB:$USR_LIB # PATH XGRAPH=/your directory/ns-allinone-2.35/bin:/your directory/ns-allinone-2.35/tcl8.5.10/unix:/your directory/ns-allinone-2.35/tk8.5.10/unix NS=/your directory/ns-allinone-2.35/ns-2.35 NAM=/your directory/ns-allinone-2.35/nam-1.15 PATH=$PATH:$XGRAPH:$NS:$NAM Save and close the file. Type: source ~/.bashrc After that, type: cd ns-2.35 ./validate This should validate your ns-2 (be patient, it takes a very long time) and hopefully it is successfull! Information from: http://tech.firdooze.com/2008/08/29/how-to-install-network-simulator-2-network-animator-nsnam-on-ubuntu-hardy/ All the credit goes to this webpage, I simply edited it to make it work for ns-2.35 rather than ns-2.33. P.S. I am a Linux newbie so I really do not know much more about what I just described ... but it works, so I hope this helps for everyone else who is struggling with this error. ****************************************************************************** Last modified: Tue Jan 22 20:42:32 PST 2013