In this we are going to learn network topology logical working using NS-3 and Wireshark simulator.
This simulator nothing but software model in analogus to hardware working of network.
For. Transmission of Packet over Network node shown in NS-3 GUI window.
To download NS-3 refer below website https://www.nsnam.org/
Step 1.
sudo apt update
Step 2. After fetching latest package install it command is
sudo apt install
Step 3. After installation upgrade Ubuntu command is
sudo apt upgrade
Step 4. To Install C++ complier in Ubuntu then follows following command
sudo apt-get install build-essential
Step 5: To install Python compiler use following command sudo apt-get install python python-dev
Step 6: To install Mercurial means animation and NS3 supported package use following commands
sudo apt-get install mercurial
Step 7: To unzip file install supported package command is
sudo apt-get install bzr
Step 8: to install TCPDUMP for pcap trace file reading support use following command
sudo apt-get install tcpdump
Step 9: to Generate XML supported file to be readble file external simulator API use the following command
sudo apt-get install libxml2 libxml2-dev
Step 10: Unzip the NS3 package we have command
tar xjf ns-allinone3.32.tar.bz2
Step 11: To compile all the package in ns-3.32 execute following command
./waf configure --enable-examples –enable-tests
Step 12: To run our simulator then every classess must be compile. Use the following command
./waf –-run hello-simulator
After executing above commands then output will “ Hello Simulator” then assume that all NS3 API are in executable code of Operating System.
$
$
$
$
$ cd
mkdir workspace cd workspace
wget https://www.nsnam.org/release/ns-allinone-3.32.tar.bz2
tar xjf ns-allinone-3.32.tar.bz2
Notice the use above of the wget utility, which is a command-line tool to fetch objects from the web; if you do not
have this installed, you can use a browser for this step.
Following these steps, if you change into the directory ns-allinone-3.32, you should see a number of files and
directories
$ cd ns-allinone-3.32
$ ls
bake constants.py
build.py netanim-3.108 ns-3.32
pybindgen-0.21.0 README
util.py
You are now ready to build the base ns-3 distribution and may skip ahead to the section on building ns-3.
Now go ahead and switch back to the debug build that includes the examples and tests.
$ ./waf clean
to compile all API classes use following commands
$ ./waf configure --build-profile=debug --enable-examples –enable-tests
if you don’t see the “Hello Simulator” output, type the following:
$ ./waf configure --build-profile=debug --enable-examples –enable-tests
and ten type command
./waf configure –enables-examples
and
./waf --run hello-simulator