How to install ns3 in Windows 10 | Windows Subsystem for Linux

preview_player
Показать описание
This post shows how to install ns-3.33 in Windows 10 through WSL (Windows Subsystem for Linux)
This post will work for ns-3.3x version.
Prerequisites:
Install Windows Subsystem for Linux with GUI: Please refer the following video

System Information:
OS used: Windows 10 and WSL (Ubuntu 20.04)
GUI: XServer for Windows
NS3 Version: ns-3.33

Step 0 : Open XLaunch
Step 1 : Open WSL using PowerShell and open it as Administrator

Command:/ wsl
$ xfce4-session

The GUI of Ubuntu Opens within Windows 10 OS.

Step 3: Open a Terminal
$ sudo apt update
$ sudo apt install build-essential autoconf automake libxmu-dev python3-pygraphviz cvs mercurial bzr git cmake p7zip-full python3-matplotlib python-tk python3-dev qt5-qmake qt5-default gnuplot-x11 wireshark

Step 4: Move the ns3 file from Downloads/ folder to Home folder (/home/pradeepkumar) and unzip it there itself, Right Click -- Extract Here

Step 5: Go to the terminal that is already open and issue the following commands

$ cd
$ cd ns-allinone-3.33/
It might take 10 to 20 minutes for installing, may be in between there might be errors as well.

Once the installation over, check for the following command for the working of ns3.

$ cd ns-3.33
$ ./waf --run hello-simulator

$ ./waf --run scratch/first
You should get 4 lines of output between the client and server interaction

Then you can try for NetAnim as well as per the video.
#include "ns3/netanim-module.h"

and the following line above the Simulator::Run() function

After the above changes, compile the file again using

$ ./waf --run scratch/first
Open a new Terminal
$ cd ns-allinone-3.33/netanim-3.108/
$./NetAnim

Thanks are watching and please subscribe to my channel and share it to your friends....
Рекомендации по теме
Комментарии
Автор

qt.qpa.xcb: could not connect to display

This error is coming on ./NetAnim
What can i do?

nitigya
Автор

sir i cannot run xfce4-session. Kindly help

furqanali
Автор

erro, help

Command 'xfce4-session' not found, but can be installed with:

daliagomes
Автор

how did he access linux desktop from bash? i'm stuck on that :(

eugenecaio
Автор

sir i have question how i can implement a data base of all attack signature in ns3
and detect them using ids

minyonminyoun
Автор

Sir, I am not able to run command "xfce4-session". Whenever I do so, it shows "segmentation fault" and an ubuntu notification also pops up saying "unable to contact setting server". Please help me how to resolve this?

gunjanbharti
Автор

hello, i am at step2 and encountered this error Package 'qt5-default' has no installation candidate. could anyone help?

yosrm
Автор

Sir, I am having an error at the time of installing ns3. it is "Error: run waf-light from a folder containing waflib". I followed the steps you said. Please help me.

deepa
Автор

This video is very helpful ...but my problem is while running the ./waf command in ns 3.36.1, it says not in directory.... please help me on this. It would be helpful for me

Travellife
Автор

@Engineering Clinic. My first.cc functions. But after adding AnimationInterface it does not work. It gives error : undefined reference to What should I do?

ddwatcher
Автор

sir. In which location of Win10, the ubuntu will be installed. in which location NS2/ns3 will be installed?

venkatasubramaniansrinivas
Автор

Sir at 8:30 what button your are pressing after inserting AnimationInterface. Please help sir

venkateshr
Автор

where location .waf, because can't found file waf in the ns-3.33 folder

kotabaru
Автор

I have a problem when run NetAnim, it doesn't work, anyone can help please?

andriksupa
Автор

Sir how to connect sumo and ns3 offline? To create trace file?
If yes? Then how any .cc file we can run by this creating trace file?
Please reply

anjanabhadra
Автор

can I install both the ns-3 and the FLoRa together on my laptop?

kawtherhamad
Автор

Thank u it is work, but when I install sumo or other software in wsl , I can't do nothing . And the only way is to restart the xlaunch

omraniomaima
Автор

Sir can you please share link of explanation of first.cc

venkateshr
Автор

Sir, Thank you for good explanation.
I tried to modified my code, I want to set the energy to each node randomly or differently.
Is there any way?

matatahakuna
Автор

Hi Sir, I could not open ubuntu now through windows Powershell. It says "Unable to init server: Could not connect: Connection refused".Please help me sir

srividhya