How to Start TORA Projects Using OMNeT++

To start a Temporally Ordered Routing Algorithm (TORA) project using OMNeT++ that requires configuring the OMNeT++ environment which offers suitable frameworks to make a network topology, apply the TORA protocol, and execute the simulation. TORA is a reactive routing protocol which is normally utilised within ad hoc networks that utilises a source-initiated approach to sustain the routes. In wireless networks, it is created for managing high mobility and dynamic topologies.

OMNeT++ environment doesn’t support TORA built-in thus we want to either execute TORA or adjust existing code, which offers it. Following is a structured method to get started:

Steps to Start TORA Projects in OMNeT++

Step 1: Install OMNeT++ and INET Framework

Initially, we want to have OMNeT++ and the INET Framework installed on the system. The INET framework offers diverse routing protocols and network models while TORA is not contained by default.

  1. Download and Install OMNeT++:
    • We should download and install the new version of OMNeT++ on the system.
    • Adhere to the installation guidance for operating system.
  2. Install INET Framework:
    • INET framework is an open-source framework, which offers several network protocols and models. We can be installed it through OMNeT++ IDE (OMNeT++ Module Manager) or by copying the INET repository within GitHub.

To install the INET framework:

    • Copy the INET repository:

git clone https://github.com/inet-framework/inet.git

    • Select File > Import > General > Existing Projects into Workspace, and then import the INET framework to the project within OMNeT++ IDE.

Step 2: Create a New OMNeT++ Project for TORA

  1. Create a New OMNeT++ Project:
    • Make a new project by directing to File > New > OMNeT++ Project in OMNeT++. Name it to the project as TORA_Routing.
  2. Set Up the Basic Network Topology:
    • Make a basic network topology including several nodes such as hosts and routers, since TORA is generally utilised in ad hoc networks.

Example .ned file for a simple TORA simulation:

network ToraNetwork {

submodules:

node1: AdhocNode;

node2: AdhocNode;

node3: AdhocNode;

node4: AdhocNode;

connections:

node1.wlan[0] <–> WlanInterface <–> node2.wlan[0];

node2.wlan[0] <–> WlanInterface <–> node3.wlan[0];

node3.wlan[0] <–> WlanInterface <–> node4.wlan[0];

}

Now:

  • AdhocNode is a placeholder for wireless nodes.
  • WlanInterface denotes wireless network interfaces among the nodes.

We need to substitute AdhocNode including custom module, which will be executed TORA routing.

Step 3: Implementing TORA Protocol

While TORA is not obtainable within INET framework by default then we can execute the TORA algorithm or adjust existing code. TORA is a reactive routing protocol, and it functions by means of executing route discovery as required. It uses temporary link reversal for sustaining routes.

Below is an outline of how to execute the TORA protocol in OMNeT++:

  1. Create a Custom Module for TORA:
    • Make a new cSimpleModule class, which will execute the TORA routing protocol in OMNeT++.

Example:

class ToraRouting : public cSimpleModule {

protected:

virtual void initialize() override {

// Initialization of TORA variables

// For example: setting up timers, initializing routing tables, etc.

}

virtual void handleMessage(cMessage *msg) override {

// Handle incoming messages (e.g., Route Request or Route Reply messages)

// Based on the message type, either initiate route discovery or forward the message

}

void sendRouteRequest() {

// Code to send a route request (RREQ)

}

void sendRouteReply() {

// Code to send a route reply (RREP)

}

// Additional TORA-specific methods to handle link reversals, etc.

};

In this case:

    • The initialize() function is utilised to configure the variables such as timers, routing tables.
    • The handleMessage() function executes incoming messages and  functions depends on the message types like RREQ, RREP.
  1. Define Routing Tables and Network States:
    • TORA operates by means of sustaining disruption flags, height values, and link reversal once routes flop. We have to execute the structures to save this information.
  2. Implement Route Discovery and Maintenance:
    • Route discovery is established by Route Request (RREQ) messages that are transmitted by the source node in TORA.
    • The destination node transmits again a Route Reply (RREP) verifying the route.
    • If the link among the nodes fails then link reversal process is utilised for determining an alternate route.

Example of sending a Route Request (RREQ) message:

void ToraRouting::sendRouteRequest() {

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

// Set the necessary fields of RREQ, such as source, destination, sequence number, etc.

send(rreq, “out”);

}

  1. Handle Route Maintenance:
    • TORA is created for managing topological changes by inverting the links direction, thus we have to execute a way to reverse links once a route flops or a better route is found.

Step 4: Configure the Simulation

  1. Configure Simulation Parameters in omnetpp.ini:
    • We need to configure the simulation metrics like routing protocol, traffic generation, and timing using .ini files.

Example omnetpp.ini configuration:

network = ToraNetwork

sim-time-limit = 100s

[Config ToraConfig]

*.node1.routingProtocol = “ToraRouting”

*.node2.routingProtocol = “ToraRouting”

*.node3.routingProtocol = “ToraRouting”

*.node4.routingProtocol = “ToraRouting”

# Traffic generation configuration

*.node1.app[0].typename = “UdpBasicApp”

*.node1.app[0].destAddr = “node4”

*.node1.app[0].startTime = 1s

*.node1.app[0].messageLength = 100B

*.node1.app[0].sendInterval = 1s

  1. Enable TORA Protocol for Each Node:
    • Indicate that each node utilises the ToraRouting protocol in the configuration file.

Step 5: Run the Simulation

  1. Build the Project:
    • Go to OMNeT++, and select the Build to execute the project.
  2. Run the Simulation:
    • We should execute the simulation including Tkenv or Qtenv for envisioning the network behavior. We would monitor how TORA manages the route discovery and maintenance in the course of simulation.
  3. Monitor and Analyze:
    • Examine the routing performance and also estimate the performance parameters like delay, packet loss, and throughput to utilise OMNeT++’s EV logging and statistics.

Example of logging in module:

EV << “Sending Route Request from ” << getId() << ” to ” << destination << endl;

  1. Check for Route Maintenance:
    • We should monitor how routes are sustained or interrupted once network changes happen like node mobility or link failures.

Step 6: Extend the Simulation

When the simple TORA routing is executed then we can prolong the simulation including more aspects like:

  1. Node Mobility:
    • In OMNeT++, replicate the moving nodes utilising the Mobility framework and then measure how TORA adjusts to mobility.
  2. Simulate Larger Topologies:
    • Prolong the network to additional nodes and estimate the performance of TORA in large-scale networks.
  3. Link Failures and Reconnection:
    • We need to mimic link failures to experiment how TORA responses once routes fail and require to be regenerated.
  4. Different Traffic Types:
    • Test with various traffic types such as UDP, TCP and also monitor how TORA adjusts to modifying the traffic patterns.

Conclusion

To start a Temporally Ordered Routing Algorithm (TORA) project, we need to configure a custom TORA routing module, make a network topology, set the simulation metrics, and then execute the core TORA functionality like route discovery, route maintenance, and link reversal in OMNeT++ permits to replicate the ad hoc networks and utilise TORA like the routing protocol for dynamic topologies. We can be replicated diverse network scenarios to measure the performance of protocol in various conditions such as node mobility, traffic, and link failures with appropriate execution.

We have offered an outlined structure, featuring OMNeT++-specific content like simulation setup, implementation and extension with code snippets. If you want further details about this process, we will provide it too.

To get expert guidance send to phdprojects.org all your project details we are ready with all the needed tools and resources by giving you best support.