2. Typical Routing Protocols for Ad Hoc Networks
Academic research on routing protocol algorithm in ad hoc networks began in the early 1980s. Many typical routing algorithms have been designed through unremitting efforts, such as table driven routing protocol which can lower transmission delay, on-demand routing protocol which can be established immediately when communication is needed, single path routing protocol and multipath routing protocol that can choose the best channel from the source to the destination [14-19].
2.1 Table Driven Routing Protocol
Destination-sequenced distance vector (DSDV, target sequence distance vector routing protocol) belonging to table-driven routing protocol, is also called proactive routing protocol. The shortest path is preferred in communication. Table-driven routing protocol has the characteristics of small delay, but high communication overhead. It can update adaptively and dynamically according to the network structure. In such routing protocols, every node should maintain a table that stores the path information linked to other nodes on its own. When changes occur in the network, such as new nodes joining, old nodes exiting or the location of nodes changing, the network topology will change. At this time, the affected network nodes need to update their routing protocol tables in time and transmit relevant message to involved nodes to maintain consistency, real-time and safety. DSDV routing protocol is suitable for bidirectional link communication, and maintains local routing data table in real time. It solves the problem of high frequency infinite computation, and avoids the generation of loops in data transmission in network.
DSDV routing protocol is suitable for small and medium-sized ad hoc networks. It can show its advantages when the network topology is stable and the nodes joining or leaving the network is not frequent. DSDV routing protocol can quickly generate routing for nodes, ensure delivering real-time messages, and meet the time-limited needs of the network. Based on the characteristics of DSDV routing protocol itself, this routing algorithm is not suitable for networks with frequent topological changes. Otherwise, it will cause problems such as high computing cost, high processing overhead and large bandwidth occupancy, which will seriously affect the network, thus reducing the availability of the network.
2.2 On-demand Routing Protocol
Two typical on-demand routing protocols are as follows.
2.2.1 DSR routing protocol
The basic principle of DSR is the establishment of communication links between source and destination nodes caused by data message sending requirements. It mainly consists of two parts: routing discovery and routing maintenance. In the network, each node maintains a local routing information table. Each entry in the table writes down the routing data to the reachable end in the network, including the IP address of the source, via nodes and the destination.
The source will first check whether there is a reachable path to the destination in its local routing table before sending data packets in the network, and if so, then attaches it to the head of the datagram. According to the established routing, the packets are forwarded to the destination with the help of related intermediate nodes. In the process of forwarding data, the intermediate nodes can establish routing information cache and route to the destination node for future communication with the destination node.
The working mechanism of DSR protocol can avoid the generation of communication loops in the network. Because the routing information contains the full routing path to the destination, the transit node does not need to take time to maintain the real-time changes in the network topology. Routing discovery plays an important role in DSR. If node S needs to transport packet to node D, and there’s no well-established routing path between two nodes, it needs to use routing discovery mechanism to establish the path.
DSR protocol has no independent routing maintenance operation. The protocol allows multiple data transmission paths in the network, and is suitable for asymmetric channel network environment. Because DSR protocol broadcasts messages by flooding mechanism when routing is established, conflicts will occur in the process of data transmission, and the routing information cached by each node may expire due to the lack of active maintenance process. In the process of sending datagram, the head of the datagram stores the corresponding routing information, which will occupy more channels. Based on the above characteristics, DSR protocol is more suitable for small and medium-sized networks.
2.2.2 AODV routing protocol
AODV is a common reactive routing protocol in ad hoc networks supplied by Perkins and Royer [7], which is proposed on the basis of DSDV protocol and the improvement of on-demand routing mechanism in DSR. The principle of AODV routing protocol is to establish routing between nodes on demand when datagram needs to be transmitted in the network. When communication is completed, the established routing is no longer maintained and the entries of control information are reduced, thus improving the efficiency of operation. This protocol effectively utilizes network resources, establishes routing on demand, and adapts to the characteristics of ad hoc network.
AODV routing protocol consists of routing discovery and routing maintenance. When a network node needs to transport data but has no right routing, the routing discovery is necessary.
To avoid data congestion in communication links, the source node needs to wait for feedback after sending RREQ messages to its neighbors. If the waiting time exceeds the preset time, it will retransmit the RREQ message.
The routing maintenance is mainly used to maintain the established routing in the network. AODV routing protocol monitors active routing by periodically sending Hello message frames in the network. Once a node finds that a link is not working, it should broadcast RERR packets to the relevant nodes on the affected link to inform them of the update or deletion of the routing information. The routing error frame RERR is sent in three ways. When RERR is forwarded, all network nodes associated with this invalid routing need to delete the corresponding routing entries in their local routing information table.
The operation of reconstructing routing occurs when the two following situations occur:
(1) When the sender accepts the RERR frame about a route, it can re-initiate the request to establish the route if there is still a need to transport message to the destination.
(2) When the intermediate node on a certain route forwards the packets to the destination node, the destination node is not reachable due to the problem of computing the routing time exceeding the preset time. It is necessary to store the received packets temporarily, and then re-establish the routing with the destination node by sending the RREQ message.
AODV routing protocol asks every node to maintain its own serial number in the network which is used to determine whether the routing information is expired.
AODV routing protocol adapts to the dynamic change of network structure, but the routing delay when establishing routing is large, the routing has a certain lifetime, and will be abandoned after the timeout. AODV routing protocol combines DSDV with DSR, and uses sequence number labeling to prevent routing outage or loops same as the former, while the routing discovery mechanism is formed by improving the latter.
4. Intelligent On-demand Routing Protocol for Ad Hoc Network
In ad hoc networks, every network node has dual roles. When routing messages and datagram are being transmitted, all nodes need to work with others in the network. A reachable path is the basic requirements of secure and reliable data transmission, and the security of routing protocols is very important to the availability of networks. Therefore, after identifying the nodes requesting to join the network, the effective routing between nodes is the fundamental guarantee for the safe transmitting of messages such as datagram in the network.
Adapting to the self-organizing characteristics of ad hoc wireless networks, AODV protocol is improved. A more secure and adaptive intelligent on-demand routing algorithm is designed, which actively, quickly and optimally establishes the path between nodes, and realizes the purpose of resisting illegal attacks against such routing protocols. Several technical points mainly guarantee security in this routing algorithm: key information hiding; the use of mathematically difficult functions; authorized users to obtain routing information. This routing protocol uses ID3 algorithm to test five attributes such as energy, computing power, speed, transmission distance, and data forwarding ability, so as to determine the best routing from the source to the destination. The private key of system is used to authenticate the network nodes identity in a distributed way, which gives a higher level of security.
4.1 Correlation Algorithm
4.1.1 Distributed authorization CA
In traditional networks, when a node joins the network, the authentication of identity legitimacy is completed by a specific authentication center, and the management authority is centralized. Because of the poor security of ad hoc network, if the centralized CA (certification authoring) is damaged, the whole network will fall into disorder, may be even on the verge of collapse. This scheme uses distributed CA mechanism to verify the validity of node identity.
In 1979, Shamir [21] first proposed the concept of secret sharing scheme. The implementation strategy of the scheme is to divide a secret into sub-secrets called secret shares and distribute. The secret shares to a participant. It takes the combination of any t secret shares to cooperate to recover the secret S, and the secret cannot be recovered with less than t secret shares. The value t is the threshold to acquiring the secret S. It has certain requirements for its value, which is called threshold.
Zhou and Hass [22] put the idea of secret sharing into the authenticating the identity of nodes the first time in 1999. In this management strategy, every node is regarded as a holder of the sub-secret to decentralize the authentication privileges and realize the distributed CA authentication of the identity legitimacy of the network nodes. The distributed CA signature authentication of the node certificate will not be realized until t nodes uses their own secret share to sign the certificate of the requesting node effectively and then synthesize the certificate through the algorithm when one node asks for authentication service to attend the network. Thus, the authentication of the identity of the node is completed.
4.1.2 Decision tree
In machine learning, decision tree is a prediction model with tree structure. Decision tree is mainly used for classification and regression, which can be used for supervisory learning. The main function of decision tree is to classify the samples by generating a classifier. When new objects appear, the classifier can classify them correctly. The advantage of decision tree is that it can evaluate the risk and judge the feasibility according to the occurrence probability of each attribute of the object.
Decision tree presents the attributes, attribute values and categories of nodes in a tree structure. There are three main symbols used in decision tree:
Rectangular box - decision node, if the decision is made up of multiple levels, there will be many intermediate decision nodes, but the root node is the final decision scheme. Each decision node is the best result of one decision.
Circle - state node represents the expected value of each scheme. By comparing the economic effects of each state node, the best scheme can be selected according to the predetermined decision criteria.
Line - probability branch, the number of branches from the state node indicates the quantity of possible states, while the number labeled on the branches is the probability of corresponding states.
Triangle - Result Node, the profit and loss value of each scheme in various situations is marked on the right side of Result Node.
The decision tree can intuitively reflect the characteristics of data, which is intelligent and easy to operate. So it is suitable for the construction of data transmission path between nodes in ad hoc network. This algorithm will use the idea of decision tree to realize the on-demand routing protocol reasonably and quickly.
4.1.3 ID3 algorithm
ID3 algorithm is a classification and prediction algorithm for decision tree supplied by Quinlan [23]. Based on information theory, through the calculation of information entropy and information gain, each time the attributes with high information gain are selected to divide, and the process is repeated until a decision tree can be generated which can classify training samples, so as to acquire the aim of data induction and classification.
The key of ID3 algorithm is to select the attributes with the largest information gain after splitting according to the attributes of information gain measurement. Two important concepts of information entropy and information gain are involved in the algorithm.
The basic idea of ID3 algorithm is as follows:
(1) Initialization of attribute sets and data sets.
(2) Calculate the information entropy S of data set and all attributes, and select the attributes with the greatest information gain as the current decision node.
(3) Update the data set and attribute set (delete the attributes used in the previous step, and divide the data set of different branches according to the attribute value).
(4) Repeat step (2) for each subset in turn.
(5) If the subset contains only a single attribute, the branch is a leaf node, marked according to its attribute value.
(6) Complete the partition of all attribute sets.
After comprehensive comparison, it is found that small decision trees are superior to large decision trees.
4.2 Intelligent Routing Decision Mechanism
The communication path between source node S and destination node D is established on demand. As the remarkable characteristics of ad hoc wireless network is that nodes move frequently and the topology is unstable, it does not cost much to maintain the routing to each node in the node. This intelligent routing decision mechanism considers the communication performance of each node before the node communicates, and chooses the best path according to the principle of decision tree, which greatly improves the effectiveness, reliability and security of communication.
4.2.1 Training samples for decision model
In this routing algorithm, five attributes of node energy, transmission distance, rate, credit value and computing power are selected as reference values. The training samples are obtained through continuous testing of five attribute values as shown in Table 1.
The algorithm refers to five attributes of the network node, each of which has a certain range of values, and sets a threshold, as shown in Table 2.
In this paper, the ad hoc network is regarded as a connected graph G = (S, C), where S is the set of network nodes and C is the set of communication links between network nodes within the communication range. Each network node is marked as [TeX:] $$n_{i}, n_{i} \in S, i=1,2,3, \ldots N,$$ the attribute set of the node is marked as [TeX:] $$A=\left\{a_{i}^{1}, a_{i}^{2}, a_{i}^{3}, a_{i}^{4}, a_{i}^{5}\right\}.$$
Whether a node in the network is selected as a routing node is determined by its attributes. Nodes that are selected as routing are positive-examples, and those that are not selected as routing are counter-examples. In order to measure the attribute purity of the routing node determined as forwarding data, entropy is introduced here:
In the formula, [TeX:] $$p_{i}$$ is the probability that attribute [TeX:] $$a_{i}^{j}$$ produces positive examples, and [TeX:] $$1-p_{i}$$ is the probability that attribute [TeX:] $$a_{i}^{j}$$ produces negative examples. If the entropy value is 0, then the sampling data is completely pure, and the attribute of the node can be used as the basis of division, without further segmentation; if the entropy value is not 0, it means that the sampling data is not pure and needs further segmentation.
Samples of relationship between node attributes and forwarding capability
Description of node attributes
In order to determine the node attribute that should be first partitioned, the maximum information gain is introduced. The information gain can represent the correlation between the attributes of nodes. The range of values is [0,1]. The calculation is based on formula (2):
In the formula, V is a subset of the values of node attributes [TeX:] $$a^{j},\left|A_{v}\right|$$ is the length of the subset, [TeX:] $$|A|$$ is the sample length, and [TeX:] $$H\left(A_{v}\right)$$ is the purity of the values of the attributes of node [TeX:] $$n_{i}.$$
Using formulas (1) and (2) synthetically, according to ID3 algorithm, the information gains of each node are calculated, and the branches with large information gains are selected to cycle back and forth until the end of the leaf. An intelligent decision tree is constructed to determine whether a network node has routing capability when creating a communication link, as shown in Fig. 1.
Routing node decision tree based on attributes.
4.2.2 Implementation of intelligent routing decision mechanism
When the identity of the node joining the network is authenticated, the topology construction of the Ad Hoc network is completed. Every node in the network must store the attribute value tables of all its one-hop neighbors, and the data in the tables will change dynamically as the network does of the network.
The intelligent routing decision protocol consists of two parts: Route Discovery and Route Main¬tenance, when the source node S is transmitting message to the destination node D.
4.2.2.1 Route discovery
The main task of routing discovery is to establish the routing for transmitting data packets in the channel. It also includes routing request sending (RREQ), routing request forwarding, routing reply sending (RREP) and routing reply forwarding operations. It mainly has two stages: route request and route response.
For the sake of improving the robustness of the network and resist the damage of irresistible anomalies to the network, two one-hop neighbor nodes are selected at a time. The routing request process is as follows:
(1) The source node S sends a RREQ packet that contains important information such as the IP addresses of the source and the destination. If node D is a one-hop neighbor of node S, then no decision-making is needed. The routing request message is sent directly to node D and the routing request ends. If two nodes are not adjacent, the next operation is performed.
(2) According to the locally stored node attribute table, the source node S calculates the information gain and selects the two nodes with the largest value as one-hop forwarding node. Assuming that node C and node E have the largest information gain, node S sends routing request messages to node C and node E.
(3) After receiving RREQ, node C and node E search whether there is information about destination node D in the locally stored node attribute table. If so, they send the routing request message directly to D. If not, they need to calculate the information gain of each neighboring node again, and then only select the node with the maximum information gain as forwarding nodes for the next hop. Assuming that the neighbor node with the maximum information gain of node C is F, and the neighbor node with the maximum information gain of node E is H.
(4) Nodes F and H repeat the above operation and select the nodes K and I with the largest information gain respectively.
(5) A jump neighbor of node F and H is found to be the destination node D by searching. If the parameters of node D can meet the basic communication requirements, the RREQ packet will be smoothly transmit to the target node D.
During the above operation, each intermediate node forwarding RREQ message needs to maintain and store the reverse route to the source node.
In the process of routing response, a time threshold RREQ_RETRIES of routing response needs to be preset, and the timeout will be regarded as no response. Therefore, the next hop node needs to be re-selected by the upper node.
The routing response process is as follows:
(1) After receiving RREQ, target node D examines the authenticity of the packet according to the principle of digital signature. If the message is validated, node D adds a new entry in its routing table to record the node information that sends the routing request message to it. It is assumed that node C and E are the last jump neighbors belonging to node D, and then node D conveys the RREP packet to the last hop neighbors C and E.
(2) Nodes C and E continue to send RREP to the node that forwarded the RREQ message to itself. The forward routing from itself to target node D is written down in the home routing table.
(3) Execute in turn until the routing reply message is forwarded to node S. The routing between the source node S and the target node D should be stored.
After completing the above work, the two communication routes between the source node S and the target node D are built completely. Considering the frequent dynamic changes of ad hoc network struc¬ture, for the sake of preventing the unexpected failure of routing in the process of message transmission, two paths are selected intelligently according to the decision tree to enhance the invulnerability and security of network transmission.
The process of establishing routing between source node S and target node D is shown in Fig. 2.
The routing table stored in the network node mainly contains the following fields: the IP address of the target node, the serial number of the target node, the effective flag bit of the destination node’s serial number, the IP address of the next hop node, the hop number of this node reaching the destination node, the precursor list, the lifetime (routing failure or deletion time), the network layer interface, other states and routing flags.
Each source node will increase its serial number by 1 before sending RREQ; when the target node obtains the RREQ packet, it will increase its serial number by 1 before sending RREP. When the source node gets RREP, it can judge whether to update the valid routing by comparing whether the serial number of the target node is increased or not.
The routing table stored by the node is composed of multiple routing entries. Each entry does not need to record all the node information of the routing, but only needs to mark the message of the next jump node. This can reduce the burden of generating the routing table and the maintenance cost. For an established routing, it is necessary to assign a sequence number as an identifier and store it in the source node and target node. In the later stage, the size of the sequence number can also be used to determine whether the routing is the latest.
IAODV route discovery diagram.
4.2.2.2 Routing maintenance
The core function of routing maintenance is the spontaneous monitoring of links between adjacent nodes by each node with strong ability. This routing algorithm adopts the method of intelligent control to manage the routing table. Routing maintenance operates differently in different network, mainly in the following two ways:
(1) If the quantity of mobile nodes in the network reaches 40%, it is unnecessary to maintain the routing table. When there is message transmission, it intelligently establishes the path between the source and the target node on demand.
(2) When the quantity of mobile nodes in the network does not match up 40%, AODV routing protocol is still used to send Hello message frames to one hop neighbor node periodically to monitor its activity. In the process of monitoring, if the node does not get the response message frame of the neighboring node in the specified ALLOWED_HELLO_LOSS* HELLO_INTERVAL millisecond time, it is considered that there is no path between the node and the neighboring node, and the path is deleted from the routing table directly and broadcast the message in the network. If it is found that the two attribute values of some nodes have reached the critical value, the broadcast node IP and the routing error frame RREP in the network will be deleted, and if there is a data transmission task in the future, the routing between the nodes will need to be re-established. If all the nodes on the path are in good condition and can continue to be competent for the transmission task, no updates will be needed, when the transmission is received, continue to use this path for data transfer tasks.
4.3 Simulation Experiment
For the sake of verifying the availability and validity of the intelligent routing algorithm (IAODV), in an environment where two attribute values of nodes are below the critical value of communication, NS2 is used to simulate the IAODV and AODV routing protocols. Fifty test nodes are placed in the ex¬perimental scenario. The main parameters tested are packet loss rate, packet delivery rate and routing overhead. The transmission delay per hop is set to 100 milliseconds. All the experimental results are obtained from the Trace file.
4.3.1 Packet loss rate
Packet loss rate mainly calculates the probability of unsuccessful delivery in the process of data transmission. There are many reasons for packet loss, such as attacks, selfish behavior of nodes or interference of wireless channels. The smaller the packet loss rate is, the higher the routing reliability is, and the better the routing protocol is. Fig. 3 is the test result of packet loss rate of IAODV routing protocol and AODV routing protocol. From the graph, it can be seen that the packet loss rate of IAODV routing protocol is less than that of AODV routing protocol. This is mainly because the route of IAODV is achieved by evaluating each index of the node.
Packet loss rates of IAODV and AODV routing protocols.
4.3.2 Packet delivery rate
Packet delivery rate is a key to estimating routing protocols as well. It comes from the result of calculating the ratio of the number of valid datagram received by the destination to the quantity of datagram transmitted from the source. If the packet delivery rate is high, it means that the probability of data message being lost is small, which indicates that the routing protocol is better. Fig. 4 is a comparison of packet delivery rates between IAODV and AODV routing protocols. The experimental demonstrates that the packet delivery rate of IAODV routing protocol is instable, but the overall performance of IAODV routing protocol is significantly better than AODV routing protocol. As can be seen from the results, the established routing improves the proportion of effective transmission of messages because it takes the ability of each node forwarding data into account based on intelligent decision tree selection.
Packet delivery rates of IAODV and AODV routing protocols.
4.3.3 Routing overhead
Finding effective routing requires bandwidth consumption. Routing overhead can be obtained by calculating the quantity proportion of sending routing messages to all data packets. The larger the proportion, the poorer performance of routing protocols. Fig. 5 shows the respective routing overhead of IAODV and AODV routing protocols under the same amount of nodes in the network. The
Routing overhead of IAODV and AODV routing protocols.
experimental results evidently tell that the routing overhead of IAODV routing protocol is less than that of AODV routing protocol. This is mainly because IAODV routing protocol no longer consumes energy to maintain the network, but intelligently establishes communication links between nodes using on-demand strategy when the nodes in the network move too fast and the rigid topology changes frequently. Compared with AODV routing protocol, it significantly reduces unnecessary routing message sending, so the routing overhead is significantly lower than AODV routing protocol. Based on the above results, IAODV routing protocol is more applicable for dynamic Ad Hoc wireless networks.