# Minimizing the Number of Distrustful Nodes on the Path of IP Packet Transmission
## 4 Conclusions  
To increase packet routing security in IP networks, we have divided routers into two types. Routers of the first type have no negative warnings about their use and are included in the transmission paths on common principles. The reputation for the safe use of the second type of routers (distrustful routers) is suspect. We are unsure as to whether they will violate security rules or not, to prevent unauthorized access and the interception of  
Figure 17: The shortest path tree, according to the modified [PERSON] algorithm.  
data. The reason for such a hypothesis can, for example, be related to the organizational subordination or the location of the router. We proposed that the presence of distrustful nodes, if they exist, will be taken into account when forming routing tables.  
The number of hops in the path was used as a metric to obtain the shortest path trees. An algorithm has been developed that ensures obtaining a path that will pass only through trustful nodes, if such a path exists. If there is no such path, the path will have the minimum possible number of distrustful intermediate nodes. Of course, there must be a fee for this, which is an increase in the length of the path.  
The proposed approach is based on the well-known and widely used computer networks [PERSON]'s algorithm for constructing a tree of shortest paths. By choosing the number of hops as an optimization criterion, it was possible to solve the problem of minimizing the use of untrusted nodes for passing packets, only by changing the input data for [PERSON]'s algorithm, as well as the corresponding processing of the output data, to obtain the metric of the found paths. This approach is conclusive in the correctness of the modified resulting trees, since they are constructed according to the classical [PERSON] algorithm. The given examples for different types of networks (small, medium, and large) and different locations of unreliable nodes (in the center and at the edges of the network) demonstrate the correctness of changing input and output data using the proposed approach.  
The proposed approach can be used both in fully distributed mode and also in centralized mode. The centralized mode can be achieved in a WAN, managed using the principles of software-defined networking. The distributed mode is used in step-by-step routing, in which each router creates, maintains, and uses its routing table. The results of the modified algorithm indicate the potential effectiveness of its application in real Internet Autonomous Systems.  
Note that the advantage of the proposed solution is the simplicity of its software implementation. This will positively affect the performance of routers when they create and rebuild routing tables during operation.  
In further research, we plan to focus on improving an algorithm that will use another metric when obtaining shortest path trees.  
Conceptualization, K.O.; methodology, K.O. and O.T.; software, O.T.; validation, K.O., O.T. and Y.S.; formal analysis, K.O.; investigation, O.T. and Y.S.; writing--original draft preparation, K.O. and O.T.; writing--review and editing, K.O., O.T. and Y.S.; visualization, O.T.; supervision, K.O.; project administration, K.O. All authors have read and agreed to the published version of the manuscript.  
This research received no external funding.  
All data analyzed in this paper are in the paper.  
The authors declare no conflicts of interest.