Skip to Content
SensorsSensors
  • Article
  • Open Access

29 November 2024

20 Pages

Context-Aware Trust and Reputation Routing Protocol for Opportunistic IoT Networks

,
,
and
1
Sant Longowal Institute of Engineering and Technology, Longowal 148106, India
2
Department of Information Technology, Netaji Subhas University of Technology, New Delhi 110078, India
3
National Institute of Electronics and Information Technology, New Delhi 110078, India
4
Department of Computer Science, Toronto Metropolitan University, Toronto, ON M5B 2K3, Canada

Abstract

In opportunistic IoT (OppIoT) networks, non-cooperative nodes present a significant challenge to the data forwarding process, leading to increased packet loss and communication delays. This paper proposes a novel Context-Aware Trust and Reputation Routing (CATR) protocol for opportunistic IoT networks, which leverages the probability density function of the beta distribution and some contextual factors, to dynamically compute the trust and reputation values of nodes, leading to efficient data dissemination, where malicious nodes are effectively identified and bypassed during that process. Simulation experiments using the ONE simulator show that CATR is superior to the Epidemic protocol, the so-called beta-based trust and reputation evaluation system (denoted BTRES), and the secure and privacy-preserving structure in opportunistic networks (denoted PPHB+), achieving an improvement of 22%, 15%, and 9% in terms of average latency, number of messages dropped, and average hop count, respectively, under varying number of nodes, buffer size, time to live, and message generation interval.

1. Introduction

The integration of short-range communication technologies like WiMAX and Bluetooth [1,2] into portable devices has given rise to a complex network referred to as opportunistic networks (OppNets). In such networks, a fixed path from the source to the destination nodes is not guaranteed. Also, nodes can move freely, and connectivity is unpredictable. To deal with these uncertainties, the so-called store-carry-and-forward mechanism [3] is utilized for data packet transfer, meaning that when a node receives a data packet and no direct path to the destination is available, it holds it until another node is encountered that can carry the packet toward the destination node. These intermediate nodes (also called relay nodes) temporarily store and forward the data packets as they move through the network. Thus, in OppNets, packet forwarding is a cooperative process that depends upon the cooperation and reliability of the relay nodes. Furthermore, since mobile nodes are generally carried by humans, OppNets can take advantage of their social relationships and mobility to connect with them. However, it may happen that some of these nodes do not intentionally cooperate in the message-forwarding process or because of reasons, such as limited buffer and limited battery power. Therefore, one of the major challenges for any routing model in OppNet is to determine suitable and reliable nodes for efficient data forwarding.
Additionally, from a human-centric perspective, analyzing the tight-coupled relationship between humans and the opportunistic connection of smart things has enabled the advent of Opportunistic IoT (OppIoT) networks [4]. In an OppIoT network, the mobility of nodes (i.e., devices carried by humans), along with their inbuilt capability of short-range sensing, are exploited for collecting, routing, and sharing data among human communities, yielding a harmonious interaction between the IoT and humans. In such interaction, some nodes may act erratically by disseminating a lot of insignificant messages or by refusing to forward them, ending by degrading the network performance. On the other hand, some nodes may just accept messages and would not forward them. It would be reasonable for these problematic nodes to be identified and denied participation in the data routing process.
The primary assumption in most of the routing protocols for OppIoT networks is that all the nodes cooperatively and securely carry forward the given message and eventually transmit it to the intended destination. However, in a real-world scenario, it has been observed that although there are several nodes that forward the messages to other nodes, there are some that may not forward the given message due to limited buffer and power. Consequently, the major challenges encountered in routing models for OppIoT stem from the fact that (i) these models do not use a conventional network architecture; (ii) intermittent connectivity between the nodes often occurs at irregular times; and (iii) due to limited battery power, nodes may drain out their energy during the data transmission process, which might lead to severe network failure. In addition to these considerations, an effective security model that can be utilized to detect and isolate the potentially threatening nodes and prevent them from interfering with the packet transmission process is necessary.

Main Contribution

This paper presents a novel routing protocol (referred to as Context-Aware Trust and Reputation Routing (CATR)) protocol for OppIoT networks, which utilizes the popular beta distribution and node’s context information to compute the trust and reputation of a node. This value is then compared with a specific predefined threshold to determine whether that node is a suitable forwarder or not for the message. In addition, an effective security model based on trust rating and reputation is also proposed, which systematically identifies and isolates those nodes with malicious intent, preventing them from participating in the data forwarding process. The main contributions are as follows.
  • This article addresses the network routing issues in OppIoT scenarios, proposing a solution to ensure the stability of the system.
  • We propose a Context-Aware Trust and Reputation Routing (CATR) protocol and verify its performance using the real CRAWDAD dataset Cambridge/haggle (29 May 2009).
  • We have evaluated our proposed CATR routing protocol for OppIoT using an Opportunistic Network Environment (ONE) simulator [5] and compared its performance against that of the Epidemic [6], BTRES [7], and PPHB+ [8] protocols.
