How to Start Ad Hoc Protocols Projects Using OMNeT++
To start ad hoc protocols in OMNeT++, we require to adhere these steps to replicate the AODV, DSDV, OLSR, DSR, OLSR, RIP, or other routing protocols according to the type of ad hoc protocol. OMNeT++ is an effective and adaptable tool to replicate diverse ad hoc protocols, and we also can be prolonged it by executing the own protocols.
Below is a sequential approach to start an ad hoc routing protocol project using OMNeT++:
Steps to Start Ad Hoc Protocols Projects in OMNeT++
- Install OMNeT++ and INET Framework
Before diving into ad hoc protocols, we require to replicate the OMNeT++ and the INET Framework that offers simple network models and protocols with ad hoc network models.
Installing OMNeT++:
- Download OMNeT++: We should download the new version of OMNeT++ environment on the system.
- Install OMNeT++ adheres to the platform-specific guidance. Normally it contains:
- Unpacking the downloaded files.
- To configure the environment variables like PATH for Windows or ~/.bashrc for Linux.
- Executing the generate command for OMNeT++.
Installing INET Framework:
- Clone INET:
git clone https://github.com/inet-framework/inet.git
cd inet
- Build INET:
./configure
make
- Link INET with OMNeT++: Make sure that OMNeT++ environment can get into INET framework by configuring the INET variable within OMNeT++ settings.
- Understand Ad Hoc Routing Protocols
Ad hoc routing protocols are designed for mobile networks in which the network topology is dynamic, and the routing protocols have to adjust the modifying network. The general ad hoc protocols contain following protocols like:
- AODV (Ad Hoc On-Demand Distance Vector): It is a reactive protocol, which constructs routes upon request.
- DSDV (Destination-Sequenced Distance Vector): A proactive protocol in which routes are updated occasionally.
- OLSR (Optimized Link-State Routing): A proactive protocol frequently utilised in mobile ad hoc networks.
- DSR (Dynamic Source Routing): Make use of source routing reactive protocol, which constructs routes upon request.
- TORA (Temporally Ordered Routing Algorithm): A highly adaptive and loop-free protocol.
- Check for Existing Ad Hoc Protocol Implementations
The INET Framework within OMNeT++ environment contains several routing protocols however we may need to prolong them or execute one.
Common Routing Protocols in INET:
- AODV and DSDV are already contained within the INET framework. Correspondingly these are reactive and proactive protocols.
- OLSR, DSR routing protocol and others are probably available within certain OMNeT++ repositories or as community projects.
- Create the Network Topology Using NED Files
When we have to choose the protocol we’ll utilise then make the NED files describing the network topology. These files describe the network modules such as nodes, routers, and so on and its connections.
Example NED File for AODV Network:
Following is an instance illustrates how to make a network topology including five nodes with the help of AODV routing protocol:
network AdHocNetwork {
submodules:
node1: AdHocNode {
@display(“p=100,100”);
}
node2: AdHocNode {
@display(“p=200,100”);
}
node3: AdHocNode {
@display(“p=300,100”);
}
node4: AdHocNode {
@display(“p=200,200”);
}
node5: AdHocNode {
@display(“p=300,200”);
}
connections:
node1.wlan++ <–> node2.wlan++;
node2.wlan++ <–> node3.wlan++;
node3.wlan++ <–> node4.wlan++;
node4.wlan++ <–> node5.wlan++;
}
Above basic example associates five nodes within an ad hoc network. Each node contains a wireless LAN interface (wlan++), and the nodes are linked to each other. We can be prolonged this topology to insert additional nodes and connections.
- Configure the Simulation Using the INI File
The INI file has configuration settings like the protocol settings, network metrics, and statistics collection for the simulation.
Example INI File for AODV Network:
network = AdHocNetwork
sim-time-limit = 100s
# Routing Protocol: AODV
*.node1.routingProtocol = “AODV”
*.node2.routingProtocol = “AODV”
*.node3.routingProtocol = “AODV”
*.node4.routingProtocol = “AODV”
*.node5.routingProtocol = “AODV”
# Enable packet tracing and statistics recording
*.vector-recording = true
*.scalar-recording = true
*.record-eventlog = true
# Wireless parameters
*.node*.wlan.transmitPower = 0.01W
*.node*.wlan.transmitRange = 250m
This set up:
- Describes the AODV is routing protocol for every node.
- It allows scalar recording for overall statistics and vector recording for own node parameters.
- For the wireless LAN interfaces, sets up the transmit power and transmit range.
- Implement or Modify the Protocol Logic (if needed)
If we are utilising an existing protocol such as AODV or DSDV then we need not be utilise this step. But, if we require executing the custom protocol or changing an existing one then we will want to:
- Script the C++ code to describe the routing protocol’s behavior.
- Change or make new message types, routing tables, and protocol logic like route discovery, maintenance, and deletion.
Example: for route discovery, AODV has route request (RREQ) and route reply (RREP) messages along with the route maintenance logic once network topology modifies.
- Build and Run the Simulation
When the network topology and configuration are set then we can be constructed and executed the simulation.
- Compile the Simulation:
- Select Build Project to execute the code in OMNeT++ IDE.
- In the terminal, we can execute:
make
- Run the Simulation:
- In Cmdenv (command-line) mode, we can execute the simulation:
./run -u Cmdenv
-
- Or make use of Tkenv for a graphical simulation:
./run -u Tkenv
- Monitor the Output:
- Observe the scalar and vector output for performance parameters such as packet delivery ratio, routing overhead, energy consumption.
- OMNeT++ environment support to transfer the result into external tools such as MATLAB, Python, or Excel for advanced analysis.
- Experiment and Analyze the Results
OMNeT++ environment offers numerous tools for observing and analysing the simulation outcomes:
- Scalar statistics deliver entire performance parameters such as average packet delivery ratio, average delay, and throughput.
- Vector statistics permit packet reception times and routing updates for further in-depth analysis.
- Envision the parameters over time with the help of OMNeT++’s plotter or external tools.
- Extend and Customize
When the basic simulation is function then we can:
- Experiment with different network sizes: Experiment how the protocol measures within large networks.
- Add mobility: Incorporate the mobility models such as Random Waypoint or Gauss-Markov replicating node movement.
- Compare different protocols: We need to equate the various protocols such as AODV including DSR, DSDV, or OLSR for examining its performance under various scenarios like high mobility, varying node density.
Over this demonstration, we have entirely explained the simulation steps which are crucial for replicating and analysing the Ad Hoc Protocols projects using OMNeT++ tool. More innovative approaches will be included in another manual on this topic.
We provide a range of project ideas and topics related to Ad Hoc Protocols using OMNeT++. For more information, please stay connected with phdprojects.org. We guarantee timely results accompanied by thorough explanations. Our team is equipped to replicate various routing protocols, including AODV, DSDV, OLSR, DSR, and RIP, tailored to meet your specific project requirements.