International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 113 - Number 16 |
Year of Publication: 2015 |
Authors: Genita Gautam, Biswaraj Sen |
10.5120/19910-2018 |
Genita Gautam, Biswaraj Sen . Design and Simulation of Wireless Sensor Network in NS2. International Journal of Computer Applications. 113, 16 ( March 2015), 14-16. DOI=10.5120/19910-2018
This paper provides a study of how to design and implement Wireless Sensor Network (WSN) in NS2 (Network Simulator version 2). A wireless sensor network (WSN) consists of a number of sensors which are spatially distributed and are capable of computing, communicating and sensing. NS2 is an event-driven simulation tool that is useful in studying the dynamic nature of computer networks. NS2 provides users with executable command ns which take on input argument, which is the name of a Tool Command Language (TCL) simulation scripting file. Network Animator (NAM) is a TCL based animation tool for viewing network simulation traces and real world packet traces. Scripting languages such as AWK (Aho Weinberger Kernighan) script and PERL script can be used to calculate the performance metrics using these trace files. A simple simulation consisting of 17 nodes and calculation of average end-to-end delay and average energy consumption is shown.