The rest of this paper is organized as follows. Section 2 discusses some representative routing protocols for OppIoT networks. Section 3 describes our proposed CATR routing model for OppIoT networks. Section 4 describes the simulation experiments conducted to evaluate the proposed CATR protocol and the results obtained. Finally, Section 5 concludes this paper.

3. Proposed CATR Routing Protocol for OppIoT Networks

The design of our CATR protocol relies on the utilization of the beta distribution and the use of the node’s context information to calculate the overall trust value of any node (which involves the calculation of its reputation). These values then serve to determine suitable non-malicious relay nodes that participate in the message routing process from source to destination nodes.
The operational flow of our proposed CATR protocol is illustrated in Figure 1, which consists of (a) the Direct Trust (DT) Computation Module—which calculates the DT value of any node, (b) the Indirect Trust (IT) Computation Module—which calculates the Indirect Trust value of any node, and (c) the Overall Trust Computation Module—which aggregates the Direct Trust and Indirect Trust values of any node. We can describe this more precisely as follows:
Figure 1. Working flow of our proposed CATR protocol.
  • The Direct Trust (DT) Computation Module involves five main sub-modules, namely (1) the Computation of Beta Trust Degree sub-module, (2) the Computation of Encounter Frequency Degree sub-module, (3) the Computation of Packet Forwarding Degree sub-module, (4) the Computation of Recent Contact Degree sub-module, and (5) the Computation of Contact Durability Degree sub-module;
  • The Indirect Trust (IT) Computation Module calculates the IT value of any node based on the computation of its reputation index (RI), considering the reputations of that node gathered from its neighbors;
  • The Overall Trust Computation Module computes the total trust value of any node.
In this work, the calculation of trust value for a given node relies on the beta distribution and the design of a trust mechanism by mimicking the ideas inherited from [12]. The beta distribution is a type of probability distribution for possible values of a probability, which can be involved in the computation of the trust and reputation of a node in a network environment [12]. Through it, one can describe the distribution of the nodes’ credibility by monitoring the nodes’ behavior as completed [7]. This paper makes use of it jointly with a method to calculate the Direct and Indirect Trust of any node in order to determine its trustworthiness. The trust values of nodes are then used in deciding on the selection of relay nodes that are suitable to carry the data packets from their source node to the intended destination node.

3.1. Beta Distribution and Trust Modeling

