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++
- Install OMNeT++ and INET Framework
- Download OMNeT++:
- Install OMNeT++ from the official OMNeT++ website.
- 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.
- 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.
- 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.
- Run the Simulation
- Build the Project:
- Right-click on the OMNeT++ project and select Build Project to compile the simulation files.
- 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.
- Analyze the Results
When the simulation is complete then we can investigate the following key features of OSPF:
- Routing Table Convergence:
- Verify how rapidly the routing tables converge through routers, particularly after network changes (e.g., link failures or router restarts).
- Shortest Path Calculation:
- Check if OSPF correctly calculates the shortest path for packet forwarding.
- Control Traffic (OSPF Hello, LSAs):
- Observe the total of control traffic generated by OSPF, with Hello packets and Link-State Advertisements (LSAs).
- Throughput and Latency:
- Examine the throughput and latency of data sent hosts to estimate the performance of the OSPF network.
- Test Dynamic Network Conditions
We can be mimicked dynamic conditions to experiment how OSPF manages topology changes and failures:
- 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
- Router Failures:
- Mimic router failures and monitor how OSPF updates the routing tables and reroutes traffic to make certain connectivity.
- Dynamic Traffic Patterns:
- Launch differing traffic patterns to experiment how OSPF manages congestion and modifies the routing consequently.
- Extend the Simulation
We can further expand the simulation to check more scenarios or more complex OSPF configurations:
- Multiple OSPF Areas:
- Replicate a network with numerous OSPF areas to observe how OSPF Area Border Routers (ABRs) manage an inter-area routing.
- Wireless Networks:
- Substitute Ethernet links with wireless links to replicate OSPF in a mobile ad hoc network (MANET) or a wireless network.
- 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.
- 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.