NS-2.35 Installation on UBUNTU-16.04- LTS (Step by Step)

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.ย. 2024
  • NS-2.35 Installation on UBUNTU-16.04 || Step by Step guide to install the ns2 on LINUX/UBUNTU-16.04-LTS
    Installation Instructions (Step by Step):
    Step 1. Keep the setup file “ns-allinone-2.35.tar.gz” inside the home folder/directory
    Step 2. open the terminal ($)
    Step 3. Extract the “ns-allinone-2.35” folder from the zipped folder by the following command:
    $ tar -xvzf ns-allinone-2.35.tar.gz
    Step 4. Go to the linkstate folder inside the ns-allinone-2.35/ns-2.35 by typing the following command in the terminal:
    $ cd ns-allinone-2.35/ns-2.35/linkstate
    Step 5. Inside this folder (linkstate) you need to make some changes in the file “ls.h” in the line no. 137. Use the following command:
    $ gedit ls.h
    Go to line no. 137 and replace
    void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
    With
    void eraseAll() { this-'GreaterThanSymbol'erase(baseMap::begin(), baseMap::end()); }
    and save the file
    Step 6. Now go back to home directory in the terminal by typing the following command:
    $ cd\
    Step 7. you will require an active INTERNET connection now onwards.
    Type the following command in order to download some required updates:
    $ sudo apt-get update
    Password: $ type here your root password
    The system will take some time to install the updates
    Step 8. Now type the following command to fetch some required files from the Internet:
    $ sudo apt-get install build-essential autoconf automake libxmu-dev
    This will install some required packages
    Step 9. Now go to “ns-allinone-2.35” folder and type the following command :
    $ cd ns-allinone-2.35
    $ ./install
    This command will start the installation process.
    It will take around 40 - 60 minutes (varies with certain systems)
    Step 10. Now after the installation process you require to set the path in the “.bashrc” file .
    Open the “.bashrc” file with the following command:
    $ gedit .bashrc
    append the following PATH settings in the BASHRC file and SAVE the file
    #Path SETTING
    LD_LIBRARY_PATH
    OTCL_LIB=/home/Your-User-Name/ns-allinone-2.35/otcl-1.14
    NS2_LIB=/home/Your-User-Name/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=/home/Your-User-Name/ns-allinone-2.35/tcl8.5.10/library
    USR_LIB=/usr/lib
    export TCL_LIBRARY=$TCL_LIB:$USR_LIB
    PATH
    XGRAPH=/home/Your-User-Name/ns-allinone-2.35/bin:/home/Your-User-Name/ns-allinone-2.35/tcl8.5.10/unix:/home/Your-User-Name/ns-allinone-2.35/tk8.5.10/unix
    #the above two lines beginning from xgraph and ending with unix should come on the same line
    NS=/home/Your-User-Name/ns-allinone-2.35/ns-2.35/
    NAM=/home/Your-User-Name/ns-allinone-2.35/nam-1.15/
    PATH=$PATH:$XGRAPH:$NS:$NAM
    NOTE: You must replace "Your-User-Name" in the above PATH settings with the USER-NAME mentioned in your own Computer/System.
    Step 11. Save and close the BASHRC file.
    Type 'ns' in the terminal. If '%' sign appears, it indicates correct ns2 installation. You can also check for NAM window by just typing 'nam' in the terminal.
    Now start working on NS2. Good luck Guys and stay tuned for more updates related to ns2.

ความคิดเห็น • 22

  • @abhishekthakur786
    @abhishekthakur786 ปีที่แล้ว +1

    Helpful video

  • @meherazhamid4545
    @meherazhamid4545 2 ปีที่แล้ว

    I have faced a problem in nam.. It shows segmentation fault. What can i do?

  • @jorgibolonhezi
    @jorgibolonhezi 5 ปีที่แล้ว +1

    works, ty

  • @chitrankusarkar7278
    @chitrankusarkar7278 ปีที่แล้ว

    hello, sir after ./install it's saying no such file or directory

    • @DrRiazKhan
      @DrRiazKhan  ปีที่แล้ว

      Check your path, you should be inside "ns-allinone-2.35" folder... then run the command

    • @chitrankusarkar7278
      @chitrankusarkar7278 ปีที่แล้ว

      @@DrRiazKhan for me it's ns-2.35/.. after getting into that path it's showing same..

    • @DrRiazKhan
      @DrRiazKhan  ปีที่แล้ว

      Come 1 step back in the path...you will find the same path hopefully

  • @chitrankusarkar6337
    @chitrankusarkar6337 ปีที่แล้ว

    Sir, after ns command the % is showing but after nam command it is showing nam: ... Please reply

    • @DrRiazKhan
      @DrRiazKhan  ปีที่แล้ว

      If nam window is appearing then start writing tcl scripts and verify its working. 👍

    • @vinaykulkarni5259
      @vinaykulkarni5259 ปีที่แล้ว

      @@DrRiazKhan nam is not working it is giving segmentation fault

    • @rohitprasad5333
      @rohitprasad5333 10 หลายเดือนก่อน

      @@vinaykulkarni5259 Instead of typing "./install" in the terminal, try typing "sudo ./install" in the terminal.
      Hope it helps!

  • @addisushewandagn5692
    @addisushewandagn5692 3 ปีที่แล้ว

    Hi Dr. Riaz Khan, very helpful tutorial. can u help me for simulation of AODV protocol with black hole attack

  • @advaitthakkar1473
    @advaitthakkar1473 5 ปีที่แล้ว +1

    Hello there, very helpful tutorial, can u help me for simulation of congestion control algorithm for my college project? Thanks n regards

    • @DrRiazKhan
      @DrRiazKhan  5 ปีที่แล้ว +1

      Thanks...
      You send me your problem statement on my email, I will definitly try to help you...

    • @advaitthakkar1473
      @advaitthakkar1473 5 ปีที่แล้ว

      Can u please drop Ur email here

  • @atsbhahagos6586
    @atsbhahagos6586 2 ปีที่แล้ว

    very helpful tutorial i am from Africa could help me performance measuring of AODV and DSR

  • @muhammadzafar2470
    @muhammadzafar2470 3 ปีที่แล้ว

    Can you help me in installation? Please reply

  • @vishalmohanraj4646
    @vishalmohanraj4646 5 ปีที่แล้ว

    Bro after the name how to change the symbol $ to # pleas tell me in terminal

    • @DrRiazKhan
      @DrRiazKhan  5 ปีที่แล้ว

      Type SU
      then it will ask for ROOT PASSWORD, enter your root password and you will get # symbol. Good luck

    • @vishalmohanraj4646
      @vishalmohanraj4646 5 ปีที่แล้ว

      @@DrRiazKhan bro it's not permanent bro tell me for permanent bro and I need to create come virus apk it tells error and sorry to disturb you bro

    • @DrRiazKhan
      @DrRiazKhan  5 ปีที่แล้ว

      Open terminal
      type 'sudo passwd root'
      then it will ask to change the root passwd...
      c
      type a new password
      re enter the new password
      then login with new password
      then you will have permanent root privelege.
      good luck

    • @vishalmohanraj4646
      @vishalmohanraj4646 5 ปีที่แล้ว

      My heart pleasures to you bro