How to Simulate Distributed Routing Projects Using OMNeT++

To simulate distributed routing projects within OMNeT++, which contains making a network in which routing decisions are created by each node individually without depending on centralized control. Distributed routing protocols, like Distance Vector Routing (e.g., RIP) or Link-State Routing (e.g., OSPF), allow routers to communicate locally with their neighbours to share routing data and calculate the paths. It is frequently utilized in large, dynamic, or ad-hoc networks.

The following is a step-by-step instruction to replicate distributed routing projects utilizing OMNeT++ and the INET framework.

  1. Install OMNeT++ and INET Framework
  1. Download OMNeT++:
  2. Install INET Framework:
    • INET offers models for several routing protocols (e.g., RIP, OSPF, and ad-hoc routing protocols).
    • Clone the INET repository:

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

    • Import the INET project into OMNeT++ through File > Import > Existing Projects into Workspace, and choose the inet directory.
    • Build the project by right-clicking the inet project in OMNeT++ and choosing Build Project.
  1. Choose a Distributed Routing Protocol

Distributed routing protocols typically include:

  • Distance Vector Routing (RIP) – Nodes only know their neighbours and share routing updates occasionally.
  • Link-State Routing (OSPF) – Nodes exchange full topology data with their neighbours and calculate the shortest paths utilizing Dijkstra’s algorithm.
  • Ad-hoc Routing (AODV, DSR) – For mobile networks in which nodes may join, leave, or move often.

For this instruction, we will be replicated RIP (a distributed Distance Vector Routing protocol) using OMNeT++.

  1. Define the Network Topology in NED

We will want to describe a network of routers in which each router creates independent, distributed routing decisions. It will be described using NED (Network Description).

Example NED File for Distributed Routing (DistributedRoutingNetwork.ned):

package distributedrouting;

import inet.node.inet.Router;

import inet.node.inet.StandardHost;

import inet.linklayer.ethernet.EthernetInterface;

import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;

network DistributedRoutingNetwork

{

parameters:

int numRouters = 4;  // Define the number of routers

submodules:

configurator: Ipv4NetworkConfigurator {

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

}

host1: StandardHost {

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

}

host2: StandardHost {

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

}

router[numRouters]: Router {

@display(“p=100+100*i,150”);

}

connections allowunconnected:

host1.ethg++ <–> EthernetInterface <–> router[0].ethg++;

router[0].ethg++ <–> EthernetInterface <–> router[1].ethg++;

router[1].ethg++ <–> EthernetInterface <–> router[2].ethg++;

router[2].ethg++ <–> EthernetInterface <–> router[3].ethg++;

router[3].ethg++ <–> EthernetInterface <–> host2.ethg++;

}

Explanation:

  • StandardHost: Denotes end systems (e.g., host1 and host2), which transmit and receive traffic.
  • Router: Signifies the routers, which create distributed routing decisions using the RIP protocol.
  • EthernetInterface: Denotes wired connections among the routers and hosts.
  • Ipv4NetworkConfigurator: Automatically allocates an IP addresses to routers and hosts.
  1. Configure Distributed Routing Protocol in omnetpp.ini

Then, we set up the RIP (Distance Vector Routing) protocol in the omnetpp.ini file. RIP works by having each router share routing updates with its neighbours periodically, according to the hop count.

Example omnetpp.ini Configuration for RIP:

[General]

network = DistributedRoutingNetwork

sim-time-limit = 200s

# IP Address Configuration

*.host1.ipv4.address = “10.0.0.1”

*.host1.ipv4.netmask = “255.255.255.0”

*.host2.ipv4.address = “10.0.0.2”

*.host2.ipv4.netmask = “255.255.255.0”

# Enable RIP (Distributed Distance Vector Routing)

*.router[*].hasRip = true

*.router[*].ripRouter.routingTable = “RipRoutingTable”

# Traffic Configuration (UDP Traffic Generation)

*.host1.numApps = 1

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

*.host1.app[0].destAddresses = “10.0.0.2”   # Send traffic to Host2

