How to Simulate Interior Gateway Routing Protocol OMNeT++

To simulate an Interior Gateway Routing Protocol (IGRP) projects utilizing OMNeT++ that wants comprehending IGRP’s role as a distance-vector routing protocol used for routing in an autonomous system. IGRP actively find out the finest route for data packets according to the factors such as hop count, bandwidth, delay, and reliability. However IGRP is not offered by default in the INET framework, we can be mimicked it using same protocols such as RIP (Routing Information Protocol) or execute it as a custom protocol.

The following is a step-by-step instruction to mimic IGRP projects using OMNeT++.

Steps to Simulate IGRP Projects in OMNeT++

  1. Install OMNeT++ and INET Framework
  1. Download OMNeT++: Download and install OMNeT++ from the OMNeT++ website.
  2. Install INET Framework:
    • The INET framework offers models for numerous network protocols, which containing distance-vector routing protocols such as RIP.
    • Clone the INET repository:

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

    • Import INET into OMNeT++ through File > Import > Existing Projects into Workspace.
    • Build the INET project by right-clicking on the INET project within OMNeT++ and choosing Build Project.
  1. Understand IGRP Protocol

IGRP, invented by Cisco that is a distance-vector routing protocol utilized to find out the best path among two routers within a network. IGRP computes the parameters according to:

  • Bandwidth: The available bandwidth on the path.
  • Delay: The delay in packet transmission.
  • Reliability: The likelihood of the link failing.
  • Load: The current traffic load on the link.

Even though IGRP is no longer broadly utilized and has been substituted by EIGRP (Enhanced IGRP), we can replicate same protocols such as RIP or execute IGRP as a custom protocol in OMNeT++.

  1. Set Up the Network Topology in NED

We will make a simple network topology in which several routers and hosts communicate. We can be utilized the NED (Network Description) file to describe the network.

Example NED File (IgrpNetwork.ned):

package igrpnetwork;

import inet.node.inet.Router;

import inet.node.inet.StandardHost;

import inet.networklayer.ipv4.Ipv4RoutingTable;

import inet.linklayer.ethernet.EthernetInterface;

network IgrpNetwork

{

submodules:

host1: StandardHost {

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

}

host2: StandardHost {

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

}

router1: Router {

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

}

router2: Router {

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

}

connections allowunconnected:

host1.ethg++ <–> EthernetInterface <–> router1.ethg++;

router1.ethg++ <–> EthernetInterface <–> router2.ethg++;

router2.ethg++ <–> EthernetInterface <–> host2.ethg++;

}

Explanation:

  • Hosts and Routers: The topology encompasses two routers and two hosts are connected through Ethernet.
  • EthernetInterface: Wired connections among the routers and hosts.
  1. Implement or Simulate IGRP

Since INET does not deliver an execution of IGRP directly, we can either mimic it using a same distance-vector protocol such as RIP, or execute a custom IGRP protocol within OMNeT++.

  1. Simulating with RIP

RIP is a distance-vector protocol and can help as a proxy for replicating simple IGRP functionalities, albeit with limited parameters (hop count rather than delay, bandwidth, etc.).

  1. Configure RIP in omnetpp.ini:

[General]

network = IgrpNetwork

sim-time-limit = 100s

# RIP settings for routers

*.router1.hasIpv4 = true

*.router1.ipv4.routingTable.typename = “Ipv4RoutingTable”

*.router1.hasRip = true

*.router2.hasIpv4 = true

*.router2.ipv4.routingTable.typename = “Ipv4RoutingTable”

*.router2.hasRip = true

# Configure IP addresses for hosts

*.host1.hasIpv4 = true

*.host1.ipv4.address = “10.0.0.1”

*.host1.ipv4.netmask = “255.255.255.0”

*.host2.hasIpv4 = true

*.host2.ipv4.address = “10.0.0.2”

*.host2.ipv4.netmask = “255.255.255.0”

# Application traffic

*.host1.numApps = 1

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

*.host1.app[0].destAddresses = “10.0.0.2”

