e-mail address: omnetmanual@gmail.com

Phone number: +91 9444856435

Tel 7639361621

DEFENDER
  • Phd Omnet++ Projects
    • RESEARCH PROJECTS IN OMNET++
  • Network Simulator Research Papers
    • Omnet++ Thesis
    • Phd Omnet++ Projects
    • MS Omnet++ Projects
    • M.Tech Omnet++ Projects
    • Latest Omnet++ Projects
    • 2016 Omnet++ Projects
    • 2015 Omnet++ Projects
  • OMNET INSTALLATION
    • 4G LTE INSTALLATION
    • CASTALIA INSTALLATION
    • INET FRAMEWORK INSTALLATION
    • INETMANET INSTALLATION
    • JDK INSTALLATION
    • LTE INSTALLATION
    • MIXIM INSTALLATION
    • Os3 INSTALLATION
    • SUMO INSTALLATION
    • VEINS INSTALLATION
  • Latest Omnet++ Projects
    • AODV OMNET++ SOURCE CODE
    • VEINS OMNETPP
    • Network Attacks in OMNeT++
    • NETWORK SECURITY OMNET++ PROJECTS
    • Omnet++ Framework Tutorial
      • Network Simulator Research Papers
      • OMNET++ AD-HOC SIMULATION
      • OmneT++ Bandwidth
      • OMNET++ BLUETOOTH PROJECTS
      • OMNET++ CODE WSN
      • OMNET++ LTE MODULE
      • OMNET++ MESH NETWORK PROJECTS
      • OMNET++ MIXIM MANUAL
  • OMNeT++ Projects
    • OMNeT++ OS3 Manual
    • OMNET++ NETWORK PROJECTS
    • OMNET++ ROUTING EXAMPLES
    • OMNeT++ Routing Protocol Projects
    • OMNET++ SAMPLE PROJECT
    • OMNeT++ SDN PROJECTS
    • OMNET++ SMART GRID
    • OMNeT++ SUMO Tutorial
  • OMNET++ SIMULATION THESIS
    • OMNET++ TUTORIAL FOR WIRELESS SENSOR NETWORK
    • OMNET++ VANET PROJECTS
    • OMNET++ WIRELESS BODY AREA NETWORK PROJECTS
    • OMNET++ WIRELESS NETWORK SIMULATION
      • OMNeT++ Zigbee Module
    • QOS OMNET++
    • OPENFLOW OMNETPP
  • Contact

How to implement TORA protocol in OMNeT++

To implement the Temporally-Ordered Routing Algorithm (TORA) in OMNeT++ has numerous steps that contains to setup a simulation then familiarize the TORA protocol and it generate the protocol modules then incorporate them with the INET framework, and validate the implementation.

Here is the detailed procedure to implement through this process;

Step-by-Step Implementation:

Step 1: Set Up OMNeT++ and INET Framework

  1. Install OMNeT++: Download and install the latest version of OMNeT++ from the OMNeT++
  2. Install INET Framework: Download and install the INET framework from the INET repository.

Step 2: Understand TORA Protocol

TORA is a distributed routing protocol planned for mobile ad hoc networks (MANETs). A Key concept includes:

  • Link Reversal: It is used for route maintenance.
  • Height Metric: Regulates the direction of data flow.
  • Route Creation: Initiated when a node needs a route to a destination.
  • Route Maintenance: Handled by link reversals when topology changes.
  • Route Erasure: Used to remove invalid routes.

Step 3: Create the TORA Protocol Module

Define the Module in .ned File

Create a .ned file for the TORA protocol module.

ned

simple TORA

{

parameters:

double helloInterval @unit(s) = default(1s);

double routeTimeout @unit(s) = default(30s);

gates:

input fromNetworkLayer;

output toNetworkLayer;

input fromMacLayer;

output toMacLayer;

}

Implement the Module in C++

Create the corresponding .cc and .h files.

TORA.h

#ifndef __TORA_H_

#define __TORA_H_

#include <omnetpp.h>

#include “inet/networklayer/contract/IRoutingTable.h”

#include “inet/networklayer/common/L3AddressResolver.h”

#include “inet/networklayer/ipv4/IPv4Datagram.h”

#include <map>

using namespace omnetpp;

using namespace inet;

class TORA : public cSimpleModule

{

private:

double helloInterval;

double routeTimeout;

IRoutingTable *routingTable;

cMessage *helloMsg;

cMessage *routeTimeoutMsg;

std::map<L3Address, double> height;  // Height metric for TORA

std::map<L3Address, L3Address> routes;  // Routing table

protected:

virtual void initialize() override;

virtual void handleMessage(cMessage *msg) override;

void sendHello();

void processHello(cMessage *msg);

void sendRouteRequest();

void processRouteRequest(cMessage *msg);

void sendRouteUpdate();

void processRouteUpdate(cMessage *msg);

void sendRouteClear();

void processRouteClear(cMessage *msg);

public:

TORA();

virtual ~TORA();

};

