How to Simulate Link State Routing Projects Using OMNeT++

To simulate Link State Routing projects within OMNeT++, which permits to investigate how link-state protocols, like OSPF (Open Shortest Path First) and IS-IS (Intermediate System to Intermediate System), perform in dynamic network environments. Link-state protocols utilize the idea of conserving a complete view of the network topology, including each node (or router) distributing information regarding its directly connected links and building a global view to calculate the shortest path with the help of algorithms such as Dijkstra’s.

The INET Framework for OMNeT++ delivers support for OSPF that is one of the most general link-state routing protocols. We can be mimicked how routers in a network use OSPF to compute the shortest paths, how routing tables are updated, and how the network responds to failures.

We will instruct you through the step-by-step approach to simulate Link State Routing (e.g., OSPF) using OMNeT++ and INET:

Steps to Simulate Link State Routing Projects in OMNeT++

  1. Install OMNeT++ and INET Framework
  1. Download OMNeT++:
  2. Install INET Framework:
    • INET offers the essential modules for mimicking link-state routing protocols such as OSPF.
    • Clone the INET repository:

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

    • Import the project into OMNeT++ through File > Import > Existing Projects into Workspace and choose the inet directory.
    • Build the INET project by right-clicking the INET folder and choosing Build Project.
  1. Define the Network Topology in NED

Make a network topology in which routers are communicate with each other using OSPF or another link-state routing protocol. We can describe the topology utilizing NED (Network Description).

Example NED File for OSPF Network (LinkStateRoutingNetwork.ned):

package linkstateroutingnetwork;

import inet.node.inet.Router;

import inet.node.inet.StandardHost;

import inet.linklayer.ethernet.EthernetInterface;

network LinkStateRoutingNetwork

{

submodules:

router1: Router {

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

}

router2: Router {

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

}

router3: Router {

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

}

host1: StandardHost {

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

}

host2: StandardHost {

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

}

connections allowunconnected:

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

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

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

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

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

}

Explanation:

  • Routers: Three routers (router1, router2, router3), which will swap OSPF routing information.
  • Hosts: Two hosts (host1, host2) are connected to the routers for traffic generation.
  • EthernetInterface: Wired connections among the routers and hosts to make a typical routing environment.
  1. Configure OSPF in omnetpp.ini

The omnetpp.ini file sets up the routing protocol, network properties, and traffic patterns. INET supports OSPF by default, and we can set up OSPF to work with the described topology.

Example omnetpp.ini Configuration for OSPF:

[General]

network = LinkStateRoutingNetwork

sim-time-limit = 200s

# Configure IP Addresses and Routing Table for Routers and Hosts

*.router1.ipv4.address = “10.0.0.1”

*.router1.ipv4.netmask = “255.255.255.0”

*.router2.ipv4.address = “10.0.0.2”

*.router2.ipv4.netmask = “255.255.255.0”

*.router3.ipv4.address = “10.0.0.3”

*.router3.ipv4.netmask = “255.255.255.0”

*.host1.ipv4.address = “10.0.0.4”

*.host1.ipv4.netmask = “255.255.255.0”

*.host2.ipv4.address = “10.0.0.5”

*.host2.ipv4.netmask = “255.255.255.0”

# OSPF Configuration for Routers

*.router1.hasOspf = true

*.router1.ospfRouter.routerId = “1.1.1.1”

*.router1.ospfRouter.areas = “0”

*.router1.ospfRouter.area[0].interfaceName = “eth0”

*.router2.hasOspf = true

*.router2.ospfRouter.routerId = “2.2.2.2”

*.router2.ospfRouter.areas = “0”

*.router2.ospfRouter.area[0].interfaceName = “eth0”

*.router3.hasOspf = true

*.router3.ospfRouter.routerId = “3.3.3.3”

*.router3.ospfRouter.areas = “0”

*.router3.ospfRouter.area[0].interfaceName = “eth0”

