Some features of computer network modelling in the OMNeT++ environment

There are many currently available tools for computer network simulation. However, all of these are intended for use by network engineers and are not designed for research tasks. Such simulation models have insufficient flexibility and degree of parameter variability to be used for research purposes. Here, it is proposed to create a simulation model for modern computer networks which allows for the research experimentation. It is proposed to use one of the open packages available which facilitate computer network simulation modelling (for example, OMNeT++) as a base platform. Open-architecture packages allow the researcher to create specialized simulation models. With the help of models created specifically for the needs of research, it will be possible to conduct properly rigorous experiments. This paper utilizes one of the existent implementations of the Barabashi-Albert model for generating computer network topologies. This simulation model can be run and tested within the OMNeT++ discrete event simulator.

The following study demonstrates just how large a network can be. In 2003, Barrett Lyon launched a project whose goal was to show how complex and voluminous the structure of the World Wide Web was [5]. Figure 1 shows one of the images created for this project. Each point represents an IP address, the distance between these points represents the delays and the color coding represents geographical location. [6].

Figure 1. World Wide Web visualization example
At first glance, such networks seem random, but in 1999, Albert-László Barabási and Réka Albert found that this was not the case. In their study [7], they analyzed various large networks: the World Wide Web, the Internet, air traffic networks, citation networks, etc. And they found that all these networks were quite similar and share the following property: most of the links are concentrated among a small number of nodes. Such networks were called scale-free.
The simulation of computer networks is usually achieved using simulation modeling, and to be more precise, discrete-event modeling. Discrete event modeling is based on the processing of a chronological sequence of events, created by the system, which causes the system to change its state. In computer networks, such events are packets that cause device activity (packet processing). Currently, there are quite a large number of different computer network simulators, but these all assume that the network topology is known in advance. In the case of large networks, such as the Internet, the researcher must either abandon this concept entirely or manually create such a networka very time-consuming task. In order to solve this problem, it was decided to create a system that automatically creates a large network.

Related works
A number of papers are devoted to a comparative analysis, and the optimal choice, of computer network modeling systems. In [8], the author is at pains to make an informed analysis and selection of telecommunications systems modeling environment. As a result, the author makes a choice in favor of OMNeT++.
Another paper [9] describes the advantages of the OMNeT++ environment for modeling arbitrary network structures.
Also, a number of papers are devoted to the creation of new elements for the OMNeT++ modeling environment.
In [10], [11], the authors present an overview of the theory behind the EIGRP routing protocol. The main contribution made is the new OMNeT++ modeling module, which simulates the implementation 3 of the Cisco EIGRP protocol, based on the available specification and the results of reverse engineering. The paper presents a simulation and related results in order to demonstrate consistency with the Cisco IOS reference implementation.
The article [12] describes the Babel dynamic routing protocol and its implementation as a simulation model within OMNeT++. A new simulation model is developed and implemented that simulates the behavior of a complete Babel implementation for OMNeT++. In addition, the accuracy of the simulation results are verified, taking into account the real basic indicators of the wired network. The Babel simulation model developed is also a tool which can be used in future work. It is planned to include this model in the official release of INET.
The paper [13] presents the structure which has been implemented within the OMNeT++ simulator to facilitate the implementation of routing protocols in a flexible way. The framework divides opportunistic routing into four main stages and abstracts these as virtual functions. Some other functions which are used by most flexible routing protocols are also included in the framework. Using this framework, two flexible routing protocols are implemented: ExOR and MORE. The performance of ExOR and MORE is analyzed and simulated in detail. Situations in which opportunistic routing may be advantageous compared to traditional MANET routing mechanisms are demonstrated. A detailed comparison is made between some of the most representative opportunistic (ExOR and MORE) and proactive (OLSR) routing protocols. This comparison is based on two common implementations of the protocols with both conditional and geographical routing.

