KadOLSR: An Efficient P2P Overlay for Mobile Ad-Hoc Networks

P2P and MANET are self-organized, decentralized, and dynamic networks. Although both networks have common characteristics, they are used for different purposes and operate at different layers. P2P provides the ability for peers to store and locate services in the network, while MANET provides an underlying routing capability to reach other mobile nodes. Thus, P2P and MANET could complement each other. However, P2P is originally designed to operate over the Internet, which provides rich routing capabilities compared to MANET. Therefore, deploying P2P over MANET must come with careful consideration of how to adjust P2P approaches to better suit MANET. In this paper, a novel system called KadOLSR is proposed to better develop an efficient P2P over MANET. The structure of the well-known Kademlia is used along with the OLSR. KadOLSR optimizes the similarities between P2P and MANET to reduce overlay management communication overhead and hence deploys a lightweight and efficient P2P over MANET. The network layer routing information is shared with the overlay to achieve the optimization. A cross-layer channel is constructed between the network layer and the overlay layer to exchange relevant routing information. The proposed system is designed, and its performance is evaluated using a network simulator. The performance of KadOLSR is also compared to one of the recent P2P for MANET systems. The simulation results show that KadOLSR performs well across all different network sizes and mobility speeds. Keywords—Peer-To-Peer P2P; Mobile ad hoc Networks MANET; cross layering; Kademlia; Optimized Link State Routing OLSR; KadOLSR


I. INTRODUCTION
Peer-To-Peer (P2P) networks are used to overcome the limitations of the centralization issue when sharing resources through constructing decentralized networks. Originally, P2P was used for file sharing. It was then used in other fields such as distributed computing and streaming. P2P in general can be classified into two categories: unstructured overlays and structured overlays [1]. In the former category, no structure is followed by peers when forming the overlay. Flooding and random walk are among the techniques used to locate services within the overlay. The latter category employs a sort of organization when forming the overlay to provide a search strategy for locating network services. Overlays are therefore constructed as a multi-dimensional grid, ring, or mesh.
A mobile ad hoc network (MANET) is a self-organized and distributed network that consists of mobile nodes which collaborate with each other to provide communication among themselves in an infrastructureless network [2]. Routing protocols in MANET can be classified in general into reactive, proactive, and hybrid MANET routing. In the proactive approach, each mobile node maintains routing entries to other nodes in advance of their usage. The second approach is mainly based on working on-demand. Routes to other nodes are fetched once they are needed. The hybrid approach combines both reactive and proactive routing. The reactive technique is used to find far away nodes, whereas the proactive technique is used to maintain routes to close nodes.
P2P and MANET are self-organized, decentralized, and dynamic networks. Although both networks have common characteristics, they are used for different purposes and operate at different layers. P2P provides the ability for peers to store and locate services in the network, while MANET provides an underlying routing capability to reach other mobile nodes. Thus, P2P and MANET could complement each other. However, P2P was initially deployed over the Internet, which provides rich routing capabilities compared to MANET. Therefore, deploying P2P over MANET must come with careful consideration of how to adjust P2P approaches to better suit an environment like MANET.
In this paper, we propose a novel combination of the P2P approach and the MANET routing protocol to better develop an efficient P2P over MANET system. The structure of the well-known and most widely used overlay system [3] [4] [5], Kademlia [6], is used, along with a proactive routing protocol, OLSR [7]. However, the proposed system, KadOLSR, optimizes similarities between MANET and P2P to reduce overlay management communication overhead, and hence deploys a lightweight and efficient P2P over MANET. The underlay routing information is made available for overlay in order to achieve the optimization. A cross-layer path is constructed between the network layer and the overlay layer to exchange relevant routing information. The proposed system is designed, and its performance is evaluated using a network simulator. The performance of KadOLSR is also compared to one of the recent P2P for MANET systems.
The rest of the paper is organized as follows: Section II reviews the work related to deploying P2P overlays over MANET. It also highlights the adopted overlay and underlay. Section III introduces the proposed system, KadOLSR. The proposed system is then evaluated in Section IV. The experimental setups and performance metrics are also presented in this section. Finally, Section V concludes the paper.