# Traffic Configuration

*.host1.numApps = 1

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

*.host1.app[0].destAddresses = “10.0.0.5”   # 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

# OSPF Parameters (optional)

*.**.ospfRouter.helloInterval = 5s   # Interval between Hello messages

*.**.ospfRouter.deadInterval = 20s   # Time to declare neighbor down if no Hello is received

Explanation:

  • IP Configuration: Allocates IP addresses to the routers and hosts.
  • OSPF Settings: Allows OSPF on each router, allocating single router IDs and describing interfaces for OSPF operations. OSPF will be calculated the shortest path for packet forwarding.
  • Traffic Generation: Host1 transmits UDP traffic to Host2 via the OSPF-routed network.
  • OSPF Parameters: Describes the intervals for OSPF hello messages and neighbour timeouts.
  1. Run the Simulation
  1. Build the Project:
    • Right-click on the OMNeT++ project and select Build Project to compile the simulation files.
  2. Run the Simulation:
    • Right-click on omnetpp.ini and choose Run As > OMNeT++ Simulation.
    • Utilize the Qtenv graphical interface to monitor OSPF packet exchanges, routing table updates, and how data is forwarded among the hosts.
  1. Analyze the Results

When the simulation is complete then we can investigate the following key features of OSPF:

  1. Routing Table Convergence:
    • Verify how rapidly the routing tables converge through routers, particularly after network changes (e.g., link failures or router restarts).
  2. Shortest Path Calculation:
    • Check if OSPF correctly calculates the shortest path for packet forwarding.
  3. Control Traffic (OSPF Hello, LSAs):
    • Observe the total of control traffic generated by OSPF, with Hello packets and Link-State Advertisements (LSAs).
  4. Throughput and Latency:
    • Examine the throughput and latency of data sent hosts to estimate the performance of the OSPF network.
  1. Test Dynamic Network Conditions

We can be mimicked dynamic conditions to experiment how OSPF manages topology changes and failures:

  1. Link Failures:
    • Replicate link failures by disconnecting links among the routers in the NED or by programmatically introducing failures in omnetpp.ini. Monitor how OSPF reroutes traffic around the failure.

*.router1.ethg++ <–> DropTailQueue

*.router1.ethg[0].queue.packetCapacity = 0  # Simulate link failure

  1. Router Failures:
    • Mimic router failures and monitor how OSPF updates the routing tables and reroutes traffic to make certain connectivity.
  2. Dynamic Traffic Patterns:
    • Launch differing traffic patterns to experiment how OSPF manages congestion and modifies the routing consequently.
  1. Extend the Simulation

We can further expand the simulation to check more scenarios or more complex OSPF configurations:

  1. Multiple OSPF Areas:
    • Replicate a network with numerous OSPF areas to observe how OSPF Area Border Routers (ABRs) manage an inter-area routing.
  2. Wireless Networks:
    • Substitute Ethernet links with wireless links to replicate OSPF in a mobile ad hoc network (MANET) or a wireless network.
  3. Routing Protocol Comparison:
    • Mimic both OSPF and other routing protocols such as RIP or EIGRP and compare their performance such as convergence time, control traffic, and efficiency.
  4. Quality of Service (QoS):
    • Execute QoS mechanisms on top of OSPF to prioritize specific types of traffic and examine the influence on network performance.

In this simulation, we focused on how to simulate, analyse and test the Link State Routing Projects using the above process in OMNeT++ analysis tool. We provide various projects ideas in upcoming manual. We are prepared to assist you with simulations for your Link State Routing projects utilizing OMNeT++. You can anticipate high-quality simulations and innovative research concepts from our team. Additionally, we offer the option to develop tailored projects specifically for your needs. Furthermore, we guarantee timely delivery along with concise explanations.

Opening Time

9:00am

Lunch Time

12:30pm

Break Time

4:00pm

Closing Time

6:30pm

  • award1
  • award2