*4.3.3. Simulation setup*

272 Wireless Sensor Networks – Technology and Protocols

**4.3. Simulation objectives and setup** 

of interest.

*4.3.1. Objectives* 

malicious dropping.

with GETAR.

*4.3.2. Assumptions* 

trust metric unchanged.

routing decisions made by the learned cost function.

are intended to be forwarded to all nodes in the target region. However, when we consider trust awareness, a misbehaving node should not be given a chance to have the packet since it will not forward the packet. Thus, GETAR continues to forward packets based on the

Regarding the problem of void regions, there is no change in the escaping operation proposed by GEAR. The only difference in GETAR is that the reason of being in a void region can be also related to the existence of misbehaving nodes in the proximity of the node

In this work, we are studying the effect of incorporating trust aware metric in routing

 The efficiency of GETAR in terms of packet delivery. Therefore, we are analyzing how our proposed protocol will improve the packet delivery, decrease the impact of attacks on dropping packets and decrease the number of packet retransmission due to

 The efficiency of GETAR in terms of energy conserving. This issue is related to the hypothesis that GETAR will reduce the retransmission due to malicious behavior. Thus, we expect that the power that could have been used for retransmission will be saved

 As mentioned earlier in this section, the risk value of a node is assumed to be abstractly calculated by the monitoring and rating components of a reputation system. This risk value is assumed to be constant during the simulation duration. This assumption is valid if we consider that the update period of the risk values is greater than the simulation time, or the updated values during the simulation time are not very far from the starting values. This is valid as long as we assume that the rating and monitoring component have a moderate or slow pace. Moreover, our focus in this work is to study the impact of injecting trust into the routing decision during a period that holds this

We assume that all nodes are able to locate themselves in the (x,y) coordinates and that

We assume that nodes will announce their energy and location information honestly.

 Attackers are assumed to follow GETAR protocol. They are also allowed to initiate packet transmission sessions. This is because this work does not consider an offensive-

decision in GETAR. The simulation work aims to analyze the following issues:

Studying the impact of malicious nodes population on GETAR performance.

The trade-off between trust awareness and energy balancing.

sender nodes are able to locate their destinations.

Handling false updates is beyond the focus of this work.

In this simulation work, we used the parameters in table 1. In our simulation, we tested one type of attacks; i.e. non forwarding attack. Moreover, a malicious node in this attack will drop all packets that it receives with probability=1. For this type of attacks, we experiment four different percentages of attackers of the total number of nodes; i.e. 10%, 30%, 50% and 70%.

All experiments are performed by varying the value of the trust awareness parameter β in GETAR cost function. Then, the outputs are used to compare the behavior of the performance metric versus the change in β values.


**Table 1.** Simulation parameters fo GETAR experiments

## *4.3.4. Performance Measures*

 Delivery ratio: This is defined as the ratio between the number of packets delivered successfully to their destinations to the total number of generated packets; i.e:

$$\text{delivery ratio} = \frac{\text{number of successful packets}}{\text{total number of packets}} \tag{8}$$

The objective of this metric is to show the effect of injecting the trust knowledge into the routing decision on improving the success of the routing operation. The metric is studied under the effect of increasing the trust awareness feature by increasing the β parameter of GETAR.

 Outsider attacks' drop ratio: This is defined as the ratio between the number of packets dropped due to outsider malicious nodes to the total number of generated packets; i.e:

$$\text{Outside attacks drop ratio} = \frac{\text{number of dropped packets by milicious nodes}}{\text{total number of packets}} \tag{9}$$

 Retransmission ratio: This is defined as the ratio between the number of retransmitted packets to the total number of generated packets; i.e

$$\text{returnsmit} \quad \text{ratio} = \frac{\text{number of returnsmissions}}{\text{total packets}} \tag{10}$$

Retransmitted packets include all possible causes, i.e. outsider drops or congestion drops due to voids or exceeding time out. However, if a decrease in this ratio shows up with an increase in β, this proves that most of these retransmissions are due to attacks. Moreover, this ratio indicates the ratio of power spent for packet retransmission to the total network consumed power. Thus, a decrease in this ratio will indicate a saving in power consumption.

 Coefficient of variation of node consumed power (COV): This metric is obtained by dividing the standard deviation of the consumed power per node by the average consumed power per node. A large value of this metric indicates that there is large variation around the mean value. This can be then viewed as a non balancing effect of energy consumption. Small values of this metric indicate that almost all nodes are consuming an amount of power that is around the mean value. This means that there is a better energy balancing among nodes. The metric is computed mathematically as:

$$\text{COV} \quad \text{of consumed} \quad \text{power} = \frac{\sigma \text{(consumed\\_power)}}{\mu \text{(consumed\\_power)}} \tag{11}$$

where is the standard deviation and µ is the mean.

## *4.3.5. Simulation results and analysis*

