Hi All, Our website moved to a new URL. Please bookmark the new link: https://ns2bloggers.blogspot.com/

Wednesday 13 October 2021

NS2 INSTALLATION IN WINDOWS 10 & WINDOWS 11 USING WSL

 Hey All, this post explains how to install NS2 easily using Windows OS using Windows Subsystem for Linux.  Before starting the topic, lets talk a little about WSL oe Windows Subsystem for Linux.

Windows Subsystem for Linux

The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dual-boot setup.

Step 1:  Turn on developer mode

Search > Developer Settings > Turn on Developer mode

Step 2: Download Ubuntu from Store

Go to Microsoft Store and Download Ubuntu.




Step 3: Download and Install Xming
 
Click here for downloading Xming.

Step 4: Install Ubuntu

Set Username and Password for ubuntu.

If you get an error in installing ubuntu, Ws1RegistrationDistributuin failed with error: 0x8007019e
It mans the windows subsystem for Linux optional component is not enabled. 
So Turn on windows features -> windows subsystem for Linux



It may take few minutes and reboot the system once installation completed.


Step 5: Updating Ubuntu OS and NS2 Installation

After reboot and Ubuntu installation, Type following commands in terminal ;
  • sudo apt update
  • sudo apt-get install ns2
  • sudo apt-get install nam
  • sudo apt-get install gedit
  • sudo apt install tcl
Step 6: Directory Change

Change your directory of ubuntu
  • cd/mnt/OS Drive Name/Users/UserProfile/Desktop
  • cd folder_name_in_Desktop
  • In the first screen, select → Full Screen
  • In the second screen, select → Start no client
  • Rest of the screens just click on next and finish the config setup
  • The window closes and it's done
Make sure server is running.

  • Type export DISPLAY=0:0 in Ubuntu
  •  gedit filename.tcl (Xming application will be opened where you can type your program, save it, and close)
  • ns filename.tcl
The Network Simulator will be opened.

No comments :

Post a Comment