How to Simulate Hierarchical Routing Projects Using OMNeT++

To simulate Hierarchical Routing projects using OMNeT++, which encompasses classifying the network into numerous levels or layers, in which distinct routing protocols or strategies can be applied at each level. Hierarchical routing minimizes the complexity of routing within large networks by splitting the network into clusters, domains, or areas. It is generally utilized in large-scale networks such as OSPF with several areas, Hierarchical Mobile IP, Cluster-based routing, and more.

To simulate hierarchical routing within OMNeT++, we can be used the INET Framework that supports protocols such as OSPF (with multiple areas) and custom hierarchical routing designs. The following is a step-by-step instruction to mimic hierarchical routing with an instance of OSPF with several areas.

Steps to Simulate Hierarchical Routing in OMNeT++

  1. Install OMNeT++ and INET Framework
  1. Download OMNeT++:
  2. Install INET Framework:
    • The INET Framework offers support for numerous routing protocols, containing hierarchical routing protocols like OSPF with various areas.
    • Clone the INET repository:

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

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

To simulate hierarchical routing, we require to describe a network in which routers are organized into distinct areas or clusters. In OSPF, for instance, routers are grouped into areas, and an Area Border Router (ABR) connects these areas to the backbone area (Area 0).

Example NED File for Hierarchical OSPF (HierarchicalRoutingNetwork.ned):

package hierarchicalrouting;

import inet.node.inet.Router;

import inet.node.inet.StandardHost;

import inet.linklayer.ethernet.EthernetInterface;

network HierarchicalRoutingNetwork

{

submodules:

area1Router1: Router {

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

}

area1Router2: Router {

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

}

area2Router1: Router {

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

}

area2Router2: Router {

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

}

backboneRouter1: Router {

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

}

backboneRouter2: Router {

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

}

host1: StandardHost {

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

}

host2: StandardHost {

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

}

connections allowunconnected:

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

area1Router1.ethg++ <–> EthernetInterface <–> area1Router2.ethg++;

area1Router2.ethg++ <–> EthernetInterface <–> backboneRouter1.ethg++;

backboneRouter1.ethg++ <–> EthernetInterface <–> backboneRouter2.ethg++;

backboneRouter2.ethg++ <–> EthernetInterface <–> area2Router1.ethg++;

area2Router1.ethg++ <–> EthernetInterface <–> area2Router2.ethg++;

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

}

Explanation:

  • Area Routers: Routers in Area 1 and Area 2. These routers utilize OSPF in their corresponding areas.
  • Backbone Routers: These routers belong to Area 0 (the backbone) and connect the distinct areas.
  • Hosts: Two hosts, one in Area 1 and another in Area 2, which generate traffic for experimenting the routing.
  1. Configure OSPF in omnetpp.ini

To execute hierarchical routing with OSPF, we want to set up several OSPF areas. In this sample, we have two areas (Area 1 and Area 2) and the backbone area (Area 0). Area Border Routers (ABRs) connect the areas to the backbone.

Example omnetpp.ini Configuration:

[General]

network = HierarchicalRoutingNetwork

sim-time-limit = 300s

# IP Configuration for Area 1 Routers

*.area1Router1.ipv4.address = “10.0.1.1”

*.area1Router1.ipv4.netmask = “255.255.255.0”

*.area1Router2.ipv4.address = “10.0.1.2”

*.area1Router2.ipv4.netmask = “255.255.255.0”

# IP Configuration for Area 2 Routers

*.area2Router1.ipv4.address = “10.0.2.1”

*.area2Router1.ipv4.netmask = “255.255.255.0”

*.area2Router2.ipv4.address = “10.0.2.2”

*.area2Router2.ipv4.netmask = “255.255.255.0”

# IP Configuration for Backbone Routers

*.backboneRouter1.ipv4.address = “10.0.0.1”

*.backboneRouter1.ipv4.netmask = “255.255.255.0”

*.backboneRouter2.ipv4.address = “10.0.0.2”

*.backboneRouter2.ipv4.netmask = “255.255.255.0”

# OSPF Configuration for Area 1

*.area1Router1.hasOspf = true

*.area1Router1.ospfRouter.routerId = “1.1.1.1”

*.area1Router1.ospfRouter.areas = “1”               # Area 1

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

*.area1Router2.hasOspf = true

*.area1Router2.ospfRouter.routerId = “1.1.1.2”

*.area1Router2.ospfRouter.areas = “1”               # Area 1

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

*.area1Router2.ospfRouter.area[1].interfaceName = “eth1”  # Connected to Backbone

