How to Start ODMRP Protocol Projects using OMNeT++

To stimulate the ODMRP (On-Demand Multicast Routing Protocol) is a multicast routing protocol precise the model for mobile ad-hoc networks (MANETs). It is a reactive (on-demand) protocol, meaning it only create a route after there is a require for data transfer. The protocol generates and handles the multicast trees dynamically, using a “flooding” method to discover the multicast routes.

In OMNeT++, we can estimate or replicate the ODMRP through leveraging the previous modules or via execution the protocol from the scratch. OMNeT++ has a framework called INET, that delicers the help for routing protocols in MANETs, nevertheless ODMRP isn’t section of INET with default. However, we can either the encompass for INET’s functionality or execution ODMRP from the ground up.

Here’s a step-by-step guide to get started with ODMRP in OMNeT++:

Steps to Start ODMRP Protocol Projects using OMNeT++

  1. Set Up OMNeT++ and INET Framework

Install OMNeT++:

  • Download and install OMNeT++ from the official website.
  • Monitor the installation procedures are according to your operating system such as Linux, macOS, Windows.

Install INET Framework:

  • The INET framework is generally used in OMNeT++ for replicating the networking protocols and devices, has includes the routing protocols such as AODV, OLSR, and more.
  • Download the INET framework from the INET GitHub repository.
  • Create the framework inside OMNeT++ IDE.
  1. Understand ODMRP Protocol

ODMRP is a reactive multicast routing protocol that works as follows:

  • Route Discovery: When a source needs to transfer a multicast packet, it forwards a route request (RREQ) to neighbouring nodes. This RREQ is flooded by the network until it reaches the multicast group members.
  • Route Maintenance: After a route is established, the source transfers the multicast data packets along the route. The node in a route forward packets using the multicast tree.
  • Multicast Tree: ODMRP creates a source-based tree for multicast group communication. Nodes perform as forwarding nodes in the multicast tree.

Main Components of ODMRP:

  • RREQ (Route Request): Used to discover paths for multicast data delivery.
  • RREP (Route Reply): Forwarding through the destination or a node with an active path back to the source.
  • Multicast Data Packet: When the route is created, multicast data is transfer along the path.
  • Forwarding Nodes: Nodes that are section for the multicast route and supports in the forwarding multicast data.
  1. Create a New OMNeT++ Project
  1. Open OMNeT++ IDE and build a new project:
    • Go to File > New > OMNeT++ Project.
    • Name the project something like ODMRP_Simulation.
  2. Link to INET:
    • Right-click on the project and go to Properties > Project References.
    • Enable the INET is selected as a reference.
  1. Design the Network Topology

The NED file defines the network’s layout, has includes the nodes, links, and interconnections. We will build a model the mobile nodes and on how they interact designed for multicast.

Example of a Basic Network Topology:

network ODMRPNetwork {

submodules:

node1: WirelessHost {

@display(“p=100,100”);

}

node2: WirelessHost {

@display(“p=200,100”);

}

node3: WirelessHost {

@display(“p=300,100”);

}

node4: WirelessHost {

@display(“p=400,100”);

}

node5: WirelessHost {

@display(“p=500,100”);

}

connections allowunconnected:

node1.wlan[0].pppg++ <–> node2.wlan[0].pppg++;

node2.wlan[0].pppg++ <–> node3.wlan[0].pppg++;

node3.wlan[0].pppg++ <–> node4.wlan[0].pppg++;

node4.wlan[0].pppg++ <–> node5.wlan[0].pppg++;

}

This describe a simple network through 5 mobile nodes, which every node is connected via wireless links. We can extend this topology depending on your scenario such as adding mobility.

  1. Create ODMRP Protocol

ODMRP is not executed through default in INET, we will necessary for develop a custom module for it. Here’s how on we can start implementing the protocol in OMNeT++.

Steps to Implement ODMRP:

  1. Create the Module for ODMRP:
    • We require a modify module to execute the behaviour of Route Request (RREQ), Route Reply (RREP), and multicast data forwarding. This can be complete the cSimpleModule in OMNeT++.

Example class for implementing ODMRP:

