-
-
Save egaviriarestrepo/21bdd02bcee0f4681217ea2d28785d3b to your computer and use it in GitHub Desktop.
Revisions
-
Mohammad Shokri revised this gist
Oct 28, 2017 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,22 +15,20 @@ Extract NS2 & put it in Home: ```bash cd ~ tar xzvf ~/Downloads/ns-allinone-2.35.tar.gz ``` Extract UM-OLSR & put it in NS2: ```bash tar xzvf ~/Downloads/um-olsr-1.0.tgz # Move UM-OLSR into NS2 & Reanme it to "olsr" mv ~/um-olsr ~/ns-allinone-2.35/ns-2.35/olsr ``` * * * # APT Install Required Packages: ```bash sudo apt install -Vy build-essential autoconf automake gcc sudo apt install -Vy xorg-dev tcl-dev tk-dev perl xgraph libxt-dev libx11-dev libxmu-dev ``` @@ -45,7 +43,7 @@ cd ~/ns-allinone-2.35/ # File LinkStat # Line 137 gedit ns-2.35/linkstate/ls.h +137 # Change "erase" to "this->erase", Save and Exist GEdit ``` * * * -
Mohammad Shokri revised this gist
Jul 12, 2017 . 1 changed file with 15 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ # Upgrade Ubuntu ```bash sudo apt update sudo apt upgrade -Vy ``` * * * # Download NS2 Download NS2 & OLSR: - [NS2-AllInOne 2.35](https://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/) - [UM-OLSR](https://sourceforge.net/projects/um-olsr/files/um-olsr/1.0/) @@ -27,7 +27,7 @@ mv ~/Downloads/um-olsr-1.0 ~/ns-allinone-2.35/ns2/olsr * * * # APT Install Required Packages: ```bash sudo apt install -Vy emacs unrar @@ -37,7 +37,7 @@ sudo apt install -Vy xorg-dev tcl-dev tk-dev perl xgraph libxt-dev libx11-dev li * * * # Prepare NS2 Source Code ```bash cd ~/ns-allinone-2.35/ @@ -50,18 +50,25 @@ gedit ns-2.35/linkstate/ls.h +137 * * * # Prepare OLSR Source Code Apply OLSR Patch: ```bash cd ns-2.35/ patch -p1 < olsr/um-olsr_ns-2.35_v1.0.patch cd .. ``` * * * # Install Install NS2 & OLSR: ```bash ./install ``` * * * # Configure Bash Path Put these lines at the end of `~/.bashrc` file: ```bash gedit ~/.bashrc @@ -90,7 +97,7 @@ export PATH="$XGRAPH:$NS:$NAM:$PATH" * * * # Done! Run NS2: ```bash ns ~/path/to/file.tk -
Mohammad Shokri revised this gist
Jul 12, 2017 . 1 changed file with 15 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,11 @@ #### Upgrade Ubuntu #################################### ```bash sudo apt update sudo apt upgrade -Vy ``` * * * #### Prepare NS2 ####################################### Download NS2 & OLSR: - [NS2-AllInOne 2.35](https://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/) @@ -23,6 +25,8 @@ tar xzvf ~/Downloads/um-olsr-1.0.tgz mv ~/Downloads/um-olsr-1.0 ~/ns-allinone-2.35/ns2/olsr ``` * * * #### APT ############################################### Install Required Packages: ```bash @@ -31,6 +35,8 @@ sudo apt install -Vy build-essential autoconf automake gcc sudo apt install -Vy xorg-dev tcl-dev tk-dev perl xgraph libxt-dev libx11-dev libxmu-dev ``` * * * #### Prepare Source Code ############################### ```bash @@ -42,6 +48,8 @@ gedit ns-2.35/linkstate/ls.h +137 # Change "erase" to "this->erase" ``` * * * #### Apply OLSR Patch ################################# ```bash @@ -51,12 +59,15 @@ cd .. ./install ``` * * * ##### Configure Bash Path ############################# Put these lines at the end of `~/.bashrc` file: ```bash gedit ~/.bashrc ``` Replace `madooga` with your username(`whoami`): ```bash ##### NS2 #### # LD_LIBRARY_PATH @@ -77,6 +88,8 @@ NAM="/home/madooga/ns-allinone-2.35/nam-1.15" export PATH="$XGRAPH:$NS:$NAM:$PATH" ``` * * * ##### Done! ########################################### Run NS2: ```bash -
Mohammad Shokri revised this gist
Jul 12, 2017 . 1 changed file with 45 additions and 20 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,44 +1,63 @@ #### Update Ubuntu #################################### ```bash sudo apt update sudo apt upgrade -Vy ``` #### Prepare NS2 ####################################### Download NS2 & OLSR: - [NS2-AllInOne 2.35](https://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/) - [UM-OLSR](https://sourceforge.net/projects/um-olsr/files/um-olsr/1.0/) Extract NS2 & put it in Home: ```bash cd ~ tar xzvf ~/Downloads/ns-allinone-2.35.tar.gz mv ~/Downloads/ns-allinone-2.35 ~/ ``` Extract UM-OLSR & put it in NS2: ```bash tar xzvf ~/Downloads/um-olsr-1.0.tgz # Move UM-OLSR into NS2 & Reanme it to "olsr" mv ~/Downloads/um-olsr-1.0 ~/ns-allinone-2.35/ns2/olsr ``` #### APT ############################################### Install Required Packages: ```bash sudo apt install -Vy emacs unrar sudo apt install -Vy build-essential autoconf automake gcc sudo apt install -Vy xorg-dev tcl-dev tk-dev perl xgraph libxt-dev libx11-dev libxmu-dev ``` #### Prepare Source Code ############################### ```bash cd ~/ns-allinone-2.35/ # File LinkStat # Line 137 gedit ns-2.35/linkstate/ls.h +137 # Change "erase" to "this->erase" ``` #### Apply OLSR Patch ################################# ```bash cd ns-2.35/ patch -p1 < olsr/um-olsr_ns-2.35_v1.0.patch cd .. ./install ``` ##### Configure Bash Path ############################# Put these lines in `~/.bashrc` file: ```bash gedit ~/.bashrc ``` ```bash ##### NS2 #### # LD_LIBRARY_PATH OTCL_LIB="/home/madooga/ns-allinone-2.35/otcl-1.14" @@ -57,3 +76,9 @@ NS="/home/madooga/ns-allinone-2.35/ns-2.35" NAM="/home/madooga/ns-allinone-2.35/nam-1.15" export PATH="$XGRAPH:$NS:$NAM:$PATH" ``` ##### Done! ########################################### Run NS2: ```bash ns ~/path/to/file.tk ``` -
Mohammad Shokri revised this gist
Jun 23, 2017 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ #### Links ############################################# - [NS2-AllInOne 2.35](https://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/) - [UM-OLSR](https://sourceforge.net/projects/um-olsr/files/um-olsr/1.0/) #### APT ############################################### ```bash -
Mohammad Shokri revised this gist
Jun 23, 2017 . 1 changed file with 26 additions and 26 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,36 @@ #### APT ############################################### ```bash sudo apt install -V emacs unrar sudo apt install -V build-essential autoconf automake gcc sudo apt install -V xorg-dev tcl-dev tk-dev perl xgraph libxt-dev libx11-dev libxmu-dev ``` #### SRC ############################################### ```bash # LinkStat gedit ~/ns-allinone-2.35/ns-2.35/linkstate/ls.h +137 change "erase" to "this->erase" # GCC #gedit ~/ns-allinone-2.35/otcl-1.14/Makefile.in +7 #change "CC= @CC@" to "CC=gcc-4.4" ``` #### OLSR ############################################### ```bash cd ~/ns-allinone-2.35/ns-2.35/ patch -p1 < olsr/um-olsr_ns-2.35_v1.0.patch cd .. ./install #cd ns-2.35/ #./configure #make #cp ns ns-olsr ``` ######## Bash ######################################### ```bash @@ -28,28 +53,3 @@ NS="/home/madooga/ns-allinone-2.35/ns-2.35" NAM="/home/madooga/ns-allinone-2.35/nam-1.15" export PATH="$XGRAPH:$NS:$NAM:$PATH" ``` -
Mohammad Shokri revised this gist
Jun 23, 2017 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,8 @@ #### APT ############################################### ```bash sudo apt install -V vim emacs unrar sudo apt install -V build-essential autoconf automake gcc sudo apt install -V xorg-dev tcl-dev tk-dev perl xgraph libxt-dev libx11-dev libxmu-dev ``` -
Mohammad Shokri revised this gist
Jun 23, 2017 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,9 +8,9 @@ sudo apt install -V xorg-dev tcl-dev tk-dev perl xgraph libxt-dev libx11-dev lib ``` ######## Bash ######################################### ```bash gedit ~/.bashrc ##### NS2 #### # LD_LIBRARY_PATH OTCL_LIB="/home/madooga/ns-allinone-2.35/otcl-1.14" @@ -32,13 +32,15 @@ export PATH="$XGRAPH:$NS:$NAM:$PATH" #### SRC ############################################### ```bash # LinkStat gedit ~/ns-allinone-2.35/ns-2.35/linkstate/ls.h +137 change "erase" to "this->erase" # GCC gedit ~/ns-allinone-2.35/otcl-1.14/Makefile.in +7 change "CC= @CC@" to "CC=gcc-4.4" ``` #### OLSR ############################################### -
Mohammad Shokri created this gist
Jun 23, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ #### APT ############################################### ```bash sudo apt install -V vim emacs unrar meld sudo apt install -V build-essential autoconf automake sudo apt install -V gcc sudo apt install -V xorg-dev tcl-dev tk-dev perl xgraph libxt-dev libx11-dev libxmu-dev ``` ######## Bash ######################################### gedit ~/.bashrc ```bash ##### NS2 #### # LD_LIBRARY_PATH OTCL_LIB="/home/madooga/ns-allinone-2.35/otcl-1.14" NS2_LIB="/home/madooga/ns-allinone-2.35/lib" USR_LOCAL_LIB="/usr/local/lib" export LD_LIBRARY_PATH="$OTCL_LIB:$NS2_LIB:$USR_LOCAL_LIB:$LD_LIBRARY_PATH" # TCL_LIBRARY TCL_LIB="/home/madooga/ns-allinone-2.35/tcl8.5.10/library" USR_LIB="/usr/lib" export TCL_LIBRARY="$TCL_LIB:$USR_LIB:$TCL_LIBRARY" # PATH XGRAPH="/home/madooga/ns-allinone-2.35/bin:/home/madooga/ns-allinone-2.35/tcl8.5.10/unix:/home/madooga/ns-allinone-2.35/tk8.5.10/unix" NS="/home/madooga/ns-allinone-2.35/ns-2.35" NAM="/home/madooga/ns-allinone-2.35/nam-1.15" export PATH="$XGRAPH:$NS:$NAM:$PATH" ``` #### SRC ############################################### # LinkStat gedit ~/ns-allinone-2.35/ns-2.35/linkstate/ls.h +137 change "erase" to "this->erase" # GCC gedit ~/ns-allinone-2.35/otcl-1.14/Makefile.in +7 change "CC= @CC@" to "CC=gcc-4.4" #### OLSR ############################################### ```bash cd ~/ns-allinone-2.35/ns-2.35/ patch -p1 < olsr/um-olsr_ns-2.35_v1.0.patch cd .. ./install cd ns-2.35/ ./configure make cp ns ns-olsr ```