Difference between revisions of "Ns-3-Network-Simulator/C2/Installation-of-Network-simulator-3/English"

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

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/

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/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.
  • 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.

Let us summarize.

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:

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.

Contributors and Content Editors

Madhurig, Nirmala Venkat

Retrieved from "https://script.spoken-tutorial.org/index.php?title=Ns-3-Network-Simulator/C2/Installation-of-Network-simulator-3/English&oldid=56469"