## 3 Methodology
### Mobile Agent Technology  
Mobile agent technology offers very good results in quite a large number of implementations [72; 73; 74]. Mobile agent is a specific type of distributed software. Its goal is moving through the network and collecting information from the nodes. Leaving a node the mobile agent brings all changes detected in its host routing table. When a mobile agent comes to a new node, it shares the information on the previous nodes with a current routing table. It is obvious that the main problems in mobile agents' implementation are: the moment when an agent starts, its route and number of agents in the network are needed. For the purpose of this routing protocol we suggest using \(\backslash\)N agents (where N is the number of nodes). This number is a result of a lot of statistical analyses and represents an empirical value. A larger number of agents would provide faster data exchange but produces more traffic in the network, thus increasing the probability of blocking. \(\backslash\)N agents could be an optimal solution for a pretty large number of different network topologies. In the proposed algorithm agents don't have any specific time to start. They are moving through the network all the time, bringing and sharing information. The main problem in agent's usage refers to their moving path. We suggest Hopfield neural network [75] for finding the moving path in similar way as for solving the TSP problem (Traveling Salesman Problem). We propose the shortest path algorithm based on link cost [76] as a metric in the model. Let us assume that cost dedicated to link between node \(i\) and node \(j\) is \(C_{ij}\). This parameter should be created automatically by modification of bandwidth link parameters \(B_{i,j}\) as: for (i=1; i<=N; i++) { if (B\({}_{i,j}\) -= 0) { C\({}_{i,j}\) = 0  
and information on that (information about the available bandwidth, load and links in use) should be delivered by mobile agents to all nodes. In this way the routing protocol can find an optimal route for every user based on really available network resources, so the network delays, as well as blocking probability (number of rejected packets) will be minimized. The proposed algorithm metrics is based on the two essential parameters: bandwidth and load. Two additional parameters: hop numbers and delay, are optional. In this way optimal usage of network resources, as well as possibility for guaranteed QoS should be achieved. The logic of proposed routing protocol is presented by the block scheme in Figure 7.  
The main idea is to divide routing protocol into two phases:  
1. As fast as possible association of a new user,
2. Finding the optimal route for a new user, considering its request. The first phase means that, according to the routing table, an optimal route to some of the available gateways has been previously calculated. If a new user wants to make a connection to the network it should send a request to the nearest node in the network (e.g., node 1, Figure 8). Figure 7: Algorithm of proposed routing protocol. Upon receiving this request, the routing algorithm should read the routing table in node A and find the previously calculated optimal route to the nearest gateway, Figure 8 (next gateway 4 has the minimal hop number 2, so it will be used in this case). The metrics explained in this case are based only on hop count, because this parameter is changing very rarely. The information on the selected route will be send to a new user and after that a connection to the Internet could be established. At the moment of connecting a new user, network topology as well as network parameters are changed. While_moving, mobile agents share these pieces of information with all nodes in the network. In the second phase activation of a parallel process for to the previous one, assigning a route to a new user is done, so the monitoring is addressed to new user's traffic needs and improving of the bandwidth utilization and load parameters on assigned links.