# An Improved Hybrid Routing Protocol Combining MANET and DTN
## 3 Proposed Protocol  
In the proposed protocol, a whole network is divided into fragmented networks based on the connectivity between nodes, which is similar to the works in Reference [13; 15; 16], and the concept of virtual source node was adopted, which was originally proposed in Reference [13]. In the proposed protocol, ad hoc on-demand distance vector (AODV) protocol is basically assumed for MANET protocol and it is extended for hybrid routing with DTN protocol. In original AODV protocol, route request (RREQ) messages are broadcast throughout the network from the source node and route response (RREP) messages are sent back to the source node from the destination node. Then, the source node delivers data to the destination node using the reverse path of RREP message. Route error (RERR) messages are broadcast if a link is broken to notify the loss of the link. In the proposed protocol, if RREQ message is not delivered to the destination node successfully within a predefined maximum number of hop counts and time-to-live (TTL), the last nodes in each routing path of the RREQ messages generates extended RERR (E-RERR) messages and these are broadcast. As shown in Figure 2, E-RERR message defines filed for E-RERR ID, source node ID of E-RERR, source node ID of REEQ, routing path of delivered RREQ, relay node ID of E-RERR, and delivery predictability of relay node with the destination node calculated based on PRoPHET protocol. The values of these fields are delivered to the source node in the E-RERR message. If E-RERR message is not received at the source node during a predefined timer value, RREQ messages are retransmitted. If there is no E-RERR reception after a predefined number of retries of RREQ message retransmission at the source node, the source node operates in DTN protocol. In the proposed protocol, f the source node receives E-RERR messages, it selects virtual source nodes based on Equation (1) as follows:  
\[N_{VS}=\left\{N_{i}\middle|P(N_{i},D)+\delta)P(S,D)\right\} \tag{1}\]  
where \(N_{VS}\) is set of virtual source nodes, \(N_{i}\) is the intermediate relay node \(i\), \(\delta\) is the delivery predictability threshold value, and \(P(A,B)\) is the delivery predictability of node \(A\) to node \(B\), which was originally defined in PRoPHET protocol [22]. In PRoPHET protocol, if two nodes contact each other, the delivery predictability increases and the value decreases as time passes on after the last contact. Thus, P(A,B) is calculated as follow:  
\[P(A,B)=P(A,B)old+(1-\Delta-P(A,B)old)\times\text{Pencounter}, \tag{2}\]  
\[P(A,B)=P(A,B)old\times\gamma^{K}, \tag{3}\]  
where P encounter, \(\Delta\), \(\gamma\), and K are a scaling factor to control the increasing rate of the delivery predictability after contact, a parameter limiting an upper bound of delivery predictability, an aging constant, and the number of elapsed time units after the last contact. The rationale behind the proposed selection of virtual source nodes, as defined in Equation (1), is to select more probable node to forward the message on behalf of the source node by comparing delivery predictability, where more favor is given to intermediate relay node than source node, in order  
Figure 2: Format of E-RERR (extended RERR). RREQ = route request. to promote the message dissemination. That is, if any intermediate relay node in the returning path of E-RERR message satisfies the condition of Equation (1), it is selected as virtual source. In the proposed protocol, multiple virtual source nodes can be selected if they satisfy Equation (1). In the proposed protocol, if a source node selects virtual source nodes, then it sends message to the selected virtual source nodes using the reverse path of received E-RERR messages. If a virtual source node receives message, it operates like an original source node. It firstly tries to deliver message using MANET protocol, but if it fails, it operates in DTN mode using store-carry-forward approach. Thus, it broadcasts RREQ message and E-RERR messages are returned to the source node.