Difference between revisions of "Ns-3-Network-Simulator/C2/Installation-of-Network-simulator-3/English"
(Created page with " {| border="1" |- || '''Visual Cue''' || '''Narration''' |- || '''Slide:1''' '''Title slide''' || Welcome to Spoken tutorial on Installation of '''Network Simulator-3.''' |- s...") |
|||
Line 8: | Line 8: | ||
'''Title slide''' | '''Title slide''' | ||
|| Welcome to Spoken tutorial on Installation of '''Network Simulator-3.''' | || Welcome to Spoken tutorial on Installation of '''Network Simulator-3.''' | ||
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''Learning Objectives''' | |
|| In this tutorial, we will learn | || In this tutorial, we will learn | ||
− | * | + | * What is ns-3? |
− | * | + | * How to install the required packages and the '''ns-3 '''software? |
− | * | + | * Features of ns-3 |
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''System Requirements''' | |
|| To record this tutorial, I am using | || To record this tutorial, I am using | ||
− | * | + | * Ubuntu Linux OS version 22.04 |
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''Installation Requirements''' | |
− | || | + | || For the installation of ns-3 software, |
− | * | + | * A working internet connection is required |
− | * | + | * You need to have root permissions |
− | * | + | * You should know how to choose a repository |
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''Code Files''' | |
|| | || | ||
− | * | + | * The files used in this tutorial are provided in the '''Code files''' link. |
− | * | + | * Please download and extract the files. |
− | * | + | * Make a copy and then use them while practicing. |
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''What is ns-3?''' | |
− | || | + | || '''ns-3 '''stands for '''Network Simulator-3.''' |
− | + | It is used for network simulation and modeling. | |
− | + | It allows us to simulate and study the behavior of various network protocols. | |
− | + | To learn more about it, please visit this website | |
− | <div style="color:#3366bb;">https://www.nsnam.org/ | + | <div style="color:#3366bb;">https://www.nsnam.org/ |
− | |- | + | |- |
− | || | + | || Open '''Terminal Window''' |
− | |||
− | |||
− | |||
− | + | Type''' sudo apt update''' | |
+ | || Now let us open the terminal window by pressing '''Ctrl, Alt and T keys''' together. | ||
− | + | Now type '''sudo apt update ''' and press '''Enter.''' | |
− | + | Enter the '''password''' of your ''' root directory''' and then '''press Enter.''' | |
− | + | ||
− | + | ||
− | + | This will update the system. | |
+ | |- | ||
+ | || Open''' terminal window''' | ||
− | + | Type''' cd Downloads ''' | |
− | + | || Now, we need to '''install '''the required packages for the installation. | |
− | + | For that, download the '''packages.txt''' that is available in the code files section. | |
− | + | ||
− | + | It contains the list of necessary''' packages ''' to be downloaded. | |
− | + | I have already downloaded it in my '''Downloads''' folder. | |
− | + | Go to the '''Downloads''' directory by typing '''cd space Downloads.''' | |
− | + | You can choose the path where the '''packages.txt''' file is downloaded. | |
+ | |- | ||
+ | || Type '''xargs -a packages.txt sudo apt-get install''' | ||
+ | || Now type '''xargs space -a space packages.txt space sudo space apt-get space install''' | ||
− | + | Through this command, we could install the necessary packages. | |
− | + | ||
− | + | ||
− | + | ||
− | + | If the Package configuration window appears, '''select''' '''No '''by pressing the '''Enter key.''' | |
+ | |- | ||
+ | || Open '''browser ''' | ||
− | |||
− | |||
− | |||
− | |||
− | + | Type [https://www.nsnam.org/releases/ https://www.nsnam.org/releases/] | |
− | || | + | || Now, to proceed with installation, let us open the''' browser.''' |
− | + | Then type this link in the address bar. | |
[https://www.nsnam.org/releases/ https://www.nsnam.org/releases/] | [https://www.nsnam.org/releases/ https://www.nsnam.org/releases/] | ||
− | |- | + | |- |
|| [https://www.nsnam.org/releases/ns-allinone-3.38.tar.bz2 https://www.nsnam.org/releases/ns-allinone-3.38.tar.bz2] | || [https://www.nsnam.org/releases/ns-allinone-3.38.tar.bz2 https://www.nsnam.org/releases/ns-allinone-3.38.tar.bz2] | ||
− | + | Click on '''Save '''button on the dialog box. | |
− | + | Open a new terminal window | |
− | + | Type '''cd Downloads''' | |
'''Right click''' on the downloaded folder | '''Right click''' on the downloaded folder | ||
− | || | + | || We can see the releases of '''ns-3''' so far. |
− | + | For this series, let us install '''ns-3.38. | |
+ | ''' | ||
+ | For that, let us click on '''ns-3.38''' in the left pane. | ||
− | + | Then click on '''this link '''under''' Download.''' | |
− | + | If the '''Save confirmation '''dialog box appears, click on the''' Save button'''. | |
− | + | ||
− | + | ||
The file gets downloaded in the '''Downloads '''directory. | The file gets downloaded in the '''Downloads '''directory. | ||
− | |- | + | |- |
|| '''Click''' on '''move to''' option | || '''Click''' on '''move to''' option | ||
'''Click''' on '''Home '''in the left pane | '''Click''' on '''Home '''in the left pane | ||
− | + | '''Right click''' on the '''folder''' | |
− | + | select the '''Extract here '''option | |
− | || | + | || For convenience, please move the downloaded file to the '''Home directory.''' |
− | |||
− | |||
− | + | After moving, now let us unzip the''' dot tar''' '''file'''. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | For that '''Right click''' on the '''folder''' and select the '''Extract here option.''' | |
− | || | + | |- |
+ | || Only narration | ||
+ | || After extracting, now, let us open the unzipped folder using the terminal. | ||
+ | |- | ||
+ | || '''Open a new terminal ''' | ||
− | + | Type''' cd ns-allinone-3.38''' | |
+ | || Let us open a new terminal window. | ||
− | + | Now, we shall move into the '''ns-3''' folder. | |
− | + | ||
− | + | ||
− | + | ||
− | + | For that, type the command '''cd space ns-allinone-3.38 ''' and press''' Enter.''' | |
− | |- | + | |- |
− | || | + | || Type '''./build.py ''' |
+ | || Let us build the extracted files now so that it is ready for use. | ||
− | + | Type, '''./build.py ''' and press '''Enter.''' | |
+ | |- | ||
+ | || Type '''hg clone [http://code.nsnam.org/netanim http://code.nsnam.org/netanim] | ||
− | + | Type '''cd netanim''' | |
− | + | Type '''qmake NetAnim.pro''' | |
− | + | ||
− | + | Type '''make''' | |
+ | || The default '''NetAnim''' package available is not compatible with the wifi networks. | ||
− | + | So, let us install a '''NetAnim''' version that is compatible. | |
− | + | Please remember to press '''Enter''' key after typing every command. | |
− | + | Let us do it through the following commands. | |
− | + | Type the command''' sudo space apt space install space mercurial''' | |
− | + | Enter the '''password''' of your''' root directory''' and then '''press Enter.''' | |
− | + | Then type''' hg space clone space [http://code.nsnam.org/netanim http://code.nsnam.org/netanim] | |
− | + | Enter the '''password''' of your''' root directory''' and then '''press Enter.''' | |
− | + | After a while, you would be asked for confirmation to continue. | |
− | + | Please type '''Y '''so that we can continue. | |
− | + | After this command is executed, let us build the files so that it is ready for use. | |
− | + | For that, type '''cd space netanim''' | |
− | + | Then type, '''qmake space NetAnim.pro''' | |
− | + | Now, type '''make''' | |
− | + | After the successful execution of this command, '''netanim''' is ready for use. | |
− | + | ||
− | + | |- | |
+ | || Go to a new terminal window | ||
− | + | Type''' cd ns-allinone-3.38/ns-3.38''' | |
− | + | Press''' Enter''' | |
− | + | ||
− | + | Type '''./ns3 run hello-simulator''' | |
+ | || Let us get into the required folder to simulate the default '''Scratch''' '''simulator program''' . | ||
− | + | Open a new terminal window. | |
− | + | Type '''cd space ns-allinone-3.38/ns-3.38 '''and press '''Enter. ''' | |
− | + | Then type, '''./ns3 space run space scratch/scratch-simulator.cc '''and press '''Enter.''' | |
− | + | We get the output as '''Scratch Simulator.''' | |
− | + | This is the '''compilation result '''of the '''Scratch''' '''simulator program''' . | |
+ | |||
+ | Our installation has been successful. | ||
|- | |- | ||
− | + | ||
− | || | + | || Show Slide: |
− | + | '''Features of ns-3''' | |
− | || | + | || Let us see the features of '''ns-3'''. |
− | * | + | * '''ns-3''' is used for research and education. |
+ | * The ns-3 simulation core supports research on '''IP''' and '''non-IP''' based networks. | ||
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''Features of ns-3''' | |
|| | || | ||
− | * | + | * It simulates wireless/IP with''' Wi-Fi, WiMAX, LTE''' '''models''' for layers 1-3. |
− | * | + | * Several external '''animators''' and '''data analysis tools''' can be used with ns-3. |
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''Features of ns-3''' | |
|| | || | ||
− | * | + | * ns-3 works with '''command line''' and '''C++ '''and/or '''Python''' software development tools. |
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''Summary''' | |
|| This brings us to the end of this tutorial. | || This brings us to the end of this tutorial. | ||
Let us summarize. | Let us summarize. | ||
− | In this tutorial, we have learnt | + | In this tutorial, we have learnt: |
− | * | + | * What is ns-3? |
− | * | + | * How to install the required packages and the '''ns-3 '''software? |
− | * | + | * Features of ns-3 |
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''About Spoken Tutorial Project''' | |
− | || | + | || The video at the following link summarizes the Spoken Tutorial Project. |
− | + | Please download and watch it. | |
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''Spoken Tutorial Workshops''' | |
− | || | + | || The '''Spoken Tutorial Project''' team conducts workshops and gives certificates. |
− | + | For more details, please write to us. | |
− | |- | + | |- |
|| Show Slide: | || Show Slide: | ||
'''Answers for THIS Spoken Tutorial''' | '''Answers for THIS Spoken Tutorial''' | ||
− | || | + | || Do you have questions in THIS Spoken Tutorial? |
− | + | Please visit this website. | |
− | + | Choose the minute and second where you have the question. | |
− | + | Explain your question briefly. | |
− | + | The Spoken Tutorial project will ensure an answer. | |
− | + | You will have to register to ask questions. | |
|- | |- | ||
− | | | + | || '''Slide : Forum for specific questions''' |
− | | | + | || The Spoken Tutorial forum is for specific questions on this tutorial. |
− | + | Please do not post unrelated and general questions on them. | |
− | + | This will help reduce the clutter. | |
− | + | With less clutter, we can use these discussions as instructional material. | |
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''FOSSEE Forum''' | |
− | || | + | || For any general or technical questions on ns-3, visit the ''' FOSSEE forum''' and post your question. |
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''Acknowledgement''' | |
− | || | + | || '''Spoken Tutorial''' Project was established by the '''Ministry of Education, Government of India'''. |
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''Acknowledgement''' | |
− | || | + | || We thank '''Dr. Moyukh Laha''' from '''IIT Kharagpur''' for his domain support. |
− | + | We would also like to thank '''Dr. R. Radha, Dr. X. Anita, and Dr. T. Subbulakshmi ''' from ''' VIT Chennai '''for their support. | |
− | |- | + | |- |
− | || | + | || Show Slide: |
− | + | '''Thank you''' | |
− | || | + | || This is '''Arun Santhosh,''' a FOSSEE Summer Fellow, IIT Bombay signing off. |
− | + | Thank you for joining. | |
|- | |- | ||
|} | |} |
Latest revision as of 13:41, 24 January 2024
Visual Cue | Narration |
Slide:1
Title slide |
Welcome to Spoken tutorial on Installation of Network Simulator-3. |
Show Slide:
Learning Objectives |
In this tutorial, we will learn
|
Show Slide:
System Requirements |
To record this tutorial, I am using
|
Show Slide:
Installation Requirements |
For the installation of ns-3 software,
|
Show Slide:
Code Files |
|
Show Slide:
What is ns-3? |
ns-3 stands for Network Simulator-3.
It is used for network simulation and modeling. It allows us to simulate and study the behavior of various network protocols. To learn more about it, please visit this website |
Open Terminal Window
Type sudo apt update |
Now let us open the terminal window by pressing Ctrl, Alt and T keys together.
Now type sudo apt update and press Enter. Enter the password of your root directory and then press Enter. This will update the system. |
Open terminal window
Type cd Downloads |
Now, we need to install the required packages for the installation.
For that, download the packages.txt that is available in the code files section. It contains the list of necessary packages to be downloaded. I have already downloaded it in my Downloads folder. Go to the Downloads directory by typing cd space Downloads. You can choose the path where the packages.txt file is downloaded. |
Type xargs -a packages.txt sudo apt-get install | Now type xargs space -a space packages.txt space sudo space apt-get space install
Through this command, we could install the necessary packages. If the Package configuration window appears, select No by pressing the Enter key. |
Open browser
|
Now, to proceed with installation, let us open the browser.
Then type this link in the address bar. |
https://www.nsnam.org/releases/ns-allinone-3.38.tar.bz2
Click on Save button on the dialog box. Open a new terminal window Type cd Downloads Right click on the downloaded folder |
We can see the releases of ns-3 so far.
For this series, let us install ns-3.38. For that, let us click on ns-3.38 in the left pane. Then click on this link under Download. If the Save confirmation dialog box appears, click on the Save button. The file gets downloaded in the Downloads directory. |
Click on move to option
Click on Home in the left pane Right click on the folder select the Extract here option |
For convenience, please move the downloaded file to the Home directory.
After moving, now let us unzip the dot tar file. For that Right click on the folder and select the Extract here option. |
Only narration | After extracting, now, let us open the unzipped folder using the terminal. |
Open a new terminal
Type cd ns-allinone-3.38 |
Let us open a new terminal window.
Now, we shall move into the ns-3 folder. For that, type the command cd space ns-allinone-3.38 and press Enter. |
Type ./build.py | Let us build the extracted files now so that it is ready for use.
Type, ./build.py and press Enter. |
Type hg clone http://code.nsnam.org/netanim
Type cd netanim Type qmake NetAnim.pro Type make |
The default NetAnim package available is not compatible with the wifi networks.
So, let us install a NetAnim version that is compatible. Please remember to press Enter key after typing every command. Let us do it through the following commands. Type the command sudo space apt space install space mercurial Enter the password of your root directory and then press Enter. Then type hg space clone space http://code.nsnam.org/netanim Enter the password of your root directory and then press Enter. After a while, you would be asked for confirmation to continue. Please type Y so that we can continue. After this command is executed, let us build the files so that it is ready for use. For that, type cd space netanim Then type, qmake space NetAnim.pro Now, type make After the successful execution of this command, netanim is ready for use. |
Go to a new terminal window
Type cd ns-allinone-3.38/ns-3.38 Press Enter Type ./ns3 run hello-simulator |
Let us get into the required folder to simulate the default Scratch simulator program .
Open a new terminal window. Type cd space ns-allinone-3.38/ns-3.38 and press Enter. Then type, ./ns3 space run space scratch/scratch-simulator.cc and press Enter. We get the output as Scratch Simulator. This is the compilation result of the Scratch simulator program . Our installation has been successful. |
Show Slide:
Features of ns-3 |
Let us see the features of ns-3.
|
Show Slide:
Features of ns-3 |
|
Show Slide:
Features of ns-3 |
|
Show Slide:
Summary |
This brings us to the end of this tutorial.
Let us summarize. In this tutorial, we have learnt:
|
Show Slide:
About Spoken Tutorial Project |
The video at the following link summarizes the Spoken Tutorial Project.
Please download and watch it. |
Show Slide:
Spoken Tutorial Workshops |
The Spoken Tutorial Project team conducts workshops and gives certificates.
For more details, please write to us. |
Show Slide:
Answers for THIS Spoken Tutorial |
Do you have questions in THIS Spoken Tutorial?
Please visit this website. Choose the minute and second where you have the question. Explain your question briefly. The Spoken Tutorial project will ensure an answer. You will have to register to ask questions. |
Slide : Forum for specific questions | The Spoken Tutorial forum is for specific questions on this tutorial.
Please do not post unrelated and general questions on them. This will help reduce the clutter. With less clutter, we can use these discussions as instructional material. |
Show Slide:
FOSSEE Forum |
For any general or technical questions on ns-3, visit the FOSSEE forum and post your question. |
Show Slide:
Acknowledgement |
Spoken Tutorial Project was established by the Ministry of Education, Government of India. |
Show Slide:
Acknowledgement |
We thank Dr. Moyukh Laha from IIT Kharagpur for his domain support.
We would also like to thank Dr. R. Radha, Dr. X. Anita, and Dr. T. Subbulakshmi from VIT Chennai for their support. |
Show Slide:
Thank you |
This is Arun Santhosh, a FOSSEE Summer Fellow, IIT Bombay signing off.
Thank you for joining. |