To simulate a Star Topology in OMNeT++ has needs to generate a network setup in which all nodes are associated to a central hub or switch. The star topology is a usual model in the network architecture in which all the communication passes via the central node like a switch, router, or server. Stay in touch with us we do guarantee good simulation and research topics as per your interested area.
Here’s how you can simulate a star topology in OMNeT++:
Steps to Simulate a Star Topology in OMNeT++:
- Install OMNeT++ and INET Framework:
Make sure that we have OMNeT++ installed along with the INET framework, that deliver networking protocols and models that will be helpful for simulating the star topology.
- Download and install OMNeT++.
- Download and install the INET Framework.
- Define the Star Topology in NED File:
A star topology can be defined in a NED file by describing a central node (hub) associated to multiple peripheral nodes.
Here’s an example NED file that defines a basic star topology:
network StarTopology
{
parameters:
int numNodes = default(5); // Number of nodes in the network
submodules:
// Central node (e.g., a router or switch)
centralNode: <CentralNodeType> {
@display(“p=200,200”); // Position of the central node
}
// Peripheral nodes connected to the central node
node[numNodes]: <PeripheralNodeType> {
@display(“p=300+100*i,400”); // Distribute the nodes in a star pattern
}
connections allowunconnected:
// Connect peripheral nodes to the central node
for i=0..numNodes-1 {
node[i].ethg++ <–> Eth100M <–> centralNode.ethg++;
}
}
In this example:
- centralNode is the hub (central switch or router) of the star.
- node[numNodes] signifies the peripheral nodes associated to the central node.
- The ethg++ is the Ethernet gate for each node, and Eth100M signify the Ethernet link with a bandwidth of 100 Mbps.
- Create Node Types in NED:
Describe the central node (e.g., a switch) and peripheral nodes (e.g., computers or devices). We utilize the StandardHost module delivered by the INET framework for both the central and peripheral nodes.
Example:
import inet.node.inet.StandardHost;
module CentralNodeType extends StandardHost
{
// This node represents the central switch or router
}
module PeripheralNodeType extends StandardHost
{
// These nodes represent the peripheral devices
}
- Configure INI File:
Set up the omnetpp.ini file to describe simulation parameters like duration, number of nodes, and traffic patterns.
Example omnetpp.ini configuration:
network = StarTopology
sim-time-limit = 10s # Simulation time
*.numNodes = 5 # Number of peripheral nodes
*.node[*].ppp[*].queue.typename = “DropTailQueue” # Queue type
*.node[*].ppp[*].queue.frameCapacity = 10 # Queue frame capacity
# Configuring traffic (ping) between nodes
*.node[*].app[0].typename = “PingApp”
*.node[*].app[0].destAddr = “centralNode”
*.node[*].app[0].startTime = uniform(0s, 1s)
- Create Application Modules:
Add application modules to create traffic in the network. For example we are using a PingApp to replicate communication among the peripheral nodes and the central hub.
Example PingApp configuration for peripheral nodes:
simple PingApp
{
parameters:
string destAddr;
double startTime = default(0s);
gates:
input pingIn;
output pingOut;
}
The PingApp will transmit ICMP ping requests to the central node (hub), replicate communication in the star topology.
- Run the Simulation:
- Open OMNeT++ IDE, import project, and compile it.
- Execute the simulation with the defined star topology.
During the simulation, we need to utilize OMNeT++’s Qtenv to envision the network topology, packet exchanges, and track parameters like throughput and delay.
- Analyse Results:
After the simulation, OMNeT++ generates statistics and logs that we can evaluate the performance of star topology, such as:
- Throughput: Assess the amount of data successfully routed among nodes.
- Latency: Evaluate the latency in packet transmission from the peripheral nodes to the central hub.
- Packet Loss: validate if there were any lost packets in period of the communication.
We also utilize the Plove tool to plot graphs or charts from the gathered data.
Summary:
- Define the Star Topology: Utilize NED to describe the central node (hub) and peripheral nodes.
- Create Traffic: Utilize applications such as PingApp to create traffic among nodes.
- Configure INI File: configure simulation parameters like traffic patterns, duration, and node behavior.
- Run and Analyse: execute the simulation in OMNeT++ and measure the outcomes for network parameters.
In this module, we deliver the information through the instruction regarding to the Star Topology project that were simulated using OMNeT++. Additional details regarding the Star Topology will also be provided.