According to the beta distribution [12], the probability density function (PDF) is formulated by using two parameters ( α and β ) and the gamma function [7], as follows:   
P ( x ) = f ( x | α , β ) = Γ ( α + β ) Γ α · Γ β x α − 1 ( 1 − x ) β − 1
where 0 ≤ x ≤ 1 , α ≥ 0 , β ≥ 0 , such that if α < 1 , then x ≠ 0 and if β < 1 , x ≠ 1 . The probability expectation value of this beta distribution is then computed as follows:
E ( x ) = α α + β
In the context of data transmission in OppNet, α and β can represent the successful (resp. unsuccessful) encounters among the nodes. Additionally, let ζ be the number of times that successful encounters have occurred and λ be the number of times that unsuccessful encounters have occurred. Then, the probability density function (PDF) of α , the future can be expressed by setting
α = ζ + 1 , β = λ + 1 s u c h t h a t ζ , ζ ≥ 0
Substituting these values in Equation (1) yields
P ( x ) = f ( x | α , β ) = f ( x | ζ + 1 , λ + 1 ) = Γ ( ζ + 1 + ζ + 1 ) Γ ( ζ + 1 ) · Γ ( λ + 1 ) x ζ + 1 − 1 ( 1 − x ) λ + 1 − 1 = Γ ( ζ + λ + 2 ) Γ ( ζ + 1 ) · Γ ( λ + 1 ) x ζ ( 1 − x ) λ
The corresponding probability expectation in Equation (2) can then be rewritten as
E ( x ) = ζ + 1 ( ζ + 1 ) + ( λ + 1 ) = ζ + 1 ( ζ + λ + 2 )
This Equation (5) can be used to represent the beta trust of a node n as computed by another node m (denoted B T m n ). Additionally, the beta distribution [12] can also be used to determine the reputation index of a node by another node m (denoted R I m n ). Indeed, let i be any neighbor of node n, ζ n i be the number of successful encounters between nodes n and i as maintained by node i, and λ n i be the number of unsuccessful encounters between nodes n and i as maintained by node i. Then, for calculating the reputation of a node, the probability density function (PDF) that can be used (according to Equation (4) is
P ( x ) = Γ ( ζ n i + λ n i + 2 ) Γ ( ζ n i + 1 ) · Γ ( λ n i + 1 ) x ζ n i ( 1 − x ) λ n i
such that ζ n i , λ n i ≥ 0 . In this case, the probability expectation using Equation (6) is obtained as
E ( x ) = ζ n i + 1 ( ζ n i + 1 ) + ( λ n i + 1 ) = ζ n i + 1 ( ζ n i + λ n i + 2 )
This Equation (7) can be utilized to represent the reputation index ( R I m n ) of a node n as computed by node m. Based on this, the reputations obtained from those nodes that node n had encountered can be used to calculate its Indirect Trust (IT) value of n, precisely as the mean value of these reputation values.
For trust modeling purposes, the social status of a node mainly depends upon the trustworthiness and cooperation that it provides to other nodes in the network. This further enhances a belief system among the nodes which can be referred to as trust. Thus, trust can be defined as a measure of belief that one node has in another node; it is influenced by the cooperative behavior among the nodes. For instance, whenever a pair of nodes N 1 and N 2 encounter each other, N 2 can be considered as cooperative and trustworthy for N 1 if N 2 can successfully forward a data packet that it received coming from N 1 without altering its content. However, if node N 2 fails to forward the received data packet, it is considered as non-cooperative or as having malicious intent. Therefore, node N 1 must first determine whether N 2 can be trusted or not. Another possibility is that node N 2 may present itself as a genuine node; however, upon receiving the data packet, it may drop it. Hence, the considered trust mechanism should not only take into account the behavior of N 2 to determine whether it is trustworthy or not, but it should also consider the recommendations for node N 2 that have been received from other nodes. These recommendations are taken into account in the design of our CATR model illustrated in Figure 1.
Using the above-discussed preliminaries, we now focus on the details of the design of the aforementioned modules/sub-modules. The considered notations and hashmap data structure used in this design are given in Table 1 and Table 2, respectively.
Table 1. Notations.
Table 2. Hashmaps.

3.2. Direct Trust Computation

A node’s Direct Trust (DT) is established by its actions within the network. As pointed out earlier in Section 3, its value is obtained as a weighted-average function with five parameters, namely the Beta Trust Degree of a node (BT) obtained from the Computation of Beta Trust Degree sub-module, the Encounter Frequency Degree (EF) obtained from the Computation of Encounter Frequency Degree sub-module, the Packet Forwarding Degree (PF) of a node obtained from the Computation of Packet Forwarding Degree sub-module, the Recent Contact Degree ( R D ) of a node obtained from the Computation of Recent Contact Degree sub-module, and the Contact Durability Degree ( C D ) of a node obtained from the Computation of Contact Durability Degree sub-module. Therefore, the DT value D T m n is computed dynamically each time that a node n (referred to as Trustee) has a packet to transmit encounters to another node m (referred to as Trustor) during its movement, and it is obtained as follows:
D T m n = f ( B T , E F , P F , R C , C D ) = ω 1 ∗ B T + ω 2 ∗ E F + ω 3 ∗ P F + ω 4 ∗ R C + ω 5 ∗ C D
where
  • ω k ; ∀ k are constants such that ∑ k = 1 5 ω k = 1 .
  • B T is computed based on successful and unsuccessful encounters as
    B T m n = s e + 1 ( s e + u e + 2 )
    where node n is the Trustee and node m is the Trustor, s e is the number of successful encounters, and u e is the number of unsuccessful encounters. The procedure to calculate B T m n is given in Algorithm 1.
  • E F calculation: Whenever any node m carrying a data packet encounters a neighbor node n, it determines E F n D —the encounter frequency degree of n with the destination node D—which is computed as
    E F n D = E n c o u n t e r f r e q u e n c y o f n w i t h D E n c o u n t e r f r e q u e n c y o f n w i t h a l l o t h e r n o d e s
    E F n D = f n D ∑ k = 1 K f n k
    where K is the total number of nodes encountered by node n until that instance of time, f n D is the encounter frequency of n with D, and f n k is the encounter frequency of n with each of the K number of nodes. Typically, E F is understood as the ratio of the number of encounters between n and D to the frequency of contacts that n has had with other nodes. Node n is comparatively more suited to forward data packets toward node D, as indicated by its greater E T value. The procedure to calculate E F n D is given in Algorithm 2.
  • P F calculation: P F is computed by a node m whenever it encounters any neighbor n , as follows:
    P F m n = n u m m n n u m n
    where n u m m n is the number of m packets forwarded by node n and n u m n is the total number of packets forwarded by node n to all other nodes. The procedure to calculate P F m n is given in Algorithm 3.
  • R C calculation: R C refers to the latest contact time between two nodes. It is computed based on the time elapsed since the last contact between a node m with its neighbor n and that between n with the destination D. Its lower value indicates that these nodes have been contacted more recently. It is represented by R C m n , computed as
    R C m n = r c m n + r c n D ∑ k = 1 K r c m k + ∑ k = 1 K r c n k
    where K is the total number of nodes encountered by a node until that instance of time, r c m n is the latest elapsed contact time of m and n, r c n D is the latest elapsed contact time of n and D, ∑ k = 1 K r c m k is the total time elapsed since the last contact of m with other nodes, and ∑ k = 1 K r c n k is the total time elapsed since the last contact of n with other nodes. The procedure to calculate R C n D is given in Algorithm 4.
  • C D calculation: C D refers to the contact duration between two nodes. It is computed based on the minimum duration between a node m with its neighbor n and that between the neighbor n with the destination D. The higher the contact durability between two nodes, the higher the reliability and trustworthiness among them. It is represented by C D m n , computed as
    C D m n = c d m n + c d n D ∑ k = 1 K c d m k + ∑ k = 1 K c d n k
    where K is the total number of nodes encountered by a node till that instance of time, c d m n is the contact duration between m and n, c d n D is the contact duration between n and destination D, ∑ k = 1 K c d m k represents total contact duration between m with all other nodes, and ∑ k = 1 K c d n k represents total contact duration between n with all other nodes. The procedure to calculate C D n D is given in Algorithm 5.
Algorithm 1 Beta Trust value ( B T m n ).
Input: 
ζ , λ
Output: 
Beta Trust value ( B T m n )
1:
procedure  CALC BT(ζ, λ)
2:
  B T m n = ( ζ + 1 ) / ( ζ + λ + 2 )
3:
 return ( B T m n )
4:
end procedure
Algorithm 2 Encounter frequency index ( E F n D ).
Input: 
n, D
Output: 
Encounter frequency index ( E F n D )
1:
procedure  CALC EF(n,D)
2:
 for each NId-k in E n c o u n t e r L i s t  do
3:
    // Calculate total encounter frequency of n with all k.
4:
     f n k = f n k + f
5:
    if  k = D  then
6:
      // Calculate encounter frequency of n with D.
7:
       f n D = f n D + f
8:
    end if
9:
 end for
10:
return ( f n D / f n k )
11:
end procedure
Algorithm 3 Packet forwarding degree ( P F m n ).
Input: 
n
Output: 
Packet forwarding degree ( P F m n )
1:
procedure  CALC PF(n)
2:
 for each sid-k in F o r w a r d i n g L i s t  do
3:
    // Calculate the total number of packets of all nodes that are forwarded by n.
4:
     n u m n m = n u m n m + n p
5:
    if  s i d = m and r i d = n  then
6:
      // Calculate the total of packets of m that are forwarded by n
7:
       n u m n = n u m n + n p
8:
    end if
9:
 end for
10:
return ( n u m n m / n u m n )
11:
end procedure
Algorithm 4 Recent contact degree ( R C m n ).
Input: 
m, n, D, Current time (as t c )
Output: 
Recent contact degree ( R C m n )
1:
procedure  CALC RC(m,n,D)
2:
 for each NId-k in E n c o u n t e r L i s t of node m do
3:
    // Determine the latest elapsed contact time of m with n.
4:
    if  N I d = n  then
5:
       r c m n = m i n ( t c − t l e )
6:
    end if
7:
    // Determine the total time elapsed since last contact of m with other nodes.
8:
     r c m k = r c m k + m i n ( t c − t l e )
9:
 end for
10:
∑ k = 1 n r c i k = s
11:
for each NId-k in E n c o u n t e r L i s t of node n do
12:
// Determine the latest elapsed contact time of n with destination D..
13:
if  k = D  then
14:
r c n D = m i n ( t c − t l e )
15:
end if
16:
// Determine the total time elapsed since last contact of n with other nodes.
17:
r c n k = r c n k + m i n ( t c − t l e )
18:
end for
19:
R C m n = { r c m n + r c n D } / { ∑ k = 1 K r c m k + ∑ k = 1 K r c n k }
20:
return R C m n
21:
end procedure
Algorithm 5 Contact durability degree ( C D m n ).
Input: 
m, n, D
Output: 
Contact durability degree ( C D m n )
1:
procedure  CALC RC(m,n,D)
2:
 for each NId-k in E n c o u n t e r L i s t of m do
3:
    // Determine the contact duration time of m with n.
4:
    if  k = n  then
5:
       c d m n = c d m n + ( t e − t b )
6:
    end if
7:
    // Determine the contact duration time of m with all other nodes.
8:
     c d m k = c d m k + ( t e − t b )
9:
 end for
10:
for each NId-k in E n c o u n t e r L i s t of n do
11:
// Determine the contact duration time of m with destination D.
12:
if  k = D  then
13:
c d n D = c d n d + ( t e − t b )
14:
end if// Determine the total contact duration time of n with all other nodes
15:
c d n k = c d n k + ( t e − t b )
16:
end for
17:
C D m n = { c d m n + c d n D } / { ∑ k = 1 K c d m k + ∑ k = 1 K c d n k }
18:
return C D m n
19:
end procedure
By substituting the values returned by each of the above-described algorithms in Equation (8), we get the DT value ( D T m n ) of node m on node n.

3.3. Indirect Trust Computation

The Indirect Trust (IT) value of a node is computed by the Trustor m by seeking recommendations from the neighbors (referred to as Trustee nodes; an example of such node is denoted by n). These recommendations are obtained in the form of a Reputation Index (RI), as indicated earlier. The Indirect Trust I T m n is then computed by taking the average of all these reputations, i.e.,
I T m n = ∑ k = 1 K R I m k K
where K is the total number of neighbors of n, and R I m k is the Reputation Index computed using the trust value of m as per the recommendation of the kth neighbor of n. The procedure to calculate I T m n is given in Algorithm 6.
Algorithm 6 Calculation of Indirect Trust ( I m n ).
Input: 
Trustor m, Trustee n, Reputation Index (RI)
Output: 
I T m n
1:
for each neighbour, k of node n do
2:
R I n k = ( s n k + 1 ) / ( s n k + u n k + 2 )
3:
end for
4:
// Compute Indirect Trust; K being the total neighbors
5:
I T i n = ∑ j = 1 N R I n k K =0

3.4. Overall Trust Computation

The overall trust of a node n as computed by node m is obtained as follows:
O T m n = ρ ∗ D T m n + ϕ ∗ I T m n
where ρ , ϕ are constants such that ρ + ϕ = 1 . This value is then compared against a prescribed threshold, and nodes having a value less than that threshold are considered malicious. The procedure to calculate O T m n is given in Algorithm 7. The pseudo-code of our proposed CATR model is given in Algorithm 8.
Algorithm 7 Calculation of Overall Trust Computation ( O T m n ).
Input: 
Direct Trust D T i n , Indirect Trust I T i n
Output: 
Overall Trust Computation O T i n
1:
Calculate Direct Trust D T i n
2:
Calculate Indirect Trust I T i n
3:
Calculate Overall Trust using O T i n = ρ ∗ D T i n + ϕ ∗ I T i n
Algorithm 8 CATR routing protocol for OppIoT networks.
1:
c a l c B T ( ) : Method that computes and returns the Beta Trust of a node i on node j (as per Algorithm 1).
2:
c a l c E F ( ) : Method that computes and returns the Encounter Frequency Degree between two nodes (as per Algorithm 2).
3:
c a l c P F ( ) : Method that computes and returns the Packet Forwarding Degree of a node (as per Algorithm 3).
4:
c a l c R C ( ) : Method that computes and returns the Recent Contact Degree between nodes (as per Algorithm 4).
5:
c a l c C D ( ) : Method that computes and returns the Contact Durability Degree between two nodes (as per Algorithm 5).
6:
for each encountered neighbor node n of node i do
7:
// Node i computes the Beta Trust of node n
8:
B T i n = c a l c B T ( )
9:
// Node i computes the Encounter Frequency Degree of node n
10:
E F i n = c a l c E F ( )
11:
// Node i computes the Packet Forwarding Degree of node n
12:
P F i n = c a l c P F ( )
13:
// Node i computes the Recent Contact Degree of node n
14:
R C i n = c a l c R C ( )
15:
// Node i computes the Contact Durability Degree of node n
16:
C D i n = c a l c C D ( )
17:
// Computes the Direct Trust of node i on node n.
18:
D T i n = ω 1 ∗ B T i n + ω 2 ∗ E F i n + ω 3 ∗ P F i n + ω 4 ∗ R C i n + ω 5 ∗ C D i n
19:
// Computes the Reputation Index for node n based on reputations from neighbors of node n.
20:
for each neighbour k of node n do
21:
R I n k = ( s n k + 1 ) / ( s n k + u n k + 2 )
22:
end for
23:
// Compute the Indirect Trust x, K being the total neighbors (as per Algorithm 6)
24:
I T i n = ∑ j = 1 N R I n k K
25:
// Compute the Overall Trust (OT) (as per Algorithm 7)
26:
O T i n = ρ ∗ D T i n + ϕ ∗ I T i n
27:
// Compare OT with a threshold trust value τ
28:
if  O T i n ≥ τ  then
29:
Forward the message from node i to node n
30:
end if
31:
end for

3.5. Complexity Analysis

In the outer loop, the algorithm iterates over all encountered neighbor nodes of node i. Let N represent the number of neighbors of node i. The time complexity of the outer loop is O(N). Each method ( c a l c B T ( ) , c a l c E F ( ) , c a l c P F ( ) , c a l c R C ( ) , c a l c C D ( ) ) is invoked once per neighbor. So, the time complexity for all trust metric calculations per neighbor is O(1).
In the inner loop, for each neighbor n, the algorithm iterates over all neighbors of K n , which represents the number of neighbors of n. The combined time complexity for all neighbors is ∑ n = 1 N K n .
The threshold comparison and potential forwarding are O(1) per neighbor. The total time complexity is the sum of the complexities of all operations is O(N) + O(1) + O( ∑ n = 1 N K n ).
In the worst case, assuming each node i has N neighbors and each of those neighbors has an average of K neighbors, then the total time complexity consumed is O(N * K). If K scales linearly with N, the complexity becomes O( N 2 ).

4. Performance Evaluation

We have evaluated our proposed CATR routing protocol for OppIoT using an Opportunistic Network Environment (ONE) simulator [5] and compared its performance against that of the Epidemic [6], BTRES [7], and PPHB+ [8] protocols, chosen as the benchmark, in terms of the following performance metrics:
  • Average latency: This is the amount of time a message needs to travel across the network to reach its intended destination. It is computed as the time difference between creating and delivering messages.
  • Message drop rate: This is the rate at which messages are lost during data transmission. The smaller the number of dropped packets, the higher the efficiency of the model.
  • Overhead ratio: This is the proportion of additional communication or computational resources consumed apart from the essential data transmission requirements. A routing model having less amount of overhead is considered as efficient.
  • Hop count average: This is the mean number of nodes the message passes through between the sender and destination nodes. A decreased hop count corresponds to an increased efficiency.
  • Message delivery probability: This is the probability of receiving the message accurately at the destination node. A routing model with a higher message delivery probability is considered efficient.
The weights for evaluating the metrics Beta Trust Degree, Encounter Frequency, Packet Forwarding Degree, Recent Contact Degree, and Contact Durability Degree were determined through extensive simulations conducted using the ONE simulator. By systematically varying the weight values of these parameters, we optimized the configuration to achieve the best delivery probability.
Four parameters are modified during our evaluations: number of nodes: {66, 96, 126, 156, 186}); time to live (TTL): {300, 350, 400, 450, 500} min; message generation interval: {5–15, 15–25, 25–35, 35–45, 45–55} s; and buffer space: {5, 10, 15, 20, 25} MB. Also, the general parameters used in our simulations comprise 96 mobile nodes split into 6 groups: 1 group of vehicles with 30 nodes, 3 groups of trams with 2 nodes each, and 2 groups of pedestrians with 30 nodes each. With a buffer size of 10 MB, each pedestrian node moves between 0.5 and 1.5 m per second. With a buffer capacity of 50 MB, the tram group’s nodes move at a pace of 7–10 m/s. The speed of car group nodes is 2.7–13.9 m/s, each having a buffer size of 10 MB. Each node generates a message within an interval of 25 to 35 s of size 500 KB to 1 MB and 300 min TTL (time to live) for the message. The other simulation parameters are represented in Table 3.
Table 3. Simulating parameters.
Based on the aforementioned performance metrics, our model’s effectiveness compared to that of the chosen benchmark models, is assessed. We have tested the proposed model using the real CRAWDAD dataset Cambridge/haggle (29 May 2009) [20]. The simulation results are captured in Figure 2, Figure 3, Figure 4, Figure 5, Figure 6, Figure 7, Figure 8, Figure 9, Figure 10 and Figure 11.
Figure 2. Average latency vs. number of nodes.
Figure 3. Average latency vs. TTL.
Figure 4. Average latency vs. buffer size.
Figure 5. Average latency vs. message generation interval.
Figure 6. Messages dropped vs. TTL.
Figure 7. Messages dropped vs. buffer size.
Figure 8. Messages dropped vs. message generation interval.
Figure 9. Hop count Vs. number of nodes.
Figure 10. Hop count vs. buffer size.
Figure 11. Average hop count vs. message generation interval.
Figure 2 shows the effects of the variations in the average latency as the number of nodes increases from 66 to 186. There is a decrease in average latency as the number of nodes rises because more and more nodes become available in the network. With an increase in the number of nodes, it is observed that CATR outperforms the Epidemic, BTRES, and PPHB+ protocols by 24%, 25%, and 13%, respectively, in terms of average latency.
Figure 3 shows how an increase in TTL from 300 to 500 min affects the average latency. When a message’s TTL value rises, that message can remain in the nodes’ buffer for an extended period of time, lowering the message’s average latency. As can be observed, in terms of the average latency on increasing the TTL, our proposed CATR protocol performs better than the Epidemic, BTRES, and PPHB+ protocols by 8%, 18%, and 6%, respectively.
A node can keep the data packets for a longer period of time when the buffer size is increased from 5 MB to 25 MB, which ultimately results in an increase in latency. This relation is shown in Figure 4, where it is evident that, with an increase in the buffer size, our proposed CATR protocol outperforms the Epidemic, BTRES, and PPHB+ protocols in terms of average latency by 17%, 25%, and 8%, respectively.
Figure 5 shows the relation between the message generation interval and average latency, where it is found that with an increase in the interval from 5 to 15 to 45–55 s, the average latency also gradually rises for the studied protocols. However, this value is much lower for our proposed CATR model compared to what is obtained for the other studied models, with CATR performing 17%, 23%, and 9% better than the Epidemic, BTRES, and PPHB+ protocols, respectively.
In Figure 6, it is found that as the TTL value increases from 300 to 500, there is a significant improvement in our CATR model in terms of messages dropped. This is due to the fact that a higher value of TTL implies that the message can remain in the network for a longer period of time. In terms of the average number of dropped messages, our CATR scheme is 24%, 12%, and 14% better than the Epidemic, BTRES, and PPHB+ protocols, respectively.
The relationship between the number of dropped messages and buffer size is shown in Figure 7. It can be observed that when the buffer size is increased from 5 MB to 25 MB, the average number of dropped messages is significantly lower than for Epidemic, BTRES, and PPHB+, improving the performance by 23%, 18%, and 16%, respectively. This is because a node’s larger buffer allows it to store a message for longer periods of time, which lowers the amount of messages dropped.
The impact of varying the message production interval on the message dropping rate is shown in Figure 8. This rate eventually decreases by 23%, 16%, and 17% compared to Epidemic, BTRES, and PPHB+, respectively, as the message generation interval is increased from 5 to 15 to 45–55. This is because an increase in the message generation interval allows a node to store data packets in its buffer for a longer period of time before any new packet is generated.
Figure 9 shows how the number of nodes and hop count are related. It can be shown that for all studied models, the number of hop counts increases as the node count rises from 66 to 186. This is due to the fact that as there are more nodes in the network, there is an increasing number of nodes that are available. However, compared to Epidemic, BTRES, and PPHB+, our proposed CATR model requires a significantly smaller number of hops, improving the performance by 34%, 14%, and 10%, respectively.
The impact of changing the hop count as the buffer size increases from 5 to 25 MB is depicted in Figure 10. For every model, the hop count progressively drops as a node’s buffer size grows. It is explained by the fact that the node can store more and more messages as the buffer size increases, which eventually results in fewer hops. Compared to Epidemic, BTRES, and PPHB+, the proposed CATR’s value is significantly lower, which improves its performance by 29%, 10%, and 19%, respectively.
Figure 11 depicts the relation between the number of hops and the message generation interval, where it is clear that with an increase in the message generation interval from 5 to 15 to 45–55, the number of hops required to propagate a message gradually increases. However, this increase is much lower in the case of our proposed CATR, hence performing better than Epidemic, BTRES, and PPHB+ by 30%, 14%, and 9%, respectively. The fact is that when there is an increase in the message generation interval, a node can store data packets in its buffer for a longer duration of time before generating any new packets, and this eventually leads to a decrease in the average hop count for that message.