# OSPF Configuration for Area 2

*.area2Router1.hasOspf = true

*.area2Router1.ospfRouter.routerId = “2.2.2.1”

*.area2Router1.ospfRouter.areas = “2”               # Area 2

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

*.area2Router2.hasOspf = true

*.area2Router2.ospfRouter.routerId = “2.2.2.2”

*.area2Router2.ospfRouter.areas = “2”               # Area 2

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

*.area2Router2.ospfRouter.area[1].interfaceName = “eth1”  # Connected to Backbone

# OSPF Configuration for Backbone (Area 0)

*.backboneRouter1.hasOspf = true

*.backboneRouter1.ospfRouter.routerId = “0.0.0.1”

*.backboneRouter1.ospfRouter.areas = “0”            # Backbone (Area 0)

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

*.backboneRouter1.ospfRouter.area[1].interfaceName = “eth1”  # Connection to Area 1

*.backboneRouter2.hasOspf = true

*.backboneRouter2.ospfRouter.routerId = “0.0.0.2”

*.backboneRouter2.ospfRouter.areas = “0”            # Backbone (Area 0)

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

*.backboneRouter2.ospfRouter.area[1].interfaceName = “eth1”  # Connection to Area 2

# Traffic Configuration (Host1 sending traffic to Host2)

*.host1.numApps = 1

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

*.host1.app[0].destAddresses = “10.0.2.2”           # Send to Host2 in Area 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

# OSPF Parameters

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

*.**.ospfRouter.deadInterval = 40s                  # Dead interval for neighbor discovery

Explanation:

  • OSPF Area Configuration: Each router is allocated to an area (Area 1, Area 2, or Area 0 for the backbone). Area Border Routers (ABRs) associate the areas to the backbone.
  • IP Configuration: Allocates an IP addresses to routers and hosts.
  • Traffic Configuration: Host1 (in Area 1) sends UDP traffic to Host2 (in Area 2) via the hierarchical OSPF network.
  • OSPF Parameters: Sets up OSPF hello intervals and dead intervals for neighbour discovery.
  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 use the Qtenv graphical interface to envision how OSPF builds routing tables and how traffic is routed via the hierarchical network.
  1. Analyze the Results

When the simulation is complete then we can examine numerous features of hierarchical routing:

  1. Routing Table Convergence:
    • Verify how rapidly OSPF routers in each area converge and update their routing tables after the network is initialized.
  2. Area Border Routers (ABRs):
    • Examine how ABRs exchange summary data among distinct areas and forward traffic among them.
  3. Traffic Flow:
    • Check that traffic from Host1 to Host2 is being routed via the correct OSPF areas and ABRs.
  4. Control Traffic (OSPF Hello, LSA):
    • Observe the control traffic (Hello messages, Link-State Advertisements) exchanged among the routers in distinct areas.
  1. Simulate Dynamic Network Changes

We can be mimicked dynamic network changes to experiment how OSPF in hierarchical routing manages topology changes:

  1. Link/Router Failures:
    • Disconnect or fail routers to replicate network outages. Monitor how OSPF updates the routing tables and reroutes traffic via another paths.
  2. Traffic Load:
    • Maximizes the traffic load by inserting more hosts and generating more UDP flows to experiment how OSPF in hierarchical routing manages the congestion and load balancing.
  3. Network Scalability:
    • Extend the network by inserting more routers and areas to observe how OSPF scales within a hierarchical routing architecture.
  1. Extend the Simulation
  1. Custom Hierarchical Protocols:
    • If we have custom hierarchical routing protocols then we can be executed them by prolonging the existing routing modules within INET or making new ones.
  2. Wireless Networks:
    • We can substitute Ethernet links with wireless ones to mimic hierarchical routing in wireless ad hoc networks.
  3. Compare Hierarchical and Flat Routing:
    • Replicate flat routing (all routers in a single area) and compare its performance with hierarchical routing such as scalability, control traffic, and routing efficiency.
  4. Mobile Networks:
    • We can replicate Hierarchical Mobile IP (HMIP) that utilizes hierarchical mobility management to minimize signalling overhead in mobile networks.

In this manual, we had completely explicated the methodology on how to execute and simulate the Hierarchical Routing Projects using OMNeT++. More detailed informations will be offered regarding this process depends on your needs.

To simulate Hierarchical Routing projects using OMNeT++ tool we at phdprime.com will be your trusted  partner, we assure you with best customised services as per your needs.

Opening Time

9:00am

Lunch Time

12:30pm

Break Time

4:00pm

Closing Time

6:30pm

  • award1
  • award2