Skip to main content

Posts

Multicast Routing in NS2 | NS2 Basics | Lecture 10

Multicast Routing in NS2 In this post, the learners may learn to create a source file to run a multicast protocol to know various multicast protocols supported in NS2 11. 1 Introduction Multicast routing in NS2 can be easily set using any of the following syntaxes Method 1: set ns [new Simulator -multicast on] Method 2:         set ns [new Simulator]         $ns multicast When multicast mode is enabled, the nodes behave differently with the additional classifiers created. A distribution tree kind of structure is created in the simulation when dealing with multicast routing.  NS supports three types of multicast routing: Centralized Multicast Routing(CM), Dense Mode (DM), Shared Tree Mode (ST) and Bidirectional Shared Tree Support (BST). Here is the method to specify the multicast routing in NS. set cmc [$ns mrtproto CtrMcast]    # specify centralized multicast for all nodes; # cmc is the handl...

Sensor Network Simulation using NS2 | NS2 Basics | Lecture 9

Introduction to Sensor Networks in NS2 In this post The readers learn about  Sensor networks in brief Wireless Sensor flooding protocol Creating a wireless sensor cluster for flat and hierarchical topology using Mannasim framework. Creating a new scenario for generating a flat topology or a hierarchical topology 9.1 Introduction to Sensor Networks A wireless sensor network consists of nodes with limited energy, memory, bandwidth, computing power and sensing capabilities. Sensor nodes consist of a small processor to handle the events, a group of sensors, a transmitter/receiver, and a small battery with limited energy and in some nodes, an operating system to handle the tasking. TinyOS is one of the common operating systems for miniature sensor networks.  Like ad hoc networks, sensor networks also have a set of protocols for low energy, clustering, MAC level, etc. Usually, most of the routing protocols of sensor networks are designed mainly to optimise the power in order to impr...