5. Conclusions

In this paper, a Context-Aware Trust and Reputation Routing protocol for OppIoT networks (called CATR) is proposed, in which the trust values of nodes are computed dynamically. In such a scheme, before forwarding any data packet to its neighbor node, a source node computes the trust of that node in two phases—Direct Trust and Indirect Trust. These trust values serve as key parameters in deciding on suitable relay nodes to carry the message from its source to its eventual destination. Simulation experiments conducted using the ONE simulator demonstrate that CATR outperforms the Epidemic protocol, the beta-based Trust and Reputation Evaluation System (BTRES), and the secure and privacy-preserving scheme structure in opportunistic networks (PPHB+). Specifically, CATR achieves improvements of 22%, 15%, and 9% in terms of average latency, number of messages dropped, and average hop count, respectively. These results hold under varying conditions, including the number of nodes, buffer size, time to live (TTL), and message generation intervals. In a future study, this model can be extended by incorporating a mechanism to enhance the performance metrics.

Author Contributions

Conceptualization, J.S. and S.K.D.; methodology, J.S.; software, J.S.; validation, J.S., S.K.D. and I.W.; formal analysis, H.-C.C.; investigation, J.S.; resources, I.W.; data curation, J.S.; writing—original draft preparation, J.S.; writing—review and editing, S.K.D., I.W. and H.-C.C.; visualization, J.S.; supervision, S.K.D., I.W. and H.-C.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

