Network Simulator with Schematic for Routing Protocols

 This is the help document for GTNS (Game Theoretic Network Simulator).

Introduction:

GTNS is a discrete-event network simulator primarily designed for research and educational purposes but it can be used for any other  purposes as well. It is implemented in the Visual C++ programming language and supports various network topologies. The initial development of this simulator focused on implementing the Locally Multipath Adaptive Routing (LMAR) protocol, which is a novel reactive distance vector routing protocol for Mobile Ad hoc Networks (MANETs). LMAR enables the discovery of ad-hoc paths free from selfish nodes and wormholes by employing an exhaustive search algorithm that operates in polynomial time. Additionally, in the event of primary path failure, LMAR can identify an alternative safe path as long as the network graph remains connected after eliminating selfish/malicious nodes.

The distinguishing feature of LMAR is its searching algorithm and flooding stage, which generate equi-loaded traffic compared to single-path routing protocols. However, LMAR's security efficiency in bypassing attacks surpasses that of other multi-path routing protocols. The concept of LMAR introduces the security feature of availability, and a simulator has been developed to analyze its behavior in complex network environments [1]. Furthermore, the simulator has been enhanced with a detection mechanism capable of identifying selfish nodes within the network. The proposed algorithm is resilient against collisions and can be employed in networks where wireless nodes utilize directional antennas. It also defends against attacks involving malicious nodes attempting to disrupt communications by relaying packets in a specific direction.

GTNS incorporates several game theoretic strategies to promote cooperation within the network. Examples of these strategies include the Forwarding-Ratio Strategy, TFT-Strategy, and ERTFT. This tutorial aims to assist new users in becoming familiar with GTNS and running different network scenarios.

Getting Started with GTNS:

After building GTNS simulator source code, you can run and see the following window:

Figure 1: GTNS simulator environment

Network-Router:

To create your own network, follow these steps:

By following these steps, you can customize your network and adjust the parameters according to your requirements.

Figure 2: Network-Router button

Figure 3: Network-Router-Self-Generate button

Figure 4: A Sample Network Topology Created by Adding 5 Nodes in the GTNS Environment

Figure 5: Editing node parameters by clicking on any node on the screen

Creating Links between nodes in GTNS:

As seen in Figure 6, you can add links between nodes by clicking on the "Network-Link-Self-Generate" button. This will connect all nodes within each other's coverage range with a full-duplex link.

Additionally, you can manually add links between any two nodes in the network by clicking on "Network-Link-Add." Figure 7 illustrates the different parameters that can be modified by clicking this button. You can select the two routers you wish to link, specify the frequency, and set the duplicity of the link. It is also possible to create wormhole links between nodes that are not within each other's coverage range. During simulation, you can add or delete specific links between any two nodes in the network.

Figure 8 showcases a sample topology created using the "Link-Self-Generate" button.

Figure 6: Adding links between nodes in GTNS simulator

Figure 7: Different parameters that can be changed by clicking Link-Add button

Figure 8: A sample network created by adding self-generate links between 10 nodes in GTNS

Adding Traffic to network:

As shown in Figure 9, you can add traffic between any two nodes in the network by clicking on "Network-Traffic-Add." Figure 10 displays the different parameters that can be modified when adding traffic between a source and destination node in the network. You have the option to select the routing protocol and specify the start time of traffic sparks.

Figure 9: Adding traffic to the network

 

In GTNS, you have the option to add random traffic to the network. When you click on "Network-Traffic-Self-Generate-Ad-hoc," the window shown in Figure 11 will appear. In this window, you can specify the starting and stopping time for the generated random traffic, as well as the number of connections during this interval. Additionally, you can select the data traffic rate and choose from different protocols.

Figure 10: different parameters that can be changed during adding traffic between any two nodes

Figure 11: Different parameters that can be selected by adding random traffic in network


Simulation in GTNS:

To simulate the network created in GTNS, click on the "Simulation-Profile" button, as shown in Figure 12. This will open the Simulation window, where you can view the clock and events. Figure 13 provides an illustration of the Simulation window. You can adjust the simulation speed by moving the Master and slave speed buttons.

To start the simulation and observe the packet exchange within the network, click on the "Resume" button. As an example, let's consider a connection between node 1 and node 64. Once the simulation is running, node 1 will initiate the broadcasting of RReq packets. Figure 14 illustrates the broadcasting of RReq packets, with the color of the links turning blue as the RReq packets traverse them. Once the first RReq packet reaches its destination, node 64 will then broadcast RRep packets. Figure 15 showcases the broadcasting of RRep packets, with the links turning yellow as the RRep packets pass through them. 

Figure 12: A sample grid network topology and simulation button in GTNS

Figure 13: Simulation-Profile window

Figure 14: A sample grid network topology and broadcasting of RReq packets

Figure 15:  A sample grid network topology and broadcasting of RRep packets


Afterwards, node 1 sends the traffic towards node 64 by selecting the shortest path available in its routing table. The intermediate nodes then forward the traffic towards their first index entry, which represents the best path. In Figure 16, the purple line depicts the forwarding path from the source to the destination (note that this line will be overwritten by the return path of the ACK packet). On the other hand, the ACK packet follows the reverse path (indicated by the green line) back to the source. This is achieved by setting the reverse hop back to the source in the routing tables of the intermediate nodes. As a result, the green line representing the reverse path over-colors the purple line representing the forwarding path.

Figure 16: Established connection with the shortest path

How to get the results:

You can access various statistical results of the simulation by clicking on the Simulation-Statistic button, as demonstrated in Figure 17. Upon clicking, the Statistics window (Figure 18) will open, presenting different network parameters and statistics. For instance, you can observe the number of data packets forwarded by intermediate nodes in the "Data Trans. No" field. The fields "RReq Trans. No" and "RRep Trans. No" display the number of forwarded RReq and RRep packets, respectively. The "Gen. Data No. CN" and "Gen. Ack No. CN" fields show the number of generated data packets and Ack packets during the simulation.

Additionally, the Statistics window provides information such as the number of established connections, the total power of the network after simulation, the number of ad-hoc nodes, and the count of selfish nodes of type 1 and type 2. The system clock is also displayed in this window.

Furthermore, upon clicking the Simulation-Statistics button, the simulation results will be saved in the "my_file.txt" file. Figure 19 illustrates an example of this file, showcasing simulation results for various scenarios. 

Figure 17: Simulation-Statistics button in GTNS

Figure 18: The Statistics window which shows the simulation results created in GTNS

Figure 19: Simulation results written in my_file.txt in GTNS

 

REFERENCES:

[1] F. Farhat, M. R. Pakravan, M. Salmasizadeh, M. R. Aref, “Locally Multipath Adaptive Routing Protocol Resilient to Selfishness and Wormholes”, ISPEC 2010: 187-200.

Developed by Farshid Farhat