#endif

TORA.cc

#include “TORA.h”

Define_Module(TORA);

TORA::TORA()

{

helloMsg = nullptr;

routeTimeoutMsg = nullptr;

}

TORA::~TORA()

{

cancelAndDelete(helloMsg);

cancelAndDelete(routeTimeoutMsg);

}

void TORA::initialize()

{

helloInterval = par(“helloInterval”);

routeTimeout = par(“routeTimeout”);

routingTable = getModuleFromPar<IRoutingTable>(par(“routingTableModule”), this);

helloMsg = new cMessage(“sendHello”);

routeTimeoutMsg = new cMessage(“routeTimeout”);

scheduleAt(simTime() + helloInterval, helloMsg);

scheduleAt(simTime() + routeTimeout, routeTimeoutMsg);

}

void TORA::handleMessage(cMessage *msg)

{

if (msg == helloMsg)

{

sendHello();

scheduleAt(simTime() + helloInterval, helloMsg);

}

else if (msg == routeTimeoutMsg)

{

sendRouteClear();

scheduleAt(simTime() + routeTimeout, routeTimeoutMsg);

}

else if (strcmp(msg->getName(), “RouteRequest”) == 0)

{

processRouteRequest(msg);

}

else if (strcmp(msg->getName(), “RouteUpdate”) == 0)

{

processRouteUpdate(msg);

}

else if (strcmp(msg->getName(), “RouteClear”) == 0)

{

processRouteClear(msg);

}

else if (strcmp(msg->getName(), “Hello”) == 0)

{

processHello(msg);

}

else

{

// Handle other messages

}

}

void TORA::sendHello()

{

cMessage *hello = new cMessage(“Hello”);

send(hello, “toNetworkLayer”);

}

void TORA::processHello(cMessage *msg)

{

// Implement processing of Hello message

delete msg;

}

void TORA::sendRouteRequest()

{

cMessage *routeRequest = new cMessage(“RouteRequest”);

// Implement Route Request details and send

send(routeRequest, “toNetworkLayer”);

}

void TORA::processRouteRequest(cMessage *msg)

{

// Implement processing of Route Request message

delete msg;

}

void TORA::sendRouteUpdate()

{

cMessage *routeUpdate = new cMessage(“RouteUpdate”);

// Implement Route Update details and send

send(routeUpdate, “toNetworkLayer”);

}

 

void TORA::processRouteUpdate(cMessage *msg)

{

// Implement processing of Route Update message

delete msg;

}

void TORA::sendRouteClear()

{

cMessage *routeClear = new cMessage(“RouteClear”);

// Implement Route Clear details and send

send(routeClear, “toNetworkLayer”);

}

void TORA::processRouteClear(cMessage *msg)

{

// Implement processing of Route Clear message

delete msg;

}

Step 4: Integrate with Simulation Model

Incorporate with  TORA module inside a network simulation model.

Network Configuration .ned File

network TORANetwork

{

submodules:

host1: StandardHost {

parameters:

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

}

host2: StandardHost {

parameters:

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

}

// Add more hosts as needed

connections:

host1.pppg++ <–> { @display(“m=100,100”); } <–> host2.pppg++;

}

omnetpp.ini Configuration

network = TORANetwork

*.host*.pppg[*].queue.typename = “DropTailQueue”

*.host*.ipv4.routingTable = “inet.networklayer.routing.manet.Router”

*.host*.networkLayer.networkProtocol.typename = “IPv4NetworkLayer”

*.host*.transportLayer.tcp.typename = “Tcp”

*.host*.transportLayer.udp.typename = “Udp”

*.host*.application[*].typename = “UdpBasicApp”

*.host*.application[*].destAddresses = “host1”  // Set destination as needed

*.host*.application[*].destPort = 2000

*.host*.application[*].startTime = uniform(0s, 10s)

*.host*.application[*].sendInterval = uniform(1s, 2s)

*.host*.application[*].packetLength = 512B

*.host*.app[0].typename = “TORA”

Step 5: Test and Debug

  1. Run Simulations: Execute simulations to verify the characteristics of TORA module under numerous network conditions.
  2. Analyse Results: Verify the correctness and performance of implementation.
  3. Debugging: Use OMNeT++’s debugging tools to troubleshoot any issues.

In the above setup are the complete procedures to how to setup the simulation and how to execute the TPRA protocol in OMNET++ simulator. We plan to elaborate additional information about how the TORA protocol will perform in other simulation tool.

We work on all TORA protocol and it generate the protocol modules as per your reasech work, so get best project ideas and simulation results  from us.

Related Topics

  • Network Intrusion Detection Projects
  • Computer Science Phd Topics
  • Iot Thesis Ideas
  • Cyber Security Thesis Topics
  • Network Security Research Topics

designed by OMNeT++ Projects .