Models of scale-free networks
There are several models used for scale-free networks.
The Barabashi-Albert [7] model is based on two ideas: the growth of the network and the principle of preferred connection. The growth of the network implies the constant appearance of new nodes which are connected to the already existing ones. The principle of preferred joining implies that the probability with which a new node joins another node depends on the degree of the latter node.
The fitness model [14] is based on the idea of a fitness indicator for each node. In the case of computer networks, various parameters, such as geographic location and accessibility, can serve as an indicator of suitability.
The Bianconi -Barabashi [15] model is based on both the fitness model and the Barabashi -Albert model. When connecting new nodes, the degree of the node and the fitness indicator are taken into account. As a result, the Barabashi-Albert model was chosen for its ease of implementation and synergy with real networks.
Below is a comparative table of the three models.

The main criterion for joining
Node rate Fitness score Node rate, fitness score Summing up, we can say that at the moment there is no model that is similar in all respects to real computer networks. For all the models listed there are drawbacks, but the most widely suitable is the Barabashi-Albert model. Compared to the others, it is relatively simple (this is not the case with models using the fitness coefficient) and it has sufficient similarity to real networks.

Design and Implementation
For creating networks using this (the Barabashi-Alber) model, the following primitives will be used:  Target device (Host) -a node with one connection;  Router -a node with several connections; and  Link -to connect nodes. It is worth noting again that one of the ideas of the Barabashi-Albert model is the constant growth of the network. However, it is not possible to provide a network with this property when describing it using the built-in OMNeT++ language NED (NEtwork Description) -which does not allow for the creation of modules during simulation. Therefore, it was decided to allow a simplification. The network will grow until the number of devices in it becomes equal to a certain number predetermined by the user. Also, the initial number of nodes in a network will always be two.
According to the official documentation [16], the creation of your own module involves the following actions:  the creation of a class describing the module; the class must be inherited from omnet::cModule;  overriding the virtualvoidinitialize() method, in which you need to implement the required functionality;  registering your module in OMNeT ++ using the DefineModule(<name>) macro. In the course of development, it was found that the INET Framework initializes components in several stages. Since the manual creation of modules violates the internal initialization order of OMNeT++, it is necessary to override the virtualboolinitialize(intstage) method, thereby adding initialization support to the module in several steps. Then, it is necessary to skip the initialization of all network modules, create a network according to the selected model, add modules and channels to the network to communicate with each other, and finally initialize them.
Creating a network which accords to the Barabashi-Albert model involves a number of steps:  the creation of an adjacency matrix in which all links between the modules will be stored;  the establishment of communication between the initial nodes;  the adding of a new node that joins the already existing ones according to the principle of preferred connection;  repeating step 3 until the number of nodes in the network becomes equal to the specified maximum number; and  the analysis of the resulting adjacency matrix, the adding of a module to the network (if the node has only one connection -it is considered the final device, otherwise, it is a router) and the connection between them (by the adjacency matrix). The realization of some of these steps is given below.

Testing
Further testing was performed on the software which was created. This testing was divided into two stages. 1) Generating the network and checking the correctness of its topology.
2) Checking the operability of the resulting network.

Network generation
As a test case, a network of 400 devices was created. This is presented in Figure 5.
As an example, below are several characteristics of Router298 in Figure 6. The Neighbor Table illustrates the physical connections of this router (Figure 7).    Table. The routing table illustrates the logical connections of this router. Also, to verify the compliance of the network with the topology created by the use of the Barabashi-Albert model, networks of 500, 750 and 1000 nodes were generated. The average path length in a network with the Barabashi-Albert topology is determined by the formula: where c -coefficient of proportionality; N -network size (number of nodes); l -average path length (hops).  Table. For the generated networks, we know N, and it is also possible to determine the average path length l. Further, by formula (1) it is possible to determine the coefficient of proportionality c. All these data are summarized in Table 2.  Table 2 it can be seen that the coefficient c is approximately constant. Differences begin only in the third decimal place. This indicates the correspondence of the generated networks with the Barabashi-Albert topology.

Generated network running
Next, simulations of the created networks were launched. To perform this simulation, each simulated computer was given the task of sending UDP packets to other computers on the network within 100 seconds. The simulation was successfully launched and completed, which indicated that the network files were being created correctly.

Conclusion
In this paper we have presented an overview of several models for scale-free networks. What we believe was a balanced choice was also made in favor of the Barabashi-Albert model.
The process of creating a simulation model for generating computer network topologies that implement the Barabashi-Albert algorithm is also described. We introduce a test of the health of the generated simulation model in relation to this topology.