Data will be made available on request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Etemad, K. Overview of mobile WiMAX technology and evolution. IEEE Commun. Mag. 2008, 46, 31–40. [Google Scholar] [CrossRef] [Scilit]
  2. Pelusi, L.; Passarella, A.; Conti, M. Opportunistic networking: Data forwarding in disconnected mobile ad hoc networks. IEEE Commun. Mag. 2006, 44, 134–141. [Google Scholar] [CrossRef] [Scilit]
  3. Nguyen, T.D.; Le, T.V.; Pham, H.A. Novel store–carry–forward scheme for message dissemination in vehicular ad-hoc networks. ICT Express 2017, 3, 193–198. [Google Scholar] [CrossRef] [Scilit]
  4. Guo, B.; Zhang, D.; Wang, Z.; You, Z.; Zhou, X. Opportunistic IoT: Exploring the harmonious interaction between human and the Internet of Things. J. Netw. Comput. Appl. 2013, 36, 1531–1539. [Google Scholar] [CrossRef] [Scilit]
  5. Keränen, A.; Ott, J.; Kärkkäinen, T. The ONE simulator for DTN protocol evaluation. In Proceedings of the 2nd International Conference on Simulation Tools and Techniques, Rome, Italy, 2–6 March 2009; pp. 1–10. [Google Scholar]
  6. Vahdat, A.; Becker, D. Epidemic Routing for Partially Connected ad Hoc Networks; Technical Report CS-2000-06; Department of Computer Science, Duke University: Durham, NC, USA, 2000. [Google Scholar]
  7. Fang, W.; Zhang, C.; Shi, Z.; Zhao, Q.; Shan, L. BTRES: Beta-based trust and reputation evaluation system for wireless sensor networks. J. Netw. Comput. Appl. 2016, 59, 88–94. [Google Scholar] [CrossRef] [Scilit]
  8. Rashidibajgan, S.; Hupperich, T.; Doss, R.; Förster, A. Secure and privacy-preserving structure in opportunistic networks. Comput. Secur. 2021, 104, 102208. [Google Scholar] [CrossRef] [Scilit]
  9. Dhurandher, S.K.; Kumar, A.; Obaidat, M.S. Cryptographybased misbehavior detection and trust control mechanism for opportunistic network systems. IEEE Syst. J. 2018, 12, 3191–3202. [Google Scholar] [CrossRef] [Scilit]
  10. Naveena, S.; Senthilkumar, C.; Manikandan, T. Analysis and countermeasures of black-hole attack in manet by employing trust-based routing. In Proceedings of the 6th IEEE International Conference on Advanced Computing and Communication Systems (ICACCS), Coimbatore, India, 6–7 March 2020; pp. 1222–1227. [Google Scholar]
  11. Elmahdi, E.; Yoo, S.M.; Sharshembiev, K. Secure and reliable data forwarding using homomorphic encryption against blackhole attacks in mobile ad hoc networks. J. Inf. Secur. Appl. 2020, 51, 102425. [Google Scholar] [CrossRef] [Scilit]
  12. Ganeriwal, S.; Balzano, L.K.; Srivastava, M.B. Reputation-based framework for high integrity sensor networks. ACM Trans. Sens. Netw. 2008, 4, 1–37. [Google Scholar] [CrossRef] [Scilit]
  13. Wang, E.K.; Li, Y.; Ye, Y.; Yiu, S.M.; Hui, L.C. A dynamic trust framework for opportunistic mobile social networks. IEEE Trans. Netw. Serv. Manag. 2017, 15, 319–329. [Google Scholar] [CrossRef]
  14. Li, F.; Si, Y.; Chen, Z.; Lu, N.; Shen, L. Trust-based security routing decision method for opportunistic networks. J. Softw. 2017, 29, 2829–2843. [Google Scholar]
  15. Su, B.; Du, C.; Huan, J. Trusted opportunistic routing based on node trust model. IEEE Access 2020, 8, 163077–163090. [Google Scholar] [CrossRef] [Scilit]
  16. Bangotra, D.K.; Singh, Y.; Selwal, A.; Kumar, N.; Singh, P.K. A trust-based secure intelligent opportunistic routing protocol for wireless sensor networks. Wirel. Pers. Commun. 2022, 127, 1045–1066. [Google Scholar] [CrossRef] [Scilit]
  17. Cai, X.; Shi, K.; Sun, Y.; Cao, J.; Wen, S.; Tian, Z. Intelligent event-triggered control supervised by mini-batch machine learning and data compression mechanism for TS fuzzy NCSs under DoS attacks. IEEE Trans. Fuzzy Syst. 2023, 32, 804–815. [Google Scholar] [CrossRef] [Scilit]
  18. Sreenivasa, B.R.; Lahza, H.; Nandini, G.; Shawly, T.; Alsheikhy, A.A.; Kumar, K.R.N.; Lahza, M.H.F. Social context-aware macroscopic routing scheme for opportunistic network. Trans. Emerg. Telecommun. Technol. 2023, 34, e4844. [Google Scholar]
  19. Malik, R.A. A social relationship-based energy efficient routing scheme for Opportunistic Internet of Things. ICT Express 2023, 9, 697–705. [Google Scholar]
  20. Scott, J.; Gass, R.; Crowcroft, J.; Hui, P.; Diot, C.; Chaintreau, A. “CRAWDAD dataset cambridge/haggle (v. 2009-05-29)”. CRAWDAD Wireless Network Data Archive. 2009. Available online: https://cir.nii.ac.jp/crid/1881991017615958656 (accessed on 20 November 2024).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.