Skip to main content

BEGINNERS TUTORIAL

 In ns2; for analysis and creation of a network we have to do the following procedures;


1. Write OTCL program.
2. Run program in terminal.
3. Analyse trace file using gawk.

1. Write OTCL Program
In ns2 ,we use object oriented tool command language as front end language or simply to write programs to generate a network scenario.One of the reason is that it is simple and easy to code.To know more about ns2 languages,click here. To write an OTCL script, we use editors [notepad] in the linux.

Open gedit
For that go to accessories-> gedit or search gedit on dashhome [For ubundu 12.04]

you will get the following window;
gedit window

Write your tcl script on here. For tcl scripting tutorials, go through following links: Link 1  Link 2

After writing program, save it in .tcl format.[ for ex: dd.tcl ].



After that you can see your program changed like this i.e as multicolored



Now we have to run the tcl scripting................................................................!!!!!!


2. Run program in Terminal
To run the program, open terminal window from accessories->terminal or search on dash home.

You will get the following window;
Terminal window
now you have to run the tcl script, for that you have to change to the directory where the program is located.
For example: In here we are going to run aodv.tcl which is located at folder program. In terminal we have to change to directory where program located.For that use command cd

It can shown as below;


The directory is changed....!!!!!!

Now we have to run the TCL script, for that type ns filename in terminal. For example; ns aodv.tcl



Now simulation starts..........................!!!!!!!



Now simulation started and you can get network animator window,xgraph and trace files [You will get this only depend upon the codes wriiten on TCL script].

3. Analyse trace file using awk scripts
We add it in the later pages. Click here to read.

Click different topics to know more about NS2.


HAPPY HUNTING......................!!!!!!!

Comments

Popular posts from this blog

INTRODUCTION TO NETWORK SIMULATOR 2

  INTRODUCTION  Network Simulator Version 2, widely known as NS2, is an event driven simulation tool that is useful in studying the dynamic nature of communication networks. Simulation of wired as well as wireless network functions and protocols (e.g., routing algorithms, TCP, UDP) can be done using NS2. In general, NS2 provides users with a way of specifying such network protocols and simulating their corresponding behaviors. Due to its flexibility and modular nature, NS2 has gained constant popularity in the networking research community since its birth in 1989. Ever since, several revolutions and revisions have marked the growing maturity of the tool, thanks to substantial contributions from the players in the field. Among these are the University of California and Cornell University who developed the REAL network simulator,1 the foundation which NS is based on. Since 1995 the Defense Advanced Research Projects Agency (DARPA) supported development of NS through the Virtual ...

Matter: A next generation home standard

The smart home is evolving. To date, if you've wanted to get into developing a smart home, you've had to deal with the multitude of smart home ecosystems, and making sure that each device you buy is compatible. That, however, may soon change — thanks to new smart home standard called Matter. Matter isn't available just yet, but when it is finally released, it could completely change how you buy smart home products, for the better. All of the best smart home devices could soon support the standard, helping them all work together nicely, and ensuring that no matter what products you buy, you'll be able to use them. Matter is basically the name of a new smart home connectivity standard . But this standard is a little unlike others. That's because of the fact that it's being developed by the Connectivity Standards Alliance, which counts hundreds of companies as members. That includes the likes of Google, Alexa, and Apple. So, whether you prefer to use Google Assista...

How to turn off package notifications on Alexa

Echo smart speakers and smart displays have a handy feature that can show and tell you when there’s a package sitting on your doorstep and even what’s in it. While this can be helpful most of the time, around the holidays it could seriously ruin some surprises. Avoid making any Grinch-like moves this holiday and manage your Amazon shopping notifications in the Alexa app to help keep the magic alive. Alongside options for tailoring package announcements, the notifications section of the app also has a number of settings you can toggle on or off to help make the voice assistant a little more helpful when it comes to purchases you make on Amazon. Below are a few of the most useful that you might want to tweak this holiday season. Open the Alexa app. Tap on More in the bottom right hand corner. Select Settings > Notifications > Amazon Shopping . Under “Say or Show Item Titles” toggle off “including items in your shopping cart marked as gifts, or those that might be gifts during major...