*.host1.app[0].destPort = 5000

*.host1.app[0].messageLength = 1024B

*.host1.app[0].sendInterval = exponential(1s)

*.host2.numApps = 1

*.host2.app[0].typename = “UdpSink”   # Host2 is the UDP receiver

*.host2.app[0].localPort = 5000

# RIP Parameters (Distributed Distance Vector Protocol)

*.**.ripRouter.updateInterval = 10s    # Interval for RIP updates

*.**.ripRouter.timeoutInterval = 30s   # Time before a route is declared invalid

*.**.ripRouter.holdDownInterval = 15s  # Hold-down time for unreachable routes

Explanation:

  • RIP Configuration: Allows the RIP protocol on all routers. Each router will distribute distance-vector data with its neighbours periodically to calculate the paths.
  • UDP Traffic Generation: Host1 transmits UDP traffic to Host2 via the routers, and Host2 receives the traffic.
  • RIP Parameters: Sets up the RIP update interval, timeout interval, and hold-down interval for unreachable routes.
  1. Run the Simulation
  1. Build the Project:
    • Right-click on the OMNeT++ project and choose Build Project to compile the simulation files.
  2. Run the Simulation:
    • Right-click on omnetpp.ini and choose Run As > OMNeT++ Simulation.
    • We can utilize the Qtenv graphical interface to observe how RIP calculates distributed routing tables, updates neighbours, and forwards traffic from Host1 to Host2.
  1. Analyze the Results

When the simulation is complete then we can examine the behaviour of the distributed routing protocol:

  1. Routing Table Convergence:
    • Monitor how rapidly the routers converge to consistent routing tables. This occurs as each router exchanges distance-vector data with its neighbours.
  2. Traffic Flow:
    • Check that traffic from Host1 to Host2 is routed appropriately, and that RIP has calculated the shortest paths rely on hop counts.
  3. RIP Control Traffic:
    • Observe the control messages (e.g., RIP updates) exchanged among routers.
  4. Performance Metrics:
    • End-to-End Delay: Estimate how long it takes packets to travel from Host1 to Host2.
    • Packet Delivery Ratio: Ascertain if any packets were dropped or lost in the course of the simulation.
    • Routing Table Changes: Verify how frequently routing tables are updated as routers exchange data.
  1. Simulate Dynamic Network Conditions

Replicate network dynamics to monitor how RIP adjusts to changes in topology:

  1. Link Failures:
    • Replicate a link failure by disabling a link among two routers. Monitor how RIP recomputes routes and alters the routing tables consequently.

# Disable a link to simulate a link failure

*.router[1].ethg[1].disable = true

  1. Traffic Congestion:
    • Launch additional traffic flows to replicate network congestion and monitor how the distributed routing protocol manages increased traffic.
  2. Node Mobility (for Ad-hoc Routing):
    • If we are utilizing an ad-hoc routing protocol such as AODV or DSR then we can replicate mobile nodes by allowing mobility models like RandomWaypointMobility.
  1. Extend the Simulation
  1. Test with Larger Networks:
    • Maximize the amount of routers and hosts to replicate a larger distributed network. It will experiment the scalability of the distributed routing protocol.
  2. Compare with Other Distributed Protocols:
    • Mimic other distributed routing protocols like OSPF or AODV and compare their performance with RIP such as convergence time, control traffic overhead, and routing optimality.
  3. Custom Distributed Routing Protocol:
    • Execute the own custom distributed routing protocol utilizing C++ if we require to mimic a more specific distributed routing algorithm.

In this illustration, we entirely understand how to simulate and extend the Distributed Routing Projects within OMNeT++ tool. If you have any query on this projects we will clarify it.

Our technical team will help  you by offering comprehensive, step-by-step guidance on Distributed Routing Projects utilizing the OMNeT++ tool. To obtain optimal project ideas, please share your details with us at phdprime.com, where we will deliver the finest simulation support.

Opening Time

9:00am

Lunch Time

12:30pm

Break Time

4:00pm

Closing Time

6:30pm

  • award1
  • award2