### *4.3.5.1. Delivery ratio*

Figure 4 shows the delivery ratio versus β assuming a non forwarding attack. We simulate different scenarios of percentages of attackers from the total population of nodes. The maximum percentage of attackers is set to 70% as a very pessimistic case to see how GETAR would work with such extreme unacceptable scenarios. However, the practical cases of less percentages are also presented. For each scenario, we can notice that the delivery ratio increases as β increases until a knee point at which the delivery ratio remains almost unchanged. This agrees with the expectation that higher values of β will make GETAR more trust aware and, hence, the developed routes will include fewer attackers. At around β=0.4, all curves saturate at their corresponding maximum possible delivery ratio. This is an interesting result as it indicates that the effect of β is fully utilized for the trust awareness issues at 0.4. This means that increasing β beyond that value is not efficient in terms of trust-awareness. Moreover, as β increases, it will mask the GEAR part of the cost function. Thus, the minimum β that guarantees the maximum achievable delivery ratio is the best choice from the perspective of trust awareness.

Another point to be noticed in this figure is that when β is equal to zero, the delivery ratio is very low (e.g. 0.34 with 10% attackers), while we should expect values around 0.9 since the attackers should drop 10% of the traffic. The reason of this low delivery ratio can be related to GETAR cost function propagation. When a node selects a malicious node as a router, it may get stuck with this router for several transactions before it switches to another router based on energy and distance information. As a result, such low delivery ratio is expected.

The figure also shows the effect of the percentage of the malicious nodes (attackers) in the network on the delivery ratio. As expected, the more the attacker percentage, the less the delivery ratio is. Moreover, the improvement of the delivery ratio by increasing the value of β becomes more significant as attacker percentage increases. For example, with 10% attackers, the ratio increases from 0.34 at β=0 to 0.85 at β=0.4, whereas it improves from 0.1 at β =0 to 0.3 at β=0.4 with 70% attackers. Thus, with 70% attackers, one may decide to keep β<0.4 to give a preference for normal GEAR operation since the delivery ratio is not improving significantly.

**Figure 4.** Comparison of the delivery ratio for different attackers' percentage

### *4.3.5.2. Outsider attacks' drop ratio*

274 Wireless Sensor Networks – Technology and Protocols

parameter of GETAR.

power consumption.

where 

*4.3.5.1. Delivery ratio* 

*4.3.5. Simulation results and analysis* 

number of successful packets delivery ratio total number of packets (8)

total packets (10)

(11)

The objective of this metric is to show the effect of injecting the trust knowledge into the routing decision on improving the success of the routing operation. The metric is studied under the effect of increasing the trust awareness feature by increasing the β

 Outsider attacks' drop ratio: This is defined as the ratio between the number of packets dropped due to outsider malicious nodes to the total number of generated packets; i.e:

Retransmission ratio: This is defined as the ratio between the number of retransmitted

number of retransmissions retransmit ratio

 Coefficient of variation of node consumed power (COV): This metric is obtained by dividing the standard deviation of the consumed power per node by the average consumed power per node. A large value of this metric indicates that there is large variation around the mean value. This can be then viewed as a non balancing effect of energy consumption. Small values of this metric indicate that almost all nodes are consuming an amount of power that is around the mean value. This means that there is a better energy balancing among nodes. The metric is computed mathematically as:

(consumed power) COV of consumed power (consumed power)

Figure 4 shows the delivery ratio versus β assuming a non forwarding attack. We simulate different scenarios of percentages of attackers from the total population of nodes. The maximum

is the standard deviation and µ is the mean.

Retransmitted packets include all possible causes, i.e. outsider drops or congestion drops due to voids or exceeding time out. However, if a decrease in this ratio shows up with an increase in β, this proves that most of these retransmissions are due to attacks. Moreover, this ratio indicates the ratio of power spent for packet retransmission to the total network consumed power. Thus, a decrease in this ratio will indicate a saving in

packets to the total number of generated packets; i.e

number of dropped packets by malicious nodes Outsider attacks drop ratio total number of packets (9)

Figure 5 provides the relationship between the drop ratio and β parameter. For each scenario of attack percentage, the drop ratio decreases as β increases. The same analysis provided for figure 4 is also valid here.

If we compare this figure with figure 4, we can notice that they almost complement each other. This would be very true if we consider the total drops in the drop ratio to include, in addition to the attack related drops, other drops due to network congestion. However, in our simulation, we are interested only in the attack-related drops. Since this figure is almost complementing figure 4, it is very evident that most of the drops are due to attacks.

**Figure 5.** Drop ratio for different attackers percentages

### *4.3.5.3. Retransmission ratio*

