4.4 Metric-based cluster algorithm
4.4.1 TA selection mechanism
A cluster algorithm is used to determine the subset of TA nodes in the MANET. The choice of TA connections as utilised by the cluster algorithm does not necessarily establish real TA connection in the later security architecture. In the scope of the cluster algorithm, a node can immediately connect to another node, which may require an interval to establish its state as a TA member. According to this, our cluster-based algorithm for TA member selection provides a sufficient subset of TA nodes, which can then be used for bootstrapping the security architecture on top of these nodes.
Without loss of generality, and as noted in Section 4.2, we use a modification of Amis’ algorithm [3] for the initial implementation and evaluation of the metrics used in distributing TA services. The underlying principle of deterministic cluster algorithms is to let each node exchange information with immediate neighbours and to decide whether it is a TA node itself or if it accepts a peer node as a TA node. If a node A accepts another node B as a TA node, node B will be the connector to the TA for node A. In the case of Amis’ algorithm, this information exchange procedure is performed d times, yielding a network where every node has a maximum distance of d hops to its TA connector. Amis describes the basic concept of his algorithm as follows:
Initially, each node sets its winner2 to be equal to its own node id.
Then each node locally broadcasts its winner value to all of its 1-hop neighbours. After all neighboring nodes have been heard from, for a single round, the node chooses the largest value among its own winner
4.4 Metric-based cluster algorithm
value and the values received in the round as its new winner. This process continues for d rounds.
Extension 1: Choose TA nodes by quality In our extension of Amir’s al- gorithm, the winner value is represented by a quality factor instead of the node identity. Moreover, the base algorithm’s approach of choosing its d-hop cluster head based on the decisions of neighboring nodes in round d− 1 must be augmented since different nodes might hold different views about a node’s TA qualification. The base algorithm is therefore extended as follows:
TA Cluster Algorithm: In our cluster algorithm we use the two parameters
hopsToGo and forwardInfo. hopsToGo is the remaining number of hops that a message shall be sent. forwardInfo is a list containing hopsToGo values.
• Each node collects the information broadcasted by neighboring nodes and re- tains the information until it is refreshed or until it exceeds its predefined lifetime. Cluster information with a hopsToGo value greater than 1 are pushed on the stack forwardInfo, whereupon the respective hopsToGo value is de- creased by 1.
• In certain (possibly node-specific) time periods, each node determines all qual- ity factors about its known d-hop neighbours, choosing the node with the highest quality factor as its cluster head. If the node itself holds this value, or if another node has chosen it as cluster head, the node will itself be a TA node. The node then broadcasts its newly determined TA status and its addi- tional information such as the battery level and forwardInfo to its neighbours. Every entry of the forwardInfo stack contains a parameter hopsToGo, which is indicating the number of forwarding hops and initially set to the clustering depth d.
4.4 Metric-based cluster algorithm
First simulations have shown the tendency of cluster algorithms to change the cluster heads quite frequently. In cluster algorithms for MANETs, nodes broadcast messages in certain frequencies, and after each broadcast clusters are reshaped and cluster heads are likely to change. We observed that even with small topology changes between these broadcast phases, caused by node movements, cluster heads mostly changed. This behaviour could be prevented by configuring the quality factor to assign a higher quality to TA member nodes and thus foster their reelection. However, this would be a misuse of the quality factor that would decrease its potency for more sensitive configuration issues such as energy level and trust values. We therefore augmented the cluster algorithm itself by a mechanism for avoiding abrupt changes of the cluster heads.
Extension 2: Avoid frequent changes of TA members. To avoid fre- quent changes of TA members, we firstly augmented the possible set of TA states
TA MEMBERand NOT TA MEMBER by TA ASPIRANT and LEAVING TA. The TA ASPIRANT parameter is used to insert a second step into the process of becoming a TA mem- ber. Accordingly, a node first changes its state to TA ASPIRANT if it holds the highest quality value within its neighbourhood. After a certain configurable pe- riod CONST TA INTEREST as TA ASPIRANT, the node will become a TA member if it still holds the highest quality value. In our simulations in the following section, the parameter CONST TA INTEREST was set to three times the cluster message fre- quency. The respective mechanism was evaluated with the help of the parameter CONST NO TA INTEREST for the state LEAVING TA to avoid a abrupt release of the TA MEMBERstate. This parameter was set to one time the cluster message frequency, when using greater values it appeared to drastically bar the nodes from leaving the TA.
Summarising our extensions to Amis’ [3] algorithm, Algorithm 4.1 shows the protocol specification of our TA cluster algorithm.
4.4 Metric-based cluster algorithm
Algorithm 4.1: TA cluster algorithm pseudocode. Input: cluster frequency cf , d, cluster metric
/* In cluster frequency cf node i does: */
Determine quality value rij for all nodes in d-hop neighbourhood; 1
if the node with the highest value rij is a TA member then 2
node i chooses this node with the highest rij value as its TA connection; 3
else
4
i sends ’you are my best quality’ message to the node with the highest rij 5
value (possibly itself);
i chooses the TA member with highest rij in its d-hop neighbourhood as 6
its TA connection (possibly none); end
7
if node i got a ’you are my best quality’ message in the last period cf
8
(possibly from itself ) then
if hasStatus(TA ASPIRANT) then
9
TA ASPIRANT TIMER+= cf ;
10
if TA ASPIRANT TIMER≥ CONST TA INTEREST then
11
setStatus(TA MEMBER);
12
end
13
else if hasStatus(LEAVING TA) then
14
setStatus(TA MEMBER);
15
else if hasStatus(NOT TA MEMBER) then
16 setStatus(TA ASPIRANT); 17 TA ASPIRANT TIMER = 0; 18 end 19 else 20
if hasStatus(TA ASPIRANT) then
21
setStatus(NOT TA MEMBER);
22
else if hasStatus(LEAVING TA) then
23
LEAVING TA TIMER+= cf ;
24
if LEAVING TA TIMER≥ CONST NO TA INTEREST then
25
setStatus(NOT TA MEMBER);
26
end
27
else if hasStatus(TA MEMBER) then
28 setStatus(LEAVING TA)); 29 LEAVING TA TIMER = 0; 30 end 31 end 32
4.4 Metric-based cluster algorithm