# An Improved Hybrid Routing Protocol Combining MANET and DTN
## 3 Proposed Protocol
If there is no E-RERR message until the expiration of a predefined timer value, the source node tries to deliver message using DTN protocol. It periodically switches between MANET mode and DTN mode, and if message is successfully delivered to a destination node, it stops its operation. Figure 3 describes the operation of the proposed protocol. A source node broadcast RREQ messages but E-RERR messages are returned to the source node (Figure 3a) because routing path from the source node to the destination node is not successfully established. Then, virtual source nodes are selected based on the delivery predictability to the destination node and messages are forwarded to the virtual source nodes (Figure 3b). In this example, three nodes are selected as virtual source nodes. After that, selected virtual source nodes operates as original source node and forwards message to neighboring node when they contact another nodes by DTN protocol after movement, and the receiving nodes also move and contact another nodes (Figure 3c). Finally, the message is delivered from the virtual source node to a destination node after exchange of RREQ and RREP messages defined by MANET protocol (Figure 3d). Although the proposed protocol is similar to the HSBR protocol by using virtual source node [13], it is different from HSBR protocol. Basically, the proposed protocol is based on AODV protocol for MANET protocol and extended AODV (E-AODV) protocol is used. In the proposed protocol, if RREQ message is not delivered to a destination node, E-RERR message is routed to a source node. However, the HSBR protocol is based on dynamic source routing (DSR) protocol for MANET protocol and modified DSR (M-DSR) protocol is used. In the HSBR protocol, if message is not delivered to a destination node, modified RERR (M-RERR) is routed to a source node, where delivery predictability defined in PRoPHET protocol is assumed to deliver messages in this paper, since a specific algorithm to calculate a probability of delivery for social based opportunistic routing (SBOR) is not specified in detail in Reference [13]. In the proposed protocol, any node can be selected as virtual source node, if Equation (1) is met. On the other hand, the last node of M-RERR path is generally selected as virtual source node in the HSBR protocol. In the proposed protocol, the operations of MANET and DTN are switched periodically. On the other hand, in the HSBR protocol, if MANET operation is failed to deliver messages, the operation of DTN is carried out. Then the operation of MANET is operated if MANET environment is available again. The distinguishing features of the proposed protocol are summarized as follows:  
1. E-RERR message is newly defined to deliver information of intermediate relay nodes, where defined fields for E-RERR message are E-RERR ID, source node ID of E-RERR, source node ID of RREQ, routing path of delivered RREQ, relay node ID of E-RERR, and delivery predictability of relay node with the destination node
2. Multiple intermediate relay nodes can be selected as virtual source node, if they satisfy the condition of Equation (1). 3. Delivery predictability with the destination node of a message is used to select virtual source node for the delivery of the message, and delivery predictability threshold value, \(\delta\), is newly defined, to control the speed of message dissemination. 4. MANET phase and DTN phase are switched periodically to apply MANET or DTN protocol for the appropriate operation for message delivery in a given network topology and mobility/traffic characteristics of nodes. Figure 4 shows a flowchart to describe the operation of the proposed protocol. Basically, the proposed protocol periodically switches between MANET phase and DTN phase, and each phase is operated for a predefined switching timer. In MANET phase, a source node with a message broadcasts REQUATION If RREP is received, the message is delivered to a destination node of the message using the reverse path of RREP as in original MANET protocol.