# Minimizing the Number of Distrustful Nodes on the Path of IP Packet Transmission
## 3 Results and Discussion
### Scenario A, with One Distrustful Node in a Small Network  
Consider the small network shown in Figure 2. Let node E be a distrustful node and node A be a router for which a shortest path tree must be constructed using the minimum hops criterion.  
Figure 1: Flowchart diagram of modified algorithm.  
To begin with, let us illustrate how the shortest path tree for node A (Figure 3) will look if we use the classic Dijkstra algorithm. Path channels without distrustful nodes are marked in green. Path channels with distrustful nodes are marked green on the path to the first distrustful node and red after it. The gray color is used for marking channels that are not included in the shortest path tree.  
As can be seen from Figure 3, a shortest path tree rooted at node A has two branches. One of them has only trustful nodes and it will transmit packets from node A to nodes C, B, F, and G. The other branch has the distrustful node E in it, and the packets that will be transmitted from node A to nodes H and I will pass through this distrustful transit node.  
Now, to demonstrate the efficiency of the proposed method, let us look at the result of the shortest path tree (Figure 4), obtained using the modified algorithm, and compare it with the shortest path tree of the basic Dijkstra algorithm.  
The figure shows that the distrustful node E is now the end of the tree branch, so it is no longer transitive. So, thanks to our approach, the task was successfully solved. Node A can transmit packets to eight nodes, including the distrustful o  
Figure 4: The shortest path tree for node A, according to the modified Dijkstra algorithm.  
Figure 3: The shortest path tree for node A, according to classical [PERSON]’s algorithm.  
Figure 2: Network topology of a small network.  
E will not transmit packets to any other node, because it is at the end of the branch of the shortest path tree. Note that with the classical approach, packets were transmitted to two nodes, H and I, through the distrustful node E.  
The figure also shows that the paths to nodes H and I have changed. These paths are longer, but they bypass the distrustful node E. Increasing the weight of the path is the price we paid for obtaining the results of having no distrustful nodes on the path to all destination nodes.  
Moreover, let us see how the data in the routing tables will change when a distrustful node E appears in the network. Figure 5 demonstrates this for Router A (node A). All reachable destinations are in the field 'Destination network'. For clarity, examples of network IP addresses are marked in parentheses next to the router name. The 'Gateway' field contains the node adjacent to Router A, through which the shortest path passes. The number of hops is shown in the field 'Metric' and the last additional column illustrates the shortest path. The left part of Figure 5 shows the case when the paths and gateways are obtained using the classic Dijkstra algorithm, while on the right is the result of the modified algorithm for the case when Router E has become distrustful.  
A comparison of the data in Figure 5 shows that, when the distrustful node E appeared, for the destination H and I, Gateway B was replaced by Gateway C. The delivery path A\(\rightarrow\)B\(\rightarrow\)E\(\rightarrow\)H was replaced by A\(\rightarrow\)C\(\rightarrow\)D\(\rightarrow\)F\(\rightarrow\)H, and A\(\rightarrow\)B\(\rightarrow\)E\(\rightarrow\)H\(\rightarrow\)I was replaced by A\(\rightarrow\)C\(\rightarrow\)D\(\rightarrow\)F\(\rightarrow\)G\(\rightarrow\)I. As we can see in the paths obtained with the modified algorithm, the distrustful node E is not used as a transit.