A. Related Works
Several systems have been proposed and published in the literature in the past decade to enhance the performance of P2P networks over isolated MANETs. Different deployment strategies, different overlay systems, and different underlay protocols were used to propose efficient combinations of P2P and MANET [1].
Authors in [8] proposed the MACARON P2P overlay for MANET. The proposed system does not use the DHT design. Instead, it uses an unstructured name-location based design to create the overlay. For the underlying MANET routing, MACARON depends on a proactive protocol where it uses OLSR. MACARON builds a cross layer channel to reduce the overlay routing overhead. The routing updates in the underlying network are made available for the overlay through the cross-layer channel. Each node in MACARON is required to maintain O(√ ) routing entries, where n is the network size. Moreover, it uses landmark nodes to facilitate overlay routing, where the network should have at most O( √ ) landmark nodes.
The performance of structured P2P systems over MANET was analyzed in [9]. The paper follows the straight layering approach, where the overlay protocols were deployed as they are on top of the underlying networks. The performance of the ring-based Chord and Tree-based Kademlia were tested, with a focus on scenarios of MANET networks that have low mobility and low churn conditions. Both overlays were deployed over the underlying network, which relies on the AODV as the routing protocol. The paper concluded that layered Chord and Kademlia performs reasonably well with small network sizes. However, overlay performance degraded as the network sizes increased due to the heavy overlay maintenance overhead.
The work in [10] proposed an unstructured P2P overlay for MANET that uses underlay characteristics to make sure that the overlay matches the underlay as closely as possible. The system is based on maintaining physically closest peer neighbors. Each peer maintains a list of physical neighbors that contains a neighbor's IP address, physical distance, and overlay maintenance state. The system floods the network with neighbor request and reply messages and hello maintenance and reply messages for overlay creation and maintenance. The input language of the UPPAAL model checker was used to model the proposed structure.
OneHopOverlay4MANET [11] [12] [13] proposed a one logical hop overlay system that is based on the distributed hash table. It builds an overlay similar to that of the EpiChord P2P system. However, the system constructs a cross-layer path between itself and the MANET routing that is used to reduce overlay management optimizing of the existing underlay routing information. Similar to EpiChord and Chord, OneHopOverlay4MANET maintains successor and predecessor lists to guarantee overlay performance. Furthermore, the system depends heavily on a cache that each peer maintains. The cache is mainly populated through underlay routing information.
3D-Overlay was proposed by [14]; it builds a structured P2P overlay for MANET based on three-dimensional logical space. Each peer is assigned an overlay identifier in the form of three entries {x|y|z} depending on its location in the three rectangular coordinates. Thus, physical relationships among nodes in the network are considered at the overlay level. 3D-Overlay peers exchange periodic probe messages to maintain the overlay. The system also gives a weight to each link between peers in terms of the number of hops using the underlay routing information provided by the OLSR routing protocol.
MA-SP2P [15] constructs a minimum spanning tree that can be used to build the overlay. A peer minimum spanning tree consists of the peer itself and up to two logical hops neighbors. The overall logical ID space is then disseminated between peers, so that each peer is responsible for a part of the ID space. Each portion of the ID space is a contiguous identifier that is limited with an upper end value and a lower end value. Each of the upper end values and lower end values of a peer's portion should point to a neighbor that has a part of the ID space greater than and lower than the current peer limits, respectively. MA-SP2P depends on exchanging probe messages among peers to maintain the constructed overlay. The Chord P2P system was deployed on MANET by [16]. The work focused on converging separated Chord rings in MANET. A cross-layer path was used to send underlay routing information of physical neighbors to the overlay. The Chord system was modified to include a new table called the Chord Neighbor Table (CNT). It is used to maintain information about physical neighbors to find any neighboring peers that belong to a different Chord ring. Once a new ring is identified, the system converges it to the existing overlay ring.
Not only were P2P systems used at the application layer to locate services and resources, they were also used in some works to enhance underlay routing. The authors of [17] proposed a KDSR, which is an underlay integration to enhance routing in MANET. It is an integration of Kademlia P2P and the DSR routing protocol. Each node in the proposed system is required to maintain k-bucket routing tables, similar to the original Kademlia, with some changes of the stored contents to better suit MANET. Similar to DSR, the KDSR maintains a cache route table. Kademlia's strategies of updating k-bucket entries are also used to populate the DSR cache route repository.