class ODMRP : public cSimpleModule {

private:

cMessage *rreqTimeout;

cMessage *rrepTimeout;

std::vector<int> multicastGroupMembers;  // List of multicast group members

int sourceNode;  // Source node sending multicast data

protected:

virtual void initialize() override {

rreqTimeout = new cMessage(“RREQTimeout”);

rrepTimeout = new cMessage(“RREPTimeout”);

sourceNode = -1;  // Indicating no source node initially

virtual void handleMessage(cMessage *msg) override {

if (msg == rreqTimeout) {

// Handle RREQ timeout (retransmit or stop if no RREP received)

}

else if (msg == rrepTimeout) {

// Handle RREP timeout (multicast route setup failure)

}

else {

// Process incoming multicast data or control messages (RREQ/RREP)

if (msg->getKind() == RREQ) {

handleRREQ(msg);

}

else if (msg->getKind() == RREP) {

handleRREP(msg);

}

else {

// Handle multicast data forwarding

}

}

}

void handleRREQ(cMessage *msg) {

// Process Route Request (RREQ) message

// Check if this node is part of the multicast group

// If yes, send a RREP, else forward the RREQ

}

 

void handleRREP(cMessage *msg) {

// Process Route Reply (RREP) message

// Establish the forwarding path for multicast

}

};

  1. Create the Necessary Messages: ODMRP needs a precise message for RREQ and RREP. We can describe the alter message file for sample ODMRPMessage_m.h.

Example message definitions:

message ODMRPRREQ {

int sourceNode;

int destinationNode;

int hopCount;

string path;  // List of nodes in the path

}

message ODMRPRREP {

int sourceNode;

int destinationNode;

string path;

}

  1. Routing Logic:
    • Route Discovery (RREQ): After the source needs to forwarding the data, it transfers a RREQ to neighbours. If the neighbours have a route to the destination, they transfer a RREP back to the source.
    • Multicast Data Forwarding: After the route is setting, multicast data is transfer with the route. Intermediate nodes are sending the data according to the multicast tree.
  2. Forwarding Nodes and Multicast Tree: As section for the ODMRP logic, intermediate nodes will develop a transmit nodes when they are on the multicast path. We necessity to handle a forwarding table that follow for this node and their responsibilities in forwarding multicast packets.
  1. Configure the Simulation in omnetpp.ini

We will essential to setting a behaviour of your ODMRP execution in the omnetpp.ini file. It includes the configuration of parameters for routing behaviour, packet generation, and node mobility.

Example configuration:

[General]

network = ODMRPNetwork

sim-time-limit = 100s

# Enable ODMRP Protocol for the nodes

*.node1.applicationProtocol = “ODMRP”

*.node2.applicationProtocol = “ODMRP”

*.node3.applicationProtocol = “ODMRP”

*.node4.applicationProtocol = “ODMRP”

*.node5.applicationProtocol = “ODMRP”

# Set multicast group members

*.node1.multicastGroupMembers = “node2, node3, node4”

  1. Run the Simulation and Debug
  1. Run the simulation from the OMNeT++ IDE.
  2. Used the Tkenv graphical interface we display the nodes, routes, and packet flows.
  3. Ensure the logging for debugging:

*.node1.debug = true

*.node2.debug = true

*.node3.debug = true

We can track the flooding of RREQs, RREPs, and the real multicast data being forwarded.

  1. Analyze the Results

Next the process for replication, use the outcomes for OMNeT++’s result analysis tools to show the statistics like as:

  • Packet delivery ratio.
  • Multicast route setting delay.
  • Hop count for multicast delivery.
  1. Extend the Project

We can improve the encompass this project by:

  • Executing the node mobility.
  • Validating the various network densities.
  • Enhance the further protocols such as AODV, OLSR for combination through ODMRP.

Finally, we had successfully delivered the significant procedures to simulate the ODMRP Protocol in OMNeT++ tool and also, we deliver the sample snippets and their explanation. Additional information about On-Demand Multicast Routing Protocol will be shared in upcoming manual.

Our support team is committed to providing you with a prompt response. To initiate your ODMRP Protocol Projects utilizing OMNeT++, we will offer you customized assistance. Please reach out to us at phdprojects.org by sending your details via email. We are well-equipped to manage reactive (on-demand) protocols. For a seamless experience, do not hesitate to contact us.