The retransmission ratio accounts for two types of retransmitted packets, i.e. packets dropped due to attacks and packets that are not delivered due to path congestion. In figure 6, we can notice two different behaviors of the curves in two regions separated by certain values of β <0.5 for different scenarios. In the first regions for β <0.5, we notice that as β increases, the retransmission ratio increases. This is because when β gets higher values, more packets will suffer longer delays to avoid malicious nodes. Thus, retransmission due to congestion will increase. Also, as we are still below β=0.4, the drops due to attacks are still significant according to figure 5. As a result, an increase in β will cause more retransmissions.

Once we exceed a certain value of β, like 0.4 in case of 30% attackers, most of the packets will have the same routes with the same delays and, as a result, the retransmissions due to congestion will remain almost constant. However, since the drop ratio is decreased dramatically as has been discussed in figure 5, the retransmission ratio will now be affected only by the drop ratio. Thus, the retransmission ratio decreases, also dramatically.

An increase in retransmission ratio gives an indication of the wasted power. That is, the more the retransmission ratio is, the more power is wasted. Thus, an important objective here is to reduce the retransmission ratio as much as possible. However, this fact is very much affected by the percentage of attackers and routing metric preference. For example, assume we have a 10% attackers scenario. It is very obvious that the best choice of β is 0.4 where we have 0 retransmissions or, equivalently, 0 wasted power. However, with 70% attackers, the minimum "wasted power" can be achieved with 0.123 retransmission ratio in two different regions at β <0.3 and β>0.4. In such a situation, if we are more concerned about the energy as a routing metric, it is better to choose β= 0.2 or 0.1. However, if the preference is given for trust awareness, β should be 0.5.

**Figure 6.** Comparison of the retransmission ratio for different percentages of attackers

### *4.3.5.4. Coefficient of variation of node consumed power*

276 Wireless Sensor Networks – Technology and Protocols

**Figure 5.** Drop ratio for different attackers percentages

is given for trust awareness, β should be 0.5.

*4.3.5.3. Retransmission ratio* 

retransmissions.

If we compare this figure with figure 4, we can notice that they almost complement each other. This would be very true if we consider the total drops in the drop ratio to include, in addition to the attack related drops, other drops due to network congestion. However, in our simulation, we are interested only in the attack-related drops. Since this figure is almost

The retransmission ratio accounts for two types of retransmitted packets, i.e. packets dropped due to attacks and packets that are not delivered due to path congestion. In figure 6, we can notice two different behaviors of the curves in two regions separated by certain values of β <0.5 for different scenarios. In the first regions for β <0.5, we notice that as β increases, the retransmission ratio increases. This is because when β gets higher values, more packets will suffer longer delays to avoid malicious nodes. Thus, retransmission due to congestion will increase. Also, as we are still below β=0.4, the drops due to attacks are still significant according to figure 5. As a result, an increase in β will cause more

Once we exceed a certain value of β, like 0.4 in case of 30% attackers, most of the packets will have the same routes with the same delays and, as a result, the retransmissions due to congestion will remain almost constant. However, since the drop ratio is decreased dramatically as has been discussed in figure 5, the retransmission ratio will now be affected

An increase in retransmission ratio gives an indication of the wasted power. That is, the more the retransmission ratio is, the more power is wasted. Thus, an important objective here is to reduce the retransmission ratio as much as possible. However, this fact is very much affected by the percentage of attackers and routing metric preference. For example, assume we have a 10% attackers scenario. It is very obvious that the best choice of β is 0.4 where we have 0 retransmissions or, equivalently, 0 wasted power. However, with 70% attackers, the minimum "wasted power" can be achieved with 0.123 retransmission ratio in two different regions at β <0.3 and β>0.4. In such a situation, if we are more concerned about the energy as a routing metric, it is better to choose β= 0.2 or 0.1. However, if the preference

only by the drop ratio. Thus, the retransmission ratio decreases, also dramatically.

complementing figure 4, it is very evident that most of the drops are due to attacks.

The importance of the consumed power coefficient of variation metric in figure 7 is to show the impact of trust aware routing decision on energy balancing proposed by normal GEAR. We can see that as β gets higher values, the consumed power coefficient of variation increases until a knee point like β=0.5 in the case of 10% attackers. After that, this metric remains almost unchanged.

Before the knee point, an increase in β will cause the routing decision to select a trusted node with less consideration for energy. This is because high value of β will mask the GEAR part of the cost function. As a result, trusted nodes that are in the proximity of attackers will suffer heavy routing duties whereas other nodes will be balanced with their neighbors. As a result, we will have a larger variation of power consumption as β increases. However, after the knee point, the increase of β will have the same masking effect on the GEAR part of the cost function. Thus, the routing decisions will not change as well.

**Figure 7.** Comparison of the coefficient of variation for different percentages of attackers

This section proposed an enhanced trust aware routing protocol, GETAR, for WSN. The suggested protocol promises to provide trust awareness as well as energy efficiency as it is based on an enhancement of GEAR protocol. This way, GETAR abides by the constrained energy usage in WSN while providing its security service.