B. Kademlia
Kademlia is a structured P2P overlay which is based on distributed hash table. It uses 160-bit address space. A hash function is used to allocate a 160-bit identifier for each key and peer in the overlay. Based on its allocated identifier, an object is placed on peers with the closest identifiers on the logical overlay. The notation of exclusive OR (XOR) is used by Kademlia to find out the distance between identifiers. It constructs an overlay as a tree-like topology based on the peers' bitwise XOR. This is to highlight the importance of the differences at a higher order bit compared to the differences at a lower order bit. It is due to the fact that a difference at a higher order bit is a larger distance on the tree-like topology. A Kademlia binary tree is shown in Fig. 1 for peer 1011. www.ijacsa.thesai.org A Kademlia peer stores and maintains a list for each bit of its identifier. Such lists are known as buckets. A list is the distance to a particular Kademlia peer or Kademlia subtree of peers. A bucket or list maintains multiple entries to a subtree of the logical space up to a configuration parameter k. In the i th list of a peer, it should store addresses to peers with i-1 bits matching the identifier prefix, I [1, maximum bit of the address space]. The entries of a bucket are stored based on the last seen time. Fig. 1 shows an example of a binary tree for peer 1011, along with its bucket.
Kademlia uses concurrent lookup to find a key on the overlay. For a lookup, firstly a peer finds the L closest peers in its tree. L is a configuration parameter known as the concurrency parameter. It then sends parallel queries to the chosen L peers. The initiator of the queries then uses the received replies to fire another set of queries until it finds the destination.

C. OLSR
OLSR is a proactive MANET link state-based routing protocol that depends on the periodic exchange of management messages among all participating nodes to maintain routing tables. Each node is responsible for diffusing partial link states to others. However, OLSR minimizes the volume of control messages by adopting the MultiPoint Relaying (MPR) strategy. In the MPR strategy, each OLSR node selects a set of neighboring nodes as its MPRs to transmit its control traffic. In order to select MPRs, an OLSR node gathers information about its neighbors, which can be up to 2-hops away. The node then selects a minimum number of 1-hop neighbors as its MPRs, ensuring that all of its 2-hops neighbors can be reached through at least one of the selected MPRs.
OLSR also uses Hello and Topology Control messages to build routing tables. Hello messages are broadcast to neighbors only with the purpose of spreading the link states and physical neighbors of the current node. On the other hand, Topology Control messages are used to diffuse link states throughout the network. They are created and forwarded by MPRs only to minimize routing overhead.

III. PROPOSED SYSTEM
To deploy an efficient P2P overlay over an ad hoc network, the overlay must be aware of the underlying network and better optimize existing routing knowledge. In our proposed system, we opt for the reduction of overlay management overhead via constructing a cross-layer channel between the network layer that operates the OLSR routing protocol and a modified Kademlia that resides at the application layer. Fig. 2 illustrates the structure of the proposed system.
KadOLSR is designed to meet the following needs:  Effective deployment of P2P over MANET by building an overlay that can achieve a higher success ratio with minimum latency.
 Optimizing existing underlay routing information for overlay management.
 Avoiding duplicated routing in overlay routing and underlay routing.
 Keeping P2P management traffic at minimum on a scarce environment such as MANET.
