To simulate Fisheye State Routing (FSR) protocol is a proactive (table-driven) routing protocol utilized primarily within mobile ad hoc networks (MANETs). It minimizes control overhead by using the “fisheye” method, in which a node conserves exact distance and path data regarding the close nodes, even though progressively less detailed data is conserved for farther nodes.
This protocol is helpful within scenarios in which scalability is vital since it reduces the overhead associated with conserving routes for distant nodes.
The following is a step-by-step instruction on how to replicate FSR (Fisheye State Routing) protocol projects within OMNeT++ utilizing the INET framework. Because INET does not offer an out-of-the-box execution of FSR, we will require to execute the FSR routing logic manually, or incorporate it into the simulation by prolonging the existing protocols.
Steps to Simulate FSR Protocol Projects in OMNeT++
Step 1: Install OMNeT++ and INET Framework
Make certain that OMNeT++ and the INET framework are installed on the system. INET framework offers the essential modules for replicating wireless networks, mobility, and basic routing that will form the foundation for executing FSR.
- Download OMNeT++: OMNeT++ official website
- Download INET Framework: INET Framework
Step 2: Understand the FSR Protocol
FSR operates by periodically exchanging routing data among the neighbouring nodes. The fisheye method minimizes the frequency of exchanges for distant nodes that permits for more effective use of bandwidth and processing power. It depends on a gradient of accuracy: routes to close nodes are updated more often than routes to distinct nodes.
Key aspects to implement:
- Link-State Information Propagation: Nodes are exchange link-state information with their neighbours.
- Distance Vector Updates: The fisheye method is applied to distance vectors in which updates for closer nodes are more frequent.
- Routing Table Maintenance: For each node conserves a routing table that stores distance and next-hop information.
Step 3: Set Up the Network Topology in the NED File
Describe the network topology for the MANET, which will use the FSR protocol. Here’s a basic instance of a network with several mobile nodes, which communicate using the FSR protocol:
network FSRNetwork
{
submodules:
mobileNode[10]: WirelessHost { // 10 mobile nodes using FSR
@display(“p=100,100”);
}
}
In this example:
- The network has 10 mobile nodes, each of which will utilize the FSR protocol for routing.
Step 4: Configure Mobility and Wireless Settings in omnetpp.ini
To mimic a realistic ad-hoc network, allow node mobility and wireless communication within the omnetpp.ini file:
[Config FSRSimulation]
network = FSRNetwork
sim-time-limit = 1000s
# Mobility model (Random waypoint for MANETs)
*.mobileNode[*].mobility.typename = “RandomWaypointMobility”
*.mobileNode[*].mobility.speed = uniform(1mps, 10mps) # Speed range
*.mobileNode[*].mobility.startPosition = uniform(0m, 1000m)
# Wireless settings (2.4GHz Wi-Fi band, typical for ad-hoc networks)
*.mobileNode[*].wlan[0].radio.transmitter.communicationRange = 250m # Communication range
Step 5: Implement the FSR Protocol in OMNeT++
Since FSR is not directly obtainable in INET, we require to execute the FSR routing logic manually by expanding INET’s existing routing infrastructure. We will be made custom routing classes for FSR.
Here is an outline of how we might execute FSR in C++:
- Routing Table: Each node conserves a routing table with distance and next-hop data.
- Periodic Updates: Nodes are occasionally exchange routing updates with their neighbours.
- Fisheye Mechanism: For close nodes, routing updates are more frequent; for distant nodes, they are less frequent.
Step 5.1: Define the FSR Routing Table
Make a data structure for the FSR routing table. This table will be stored the link-state data for close nodes and the progressively less detailed information for distant nodes.
class FSRRoutingTable {
public:
struct RoutingEntry {
int destination; // Destination node
int nextHop; // Next hop node to reach destination
int distance; // Distance to the destination node
simtime_t lastUpdate; // Timestamp of the last update for this entry
};
std::map<int, RoutingEntry> table; // Routing table: key is the destination node
void updateRoutingEntry(int destination, int nextHop, int distance, simtime_t lastUpdate);
RoutingEntry* getRoutingEntry(int destination);
};
Step 5.2: Implement the Periodic Routing Updates
Execute the periodic update process where each node transmits its current routing table to its neighbours. We can be used OMNeT++’s Message for the periodic update timer.
class FSR : public cSimpleModule
{
protected:
FSRRoutingTable routingTable;
cMessage *routingUpdateTimer; // Timer for periodic routing updates
virtual void initialize() override {
// Initialize the routing update timer
routingUpdateTimer = new cMessage(“FSR Routing Update Timer”);
scheduleAt(simTime() + par(“updateInterval”).doubleValue(), routingUpdateTimer);
}
virtual void handleMessage(cMessage *msg) override {
if (msg == routingUpdateTimer) {
sendRoutingUpdate();
scheduleAt(simTime() + par(“updateInterval”).doubleValue(), routingUpdateTimer);
} else {
handleIncomingMessage(msg);
}
}
void sendRoutingUpdate();
void handleIncomingMessage(cMessage *msg);
};
Step 5.3: Apply the Fisheye Mechanism
Change the frequency of routing updates according to the distance to the destination. Nodes nearer to the present node will be received more frequent updates, even though distant nodes will receive less frequent updates.
void FSR::sendRoutingUpdate() {
for (auto &entry : routingTable.table) {
if (entry.second.distance < thresholdDistanceForFrequentUpdates) {
// Send frequent updates for nearby nodes
sendUpdateToNeighbors(entry);
} else {
// Send less frequent updates for distant nodes
if (simTime() – entry.second.lastUpdate > par(“longUpdateInterval”).doubleValue()) {
sendUpdateToNeighbors(entry);
}
}
}
}
Step 6: Simulate Traffic in the MANET
We can mimic traffic among the nodes utilizing TCP or UDP. Here’s an instance of how to generate UDP traffic among the nodes:
# UDP traffic between nodes in the FSR network
*.mobileNode[0].numApps = 1
*.mobileNode[0].app[0].typename = “UdpBasicApp”
*.mobileNode[0].app[0].localAddress = “10.0.0.1”
*.mobileNode[0].app[0].destAddresses = “10.0.0.2”
*.mobileNode[0].app[0].messageLength = 1024
*.mobileNode[0].app[0].sendInterval = 1s
*.mobileNode[0].app[0].startTime = 5s
*.mobileNode[1].numApps = 1
*.mobileNode[1].app[0].typename = “UdpBasicApp”
*.mobileNode[1].app[0].localAddress = “10.0.0.2”
This configuration sets up UDP traffic between mobileNode[0] and mobileNode[1].
Step 7: Run the Simulation
When the FSR protocol is executed and the network topology and traffic simulation are configure:
- Build and compile the project in OMNeT++.
- Run the simulation through the OMNeT++ GUI or command-line interface.
- Monitor the behavior of FSR: Utilize OMNeT++’s GUI to monitor packet forwarding and the fisheye-based routing updates.
Step 8: Analyze Simulation Results
After running the simulation, OMNeT++ generates .sca and .vec files are encompassing detailed simulation parameters. We can investigate significant parameters like:
- Packet delivery ratio: The ratio of effectively delivered packets to the number of transmitted packets.
- Routing overhead: The overhead launched by FSR routing updates.
- End-to-end delay: The time taken for data packets to navigate the network from source to destination.
- Scalability: How FSR executes as the network grows in size and traffic increases.
Step 9: Advanced Features and Optimizations
We can expand the FSR simulation with additional aspects:
- Mobility Models: Insert more complex mobility models, like GaussMarkovMobility or LinearMobility.
- Link Failure Scenarios: Replicate link failures and monitor how FSR manages network topology changes.
- QoS Enhancements: Execute Quality of Service (QoS) aspects to prioritize particular kinds of traffic within the network.
This essential method, supported by instance coding for FSR protocol projects, was simulated and analysed through OMNeT++ simulation tool, and further specifics will be offered in another manual. phdprime.com provide performance analysis services tailored to your project needs, so please keep in contact with us for personalized support. For optimal results in FSR Protocol Projects utilizing OMNeT++ simulation, reach out to phdprime.com. Our team specializes in Software Defined Networking (SDN).