*.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.app[0].localPort = 5000

Explanation:

    • RIP Routing Protocol: RIP is allowed on the routers utilizing the INET model’s built-in support for RIP.
    • IP Configuration: IP addresses and netmasks are set up for the hosts.
    • UDP Traffic: Host1 transmits UDP packets to Host2.
  1. Run the Simulation:
    • After configuring the NED and omnetpp.ini files, right-click on omnetpp.ini in the OMNeT++ IDE and choose Run As > OMNeT++ Simulation to begin the simulation.
  1. Implementing a Custom IGRP Protocol

To execute an IGRP as a custom protocol within OMNeT++, we would require to make a new routing protocol by prolonging or changing an existing distance-vector protocol such as RIP.

  1. Create the IGRP Routing Module in NED:

simple IgrpRouting

{

parameters:

double updateInterval @unit(s) = default(30s);  // Update interval for routing table

@display(“i=block/routing”);

gates:

input in;

output out;

}

  1. Implement IGRP in C++: (IgrpRouting.cc)

#include “IgrpRouting.h”

Define_Module(IgrpRouting);

void IgrpRouting::initialize()

{

updateInterval = par(“updateInterval”);

// Initialize the IGRP routing table and metrics (bandwidth, delay, etc.)

scheduleAt(simTime() + updateInterval, new cMessage(“UpdateRoutingTable”));

}

void IgrpRouting::handleMessage(cMessage *msg)

{

if (msg->isSelfMessage()) {

// Update routing table based on IGRP metrics

updateRoutingTable();

scheduleAt(simTime() + updateInterval, msg);  // Reschedule the update

} else {

// Forward incoming packets based on the IGRP routing table

forwardPacket(check_and_cast<cPacket *>(msg));

}

}

void IgrpRouting::updateRoutingTable()

{

// Logic for calculating routes based on IGRP metrics (bandwidth, delay, reliability)

EV << “Updating routing table using IGRP metrics…\n”;

}

void IgrpRouting::forwardPacket(cPacket *pkt)

{

// Forward packet using the best route based on IGRP calculations

EV << “Forwarding packet using IGRP routing\n”;

send(pkt, “out”);

}

Explanation:

    • Routing Table Update: The updateRoutingTable() function computes the best routes using the IGRP parameters like bandwidth, delay, and so on.
    • Packet Forwarding: The forwardPacket() function forwards packets depends on the routing table generated by IGRP.
  1. Integrate the Custom IGRP Module:
    • Change the omnetpp.ini file to utilize the custom IGRP routing module for the routers.
  1. Analyze Simulation Results

When the simulation is running then we can be examined the network’s performance, concentrating on:

  1. Packet Delivery Ratio: Estimate how efficiently packets are routed using IGRP.
  2. End-to-End Delay: Monitor the average delay in packet delivery over the network.
  3. Routing Convergence Time: Calculate how rapidly the network’s routing tables converge after modifies in the topology.

Utilize OMNeT++’s vector and scalar output files to gather the performance parameters like throughput, delay, and packet loss.

  1. Extend the Simulation

We can expand the IGRP simulation by:

  1. Larger Networks: Enlarge the network by inserting additional routers and hosts to mimic a more complex network topology.
  2. Dynamic Network Changes: Launch link failures or modifies in network topology to monitor how rapidly IGRP converges and adjusts.
  3. Comparisons with Other Protocols: Replicate an IGRP alongside other routing protocols such as OSPF or EIGRP to compare their performance in distinct scenarios.

We comprehensively explained the fundamental technique utilizing sample snippets for Interior Gateway Routing Protocol, simulated and analysed through OMNeT++ simulation tool. More specifics will be added as per your needs.

We guarantee top-notch customized services tailored to your specific requirements. At phdprime.com, we will be your reliable partner for simulating Interior Gateway Routing Protocol projects using the OMNeT++ tool.

Opening Time

9:00am

Lunch Time

12:30pm

Break Time

4:00pm

Closing Time

6:30pm

  • award1
  • award2