The proposed system uses two independent routings. The first is the underlay routing, which is carried out using the OLSR protocol to construct routes among participating mobile nodes. The second routing is carried out at the overlay level using Kademlia to locate shared and distributed objects or keys in the network. However, the underlay routing information is optimized in the proposed system to reduce the overlay routing load to a minimum level.
The proposed system makes use of MANET's proactive routing protocol, which maintains routing entries for each of the available MANET nodes in advance. Thus, the underlay is not required to carry out any specific routing procedure to satisfy the overlay's needs. The OLSR is modified to fire notifications to the cross-layer channel regularly or when changes occur in the routing table. Fired notifications are the IP addresses for each routing entry that the current node is aware of along with a timestamp for each passed IP address.
From the perspective of the overlay, each peer in the proposed system is required to subscribe to the cross-layer notification board in order to receive fired underlay routing notifications. Once the underlay fires routing information, the overlay will be able to receive such notifications, which will be used to update overlay routing tables. (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 10, 2020 93 | P a g e www.ijacsa.thesai.org The traditional Kademlia namespace is organized as a complete binary tree. A peer can choose a random value of the used namespace or can calculate its own identifier using a hash function. In the proposed system, each peer is assigned an overlay identifier based on its IP address. A hash function such as SHA-1 can be used to generate the overlay ID.
A peer hashes each received IP address from the notification board and places it in the appropriate bucket. Since the underlay is proactive and maintains the routing table for all of the nodes in the network, the overlay will have a complete view of the existing peers. On the other hand, as a node joins the MANET network, it will exchange underlay routing messages with other participating nodes in order to build its routing table. This, however, would result in its IP address being inserted into other nodes' routing tables. Consequently, other mobile nodes would send routing notifications to their upper overlays that contain the IP address of the joining peer. Thus, other peers would notice the existence of the current joining peer.

A. Simulation Setups and Performance Metrics
The proposed system is evaluated in this section. The OMNeT++ [18] simulation library and framework are used to evaluate the performance of KadOLSR. OMNeT++ is a component-based C++ for building network simulators. The INET framework [19] and the Overlay Network Simulation framework OverSim [20] were used to simulate the underlay and the overlay, respectively. INET supports communication networks, including wireless networks, wired networks, sensor networks, and mobile ad hoc networks. OverSim is another simulation framework for OMNeT++ for P2P networks. It provides implementations for several structured and unstructured P2P protocols. The simulated scenarios are repeated 10 times, and the plotted result is the average of the 10 repetitions. Table I shows the parameters that were used. Each network is given around 60s at the beginning of a simulation to stabilize. Then, the measurement is taken for 1000 s. The Random Way Point mobility model is the mobility model that we used. Two scenarios of lookup frequency were used, where each node fires a lookup every 10s and 60s.
For evaluating the proposed system, the following performance metrics were considered:  Packet delivery ratio (PDR): the ratio of the answered key lookups to the overall sent key lookups.
 End-To-End delay: the average time that a node requires in order to determine the issued key lookups. It starts from the time that the key lookup is sent until the time at which the node receives the answer for the query.
 Traffic load: the total traffic that was released in the network, including underlay routing protocol traffic and overlay traffic.

B. Results and Discussion
The performance of the proposed system in terms of managing to solve key lookups is shown in Fig. 3 and Fig. 4.   Fig. 3 shows the success ratio as a function of network sizes for nodes moving at 3 m/s and sending random key lookups every 60s. Overall, both systems, layered Kademlia and KadOLSR, achieve good performance for networks consisting of 80 nodes and less. However, as more nodes participate in the network, the performance of the layered Kademlia deteriorates and decreases to around 80%, while the KadOLSR achieves 95% and more.
This can be seen as the result of collisions as more traffic is released in the network with a larger number of nodes. Moreover, Kademlia builds and populates its routing buckets gradually using a pinging mechanism, which results in a higher volume of traffic that affects the success ratio. However, KadOLSR optimizes MANET routing information to populate the overlay, causing less traffic in the network and hence, better performance.
Decreasing the lookup frequency (to 10s) involves generating extra traffic in the network, even though KadOLSR maintains better performance compared to the layered approach, as can be seen in Fig. 4. The figure also shows that as mobile nodes move faster, a reduction can be seen in the packet delivery ratio for both systems. This is expected, as frequent changes in the topology cause more traffic and a disruption in the routing efficiency.  The average time of the end-to-end delay is shown in Fig.  5 and Fig. 6. The result shown is the average delay for those key lookup queries that overlays managed to solve.
The delay is affected mainly by two factors. The first is the availability of the address for a peer, which stores the key, at current overlay buckets, and the second is the efficiency of the underlay routing protocols to route the query. Node mobility speed and network size negatively affect the end-to-end delay, as shown in the figures. This is a result of the extra traffic that is introduced to the network and hence, possible collisions, as more nodes are added to the network or the node speed increases. Overall, both layered and cross-layered systems achieve similar results; nevertheless, KadOLSR manages to solve key lookups in less time in the largest simulated scenario, as displayed in Fig. 6. This is, however, achieved while maintaining a higher success rate, as presented previously in Fig. 3.
The total released traffic in the network is depicted in Fig.  7 and Fig. 8. This includes both overlay and underlay traffic and is measured as the total sent traffic from the network layer for all participating nodes.
KadOLSR outperforms the layered Kademlia in both presented scenarios. The reduction of KadOLSR traffic is the result of using a cross-layering mechanism to feed the overlay using underlay routing information and therefore cut the overlay management load. Fig. 8 shows how the network load for the layered approach increases as the number of nodes increases. The layered approach yields its worst performance with a network size of 140 nodes, where it generates about 90,000 extra packets compared to the proposed approach. Such communication overhead would increase the chance of collisions and hence retransmission, which results in performance degradation, as shown in the previous figures.
The performance of KadOLSR is compared against Layered Kademlia and OneHopOverlay4MANET [11] in terms of success rate, discovery delay, and network load, as shown in the following figures. In terms of the lookup success ratio, Fig. 9 shows that KadOLSR performance was the best in an intensive scenario where each node was moving at 5 m/s and each node sent a lookup query every 10 seconds.
The layered Kademlia gives a competitive result when the size of the network is less than 100 nodes. However, for a network consisting of more than 100 nodes, both cross-layered systems, KadOLSR and OneHopOverlay4MANET, manage to maintain good performance. This is achieved because of relying on the cross-layer channel technique to build overlay routing tables at minimum cost.    Regarding the discovery delay, Fig. 10 shows that a slight increase of the average end-to-end delay was experienced by the proposed system. An obvious reason for the increase is that KadOLSR achieves the best performance in terms of the delivery ratio, meaning that the system manages to solve most of the issued lookup queries, including those which were resolved using a higher delay. Thus, average experienced delay is slightly higher. A similar trend to the success ratio appears in the traffic load as Fig. 11 shows, where layered Kademlia traffic increases dramatically for 100 nodes and higher network size. This is a result of the pinging mechanism that Kademlia used to maintain overlay entries. Moreover, the KadOLSR network's traffic was the smallest among all the compared systems; its total released traffic was kept under 300 k packets for the largest network.

V. CONCLUSION
This paper proposed a novel optimized P2P system for MANET using a Kademlia overlay and OLSR for the MANET underlay. The proposed system, KadOLSR, uses a cross-layering technique to reuse underlay routing information for overlay routing management. The proposed system was evaluated in a simulation environment. Its performance was compared to the layered Kademlia over OLSR and one of the recent P2P overlay systems for MANET, OneHopOverlay4MANET. The simulation results show that KadOLSR performs well across all different network sizes and mobility speeds. The other two overlays give a reasonable performance for networks consisting of less than 100 nodes. However, as network size increases, the two overlay's performance deteriorates. The use of cross-layering allows the proposed system to reduce the overlay management communication load, which was reflected in good performance in solving key lookup queries. For future work, a plan is made to deploy the proposed system over reactive MANET routing protocols to find out how the cross-layering technique would help maintaining the overlay over reactive MANET.