How to Simulate Physical Topology Projects Using OMNeT++

To simulate a Physical Topology in OMNeT++ has needs to generate a network in which the nodes are manually interlinked using the certain links like Ethernet or wireless connections. The physical topology denotes the actual layout of devices, routers, and other networking components in a network. These kinds of topology are necessary for familiarizing the behaviour of data flows, bandwidth usage, and network performance.

Here’s a step-by-step guide to simulating a Physical Topology project in OMNeT++ using the INET framework.

Steps to Simulate Physical Topology in OMNeT++

  1. Install OMNeT++ and INET Framework:

Make sure OMNeT++ and the INET framework are installed and set up properly. The INET framework delivers the essential modules for describing and simulating physical network components like nodes, routers, and links.

  • Download and install OMNeT++.
  • Download and install the INET Framework.
  1. Define the Physical Topology in NED File:

Physical topology associates the nodes with actual physical links, like Ethernet or wireless connections. Here’s an instance of a basic physical topology that interlinked nodes in a star configuration:

network PhysicalTopology

{

parameters:

int numNodes = default(4);  // Number of nodes connected to a central router

submodules:

// Central router or switch

router: <RouterNodeType> {

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

}

// Define multiple network nodes (e.g., computers)

node[numNodes]: <NodeType> {

@display(“p=200+100*i,300”);  // Position nodes around the router

}

connections allowunconnected:

// Connect each node to the central router (star topology)

for i=0..numNodes-1 {

node[i].ethg++ <–> Eth100M <–> router.ethg++;

}

}

In this example:

  • numNodes describes the number of nodes associated to a central router.
  • router denotes the central router that handle communication among the nodes.
  • node[numNodes] represents the individual network nodes (e.g., computers).
  • Eth100M signify Ethernet links with a bandwidth of 100 Mbps.
  • The star topology associates each node to the central router.
  1. Define Node Types in NED:

We need to utilize the INET framework’s StandardHost and Router modules, or generate own custom node types depending on the environment.

Here’s an instance NED definition for the router and node types:

import inet.node.inet.Router;

import inet.node.inet.StandardHost;

module RouterNodeType extends Router

{

parameters:

@display(“i=device/router”);  // Use router icon for the central router

}

module NodeType extends StandardHost

{

parameters:

@display(“i=device/pc”);  // Use PC icon for network nodes

}

This describes the router and node types, each with a certain icon to distinguish among them visually.

  1. Configure the INI File:

In the omnetpp.ini file, describe simulation parameters, like IP addressing, traffic patterns, and simulation duration.

Here’s an instance omnetpp.ini configuration for simulating traffic among nodes:

network = PhysicalTopology

sim-time-limit = 50s   # Simulation time

# Configure IP addresses for the nodes and router

*.router.networkLayer.ipv4.address = “10.0.0.1”

*.node[*].networkLayer.ipv4.address = “10.0.0.x”  # Assign unique IP addresses to each node

# Configure TCP traffic between Node 0 and Node 1 via the router

*.node[0].numApps = 1

*.node[1].numApps = 1

# Define a TCP client on Node 0 and a TCP server on Node 1

*.node[0].app[0].typename = “TcpBasicClientApp”

*.node[0].app[0].connectAddress = “10.0.0.2”  # Node 1’s IP address

*.node[0].app[0].startTime = 2s

*.node[0].app[0].stopTime = 48s

*.node[1].app[0].typename = “TcpBasicServerApp”  # TCP server on Node 1

In this configuration:

  • Node[0] perform as a TCP client, sending data to Node[1], which is a TCP server.
  • The central router is set up with an IP address to route the traffic among the nodes.
  1. Simulate Traffic Using TCP or UDP:

We need to create traffic among nodes using either TCP or UDP protocols. Below is an instance configuration for replicating UDP traffic:

# Configuring UDP traffic from Node 0 to Node 1

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

*.node[0].app[0].destAddresses = “10.0.0.2”  # Destination IP address (Node 1)

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

*.node[0].app[0].packetLength = 1024B

*.node[0].app[0].sendInterval = uniform(1s, 2s)

*.node[0].app[0].startTime = 2s

*.node[0].app[0].stopTime = 48s

# Configuring Node 1 as a UDP sink to receive packets

*.node[1].app[0].typename = “UdpSink”

*.node[1].app[0].localPort = 5000

This creates UDP traffic from Node 0 to Node 1, routed via the central router.

  1. Run the Simulation:
  • Open OMNeT++ IDE, import the project, compile it, and execute the simulation.
  • Utilize Qtenv to envision the physical network topology and track packet transmissions among nodes.

During the simulation, traffic will flow through the physical links (Ethernet or wireless) defined in the topology.

  1. Analyse the Results:

OMNeT++ deliver detailed logs and statistical data that can be examined to measure network parameters. Metrics include:

  • Throughput: Evaluate the data transmission rate among nodes.
  • Latency: Assess the time delay among packet transmission and reception.
  • Packet Loss: monitor any packets that are dropped or lost in the period of transmission.

We need to utilize Plove or Scave to plot graphs and evaluate the outcomes like throughput and latency.

  1. Advanced Features (Optional):
  1. Routing Protocols: Utilize routing protocols such as OSPF or RIP to dynamically handle packet routing among nodes and routers.
  2. Wireless Connections: Replicate wireless communication by using Wi-Fi modules rather than Ethernet links, enabling nodes to interact wirelessly.
  3. Mobility Models: implement mobility models if we are replicating mobile nodes such as in a MANET or VANET.
  4. Energy Models: utilize energy models if simulating battery-powered devices, like in a wireless sensor network.

Example of Adding OSPF Routing:

# Enable OSPF routing for the router and nodes

*.router.ipv4.routingProtocol = “Ospf”

*.node[*].ipv4.routingProtocol = “Ospf”

This configuration permits an OSPF routing, enabling the router and nodes to enthusiastically discover routes.

Example of Wireless Communication:

To replicate wireless communication, replace the Ethernet links with wireless links in the NED file:

connections allowunconnected:

// Connect nodes to the router using wireless communication (Wi-Fi)

for i=0..numNodes-1 {

node[i].wlan++ <–> Ieee80211Nic <–> router.wlan++;

}

This utilizes Wi-Fi (IEEE 802.11) for wireless communication among the nodes and the router.

Summary:

  • Topology Definition: Utilize NED to describe the physical connections among nodes using Ethernet or wireless links.
  • Node Configuration: Utilize INET’s StandardHost or Router to signify network devices.
  • Traffic Simulation: Replicate interaction using TCP or UDP among the nodes.
  • Run and Analyse: Execute the simulation in OMNeT++, and evaluate the outcomes using built-in tools for parameters such as throughput, latency, and packet loss.

As shown above, we provided the detailed complete procedures to simulate the Physical Topology project which were simulated and analyse the outcomes using the tool of OMNeT++.

Visit phdprime.com to share your details, and we will provide you with top-notch guidance on Physical Topology simulations using the OMNeT++ tool for your projects. We specialize in various types of topologies and are committed to delivering exceptional research services promptly and affordably.

Opening Time

9:00am

Lunch Time

12:30pm

Break Time

4:00pm

Closing Time

6:30pm

  • award1
  • award2