Name-Based Message Forwarding for Home Ad hoc Networks

12
Journal of Wireless Networking and Communications 2013, 3(4): 51-62 DOI: 10.5923/j.jwnc.20130304.01 Name-Based Message Forwarding for Home Ad hoc Networks Tharinda Nishantha Vidanagama * , Hidenori Nakazato Graduate School of Global Information and Telecommunication Studies, Waseda University, Tokyo, Japan Abstract Future home appliances will have many useful built-in functions, such as an intelligent refrigerator that tells its time to go shopping, and possibly give a shopping list as well. A communication network that allows a user to access these built-in functions and to control the appliances is highly desirable. Ad hoc networks can be used to ease and support life in an ordinary house by networking these home appliances. For such a home network, ease of use must be given higher consideration. This paper discusses a name based ad hoc network where the nodes are given names such as “living room TV”, “kitchen oven”, etc. as identifiers. This paper proposes three name-based routing mechanisms based on a special Routing Cache (RC); Single RC, Equal-sized Directional RC and Proportional-Directional RC. The performance of the proposed routing schemes is evaluated through simulation. The proposed Proportional-Directional RC shows the best performance with most preferable resource usage. Keywords Ad-hoc Network, Name-based Addressing and Routing, Routing Cache 1. Introduction Wireless ad-hoc networks have attracted the attention of many researchers due to its various implications from the battlefield coordination to extension of mobile network service area. The ma in attraction is their lack of infrastructure. The devices themselves become the infrastructure of the network as well as play the role of the end user terminals depending on where it is located at a given time. But this attractiveness comes with its associated disadvantages such as connection reliability, bandwidth limitation and transmission error rates, security issues, power shortage and low processing and me mory capabilities. Apart from the difficulties the ad hoc networks face, it can still be very useful in environments that the shortcomings are less visible. There is a growing trend in introducing new functions into home appliances and sensors (hereafter also referred as nodes) including wireless capabilities. If these nodes are connected by a wireless network, it will allow the user to coordinate and control them through other nodes from anywhere in the network. In the home environment nodes have limited movements or non at all. This will reduce the problems created by mobility. The appliances are usually not very far apart, which will reduce the transmission error rates. There is no security risk from within the network * Corresponding author: [email protected] (Tharinda Nishantha Vidanagama) Published online at http://journal.sapub.org/jwnc Copyright © 2013 Scientific & Academic Publishing. All Rights Reserved since the whole network is owned by one owner. Most of the appliances are plugged in to the household power supply so that there is no worry about power shortage. But there may exist, power-restricted (battery-operated) nodes (e.g. smoke sensor etc) with limited capabilities excluding long-range networks such as Wi-Fi. Power restricted nodes will have a shorter lifespan if it has to transmit at high power to a distant Wi-Fi access point. Also the Wi-Fi access point becomes the single dependence point to the entire network which may not cover the entire household. Also some nodes may not be able to connect to Wi-Fi due to their short transmission distances. The appliances and sensors in a household may not come from the same manufacturer thus the capabilities of the wireless modules such as transmission distance, processing power and memory etc. may also differ. Therefore it is also important to address the heterogeneity of the network nodes. The network should work under resource restricted conditions thus preventing less resourceful nodes forming bottlenecks or causing performance degradation. Such an environment creates ideal conditions to use an ad hoc network with the benefit of no extra cost for new equipment where the heterogeneity of nodes can also be supported. This paper proposes the use of ad hoc networks to create a home network to ease and support life in an ordinary house. The usability of this network is considered as an important factor, as the user may have interactions with home appliances such as issuing commands, receiving messages, etc. Therefore it is important for the user to have the ability to quickly identify the nodes. For ease of node identification, this paper proposes the use of actual names to identify appliances. Consider a system where the default names are already given by the manufacturer which may

Transcript of Name-Based Message Forwarding for Home Ad hoc Networks

Journal of Wireless Networking and Communications 2013, 3(4): 51-62 DOI: 10.5923/j.jwnc.20130304.01

Name-Based Message Forwarding for Home Ad hoc Networks

Tharinda Nishantha Vidanagama*, Hidenori Nakazato

Graduate School of Global Information and Telecommunication Studies, Waseda University, Tokyo, Japan

Abstract Future home appliances will have many useful built-in functions, such as an intelligent refrigerator that tells its time to go shopping, and possibly give a shopping list as well. A communication network that allows a user to access these built-in functions and to control the appliances is highly desirable. Ad hoc networks can be used to ease and support life in an ordinary house by networking these home appliances. For such a home network, ease of use must be given higher consideration. This paper discusses a name based ad hoc network where the nodes are given names such as “liv ing room TV”, “kitchen oven”, etc. as identifiers. Th is paper proposes three name-based routing mechanisms based on a special Routing Cache (RC); Single RC, Equal-sized Direct ional RC and Proportional-Directional RC. The perfo rmance of the proposed routing schemes is evaluated through simulation. The proposed Proportional-Directional RC shows the best performance with most preferable resource usage.

Keywords Ad-hoc Network, Name-based Addressing and Routing, Routing Cache

1. Introduction Wireless ad-hoc networks have attracted the attention of

many researchers due to its various implications from the battlefield coordination to extension of mobile network service area. The main attraction is their lack of infrastructure. The devices themselves become the infrastructure of the network as well as play the role of the end user terminals depending on where it is located at a given time. But this attractiveness comes with its associated disadvantages such as connection reliab ility, bandwidth limitat ion and transmission erro r rates, security issues, power shortage and low processing and memory capabilit ies. Apart from the difficult ies the ad hoc networks face, it can still be very useful in environments that the shortcomings are less visible.

There is a growing trend in introducing new functions into home appliances and sensors (hereafter also referred as nodes) including wireless capabilit ies. If these nodes are connected by a wireless network, it will allow the user to coordinate and contro l them through other nodes from anywhere in the network. In the home environment nodes have limited movements or non at all. This will reduce the problems created by mobility. The appliances are usually not very far apart, which will reduce the transmission error rates. There is no security risk from within the network

* Corresponding author: [email protected] (Tharinda Nishantha Vidanagama) Published online at http://journal.sapub.org/jwnc Copyright © 2013 Scientific & Academic Publishing. All Rights Reserved since the whole network is owned by one owner. Most of

the appliances are plugged in to the household power supply so that there is no worry about power shortage. But there may exist, power-restricted (battery-operated) nodes (e.g. smoke sensor etc) with limited capabilit ies excluding long-range networks such as Wi-Fi. Power restricted nodes will have a shorter lifespan if it has to transmit at high power to a distant Wi-Fi access point. Also the Wi-Fi access point becomes the single dependence point to the entire network which may not cover the entire household. Also some nodes may not be able to connect to Wi-Fi due to their short transmission distances. The appliances and sensors in a household may not come from the same manufacturer thus the capabilit ies of the wireless modules such as transmission distance, processing power and memory etc. may also differ. Therefore it is also important to address the heterogeneity of the network nodes. The network should work under resource restricted conditions thus preventing less resourceful nodes forming bottlenecks or causing performance degradation. Such an environment creates ideal condit ions to use an ad hoc network with the benefit of no ext ra cost for new equipment where the heterogeneity of nodes can also be supported.

This paper proposes the use of ad hoc networks to create a home network to ease and support life in an ord inary house. The usability of this network is considered as an important factor, as the user may have interactions with home appliances such as issuing commands, receiving messages, etc. Therefore it is important for the user to have the ability to quickly identify the nodes. For ease of node identification, this paper proposes the use of actual names to identify appliances. Consider a system where the default names are already given by the manufacturer which may

52 Tharinda Nishantha Vidanagama et al.: Name-Based Message Forwarding for Home Ad hoc Networks

consist of the brand and model name etc. A user interface device (smart phone, laptop etc.) allows the user to see a list of compatible devices in the communicat ion range. The user can change the default names of the nodes as preferred. The user can also select multip le nodes and assign a common location name. After this simple procedure is repeated at other rooms, the nodes will automat ically complete the setup of the home network. A lso nodes joining the home network later require no user intervention other than changing the default name if desired.

The addressing will be unicast or mult icast depending on the number of nodes with a similar name. A DNS based solution can also be used to map between the appliance names and the IP addresses. But the user is required to map the appliance names to IP addresses during network set up or when a new device is added or removed from the network. Th is may also require additional software/ hardware.

This paper proposes a new route caching method. Three routing protocols which use the routing cache are also proposed. The performance of the proposed name-based ad hoc network and the routing schemes are evaluated through simulation.

This paper is organized as follows. The fo llowing section 2 provides a brief description of the related works. Section 3 exp lains how the nodes are organized to form a network. The section 4, explains the routing mechanis ms of the proposed methods. Section 5 presents the evaluation of the proposed methods through simulation. Finally section 6 concludes the paper.

2. Related Work Route discovery and data delivery is perfo rmed using

source routing in Cluster Based Routing Protocol (CBRP)[1] where the overhead increases as the number of nodes increase, and the route must be discovered before any data is sent. Nodes in a network can be g rouped according to some criteria. Such a group is called a cluster. A clustering mechanis m where three conceptual data structures are used to maintain cluster structure is proposed in CBRP[1] and Krishna et al.[2]. In Krishna et al.[2], the shortest path is calculated using Dijkstra’s algorithm and every node must have capability similar to cluster leading node.

A content-based routing (CBR) scheme is proposed using publisher/subscriber communication model by Petorvic et al. [3]. A Publisher node floods the network with an advertisement describing the types of events it will publish. All nodes store the advertisements in their AdsTable. Subscribers who are interested in an advertisement must send a subscription message to the publisher. Nodes between the subscribers and publishers must store the subscriptions in their SubsTable. This creates a routing layer for the events. Here the amount of cached data for routing purpose is high. Some of the proposed mechanisms used in CBR also require as much as five data structures.

Use of a “Named-Data” Scheme (NDS) is proposed by Meisel et al.[4] in a similar approach to CBR where data name prefixes are flooded and cached in the network. The data requested by subscribers is also cached in intermediate nodes for other requests.

In both CBR and NDS when the publishers, subscribers and types of events are large the caching requirement of the nodes also becomes high. When compared with CBRP and Krishna et al. the proposed methods do not require any route discovery before data is sent. This leads to less network traffic and resource usage by the nodes. The proposed routing methods also use three table structures, but CBR and NDS requires much h igher memory capacity as CBR uses 5 table structures and in the NDS the data it self is also cached.

3. Network Environment Home appliances are assumed to be grouped in locations

in a house, such as liv ing room, kitchen etc. In other words, a cluster-based approach is adopted in the home environment with its advantages such as lower control overhead[1],[2]. The clustering process is based on the locations of the house. As the structure of the house doesn’t change, the network topology also remains the same. The clusters also organize into a backbone topology without loops*1.

Initially, newly joining nodes whose status in the network is yet unknown are Undecided nodes (UN). An UN will become a Cluster Head (CH), a Gateway (GW), or an Ordinary Node (ON) after jo ining the network[5]. A CH is the leading node that provides the routing for all the member nodes in that cluster. A neighboring CH can be two or three hops away from any CH. Once an ON detects another cluster other than its Home Cluster, i.e. it is located in the intersection of two clusters; it becomes a GW where it acts as a mediator between the two clusters as in Figure 1. The rest of the member nodes are called ONs.

Figure 1. Sample network

The format ion of the clusters is based on the general location of the node. Within a general location a similar approach to the ‘lowest ID cluster algorithm’[6] is used to select the CH nodes. Instead of the ID[6] this paper uses priorities of the nodes. As nodes in the network are heterogeneous their resources and capabilit ies also differ. The priority for each node should be calculated by itself,

*1 The detailed cluster organization and location name sharing mechanisms are not in the scope of this paper.

Journal of Wireless Networking and Communications 2013, 3(4): 51-62 53

depending on its resources and capabilit ies; where h igher memory, processing power, transmission distance etc. means a higher priority. A common priority calculating function is assumed to be built into every node.

A link between two nodes is created when they have a bi-directional link between them. It is assumed that the nodes in the network do not move. But new nodes can enter and leave the network. It is also assumed that there are enough nodes in the home environment such that CH and GW nodes can be selected to form a connected network.

The names given to the home appliances such as “Kitchen oven, Kitchen television, Living room light” etc. has the form of <Location Appliance name>. This is a similar approach to class-based identifiers[8]. The <Location> describes the general location or the location name of the node in the network. The user is required to assign the location name to at least one of the nodes at each location. The <Appliance name> describes the device name such as Television. The reset of the nodes already present as well as newcomer nodes will automat ically discover their location name based on their neighbourhood*1. Even if a user mistakenly assigns a wrong location name to a new device, when it discovers that it has no neighbors with that location name, it will reassign to itself an existing location name based on its neighborhood. Having any number of nodes with same <Appliance name> with different location name is allowed. However there is no restriction in having locations with similar names. But this may affect network performance as messages maybe directed towards both locations. Therefore location name should be specified as uniquely as possible.

4. Routing Mechanism The routing is assisted by two forms of conceptual data

structures namely tabular and Routing Cache (RC). The RC is a specially organized memory cache used as a routing table. When a data message arrives at a node, each support structure is searched for the destination. If the destination is found in any of the support structures the message is forwarded, otherwise the message is discarded.

4.1. Routing Cache (RC)

The purpose of RC is to hold location informat ion about clusters that are beyond a node’s neighboring clusters. It allows a CH or GW node to route messages beyond the neighboring cluster range. Individual clusters are formed according to the structure of the house. The RC is also determined by how the individual clusters are linked together during network init iation, i.e . changes in the RC are not required in a stable house structure where inter-cluster links are stable. When new nodes enter the network, they become ON nodes of an existing cluster. When a CH node leaves, the rest of the nodes will select another node as CH from among them selves, thus the network structure is still unaffected. However when a GW node leaves and other nodes are unavailable to be chosen as

GW between the two clusters, the RC becomes invalid. A RC can be rebuilt by requesting the RCs of the neighbor GW/CH nodes. This can be performed periodically or in a reactive manner when the loss of a GW node is detected.

The RC information can also be stored in sequential form. As the number of entries is unknown a larger memory size needs to be allocated. However all the allocated memory may not be utilized leading to resource wastage. Therefore a fixed size RC that can hold higher number of entries in smaller size is used. The proposed RC is organized in a way that it gives more importance to retain the location part of a node’s address rather than the node address in its entirety. This method of RC storage reduces the address information kept about a node. A RC entry should store at least a predetermined percentage (P1) of a node’s address. If at least P1 percentage of the node’s address can not be stored or if the RC already contains an entry that matches the new candidate entry up to a predetermined percentage (P2), the entry is rejected. The RC also keeps count of the number of entries inserted. Algorithm-1 exp lains this procedure.

The RC is considered here as a character array with a fixed size. Figure 2 shows the insertion of 3 entries in to a RC of size 32 characters. The 1st RC entry is started at the beginning of the array and written towards the end. The 2nd RC entry is started at the end of the array and written towards the front. The RC is divided when more entries are inserted. The new entries are written, starting from a divided location towards the front or the end of the array. For example the RC is div ided in to two parts for 3rd and 4th entries at 16th array position.

Algorithm-1:

1: while next RC entry X exists do { 2: Compare X with new candidate entry E for a match; 3: if match percentage < p2 then { 4: if at least p1 percent of E can be stored in the RC then { 5: Insert E in to the RC using equations (1) (2) (3); 6: Number_Of_Entries++; } 7: else { discard E; } 8: else { discard E; } }

Figure 2. Example RC entries

When an entry is made into the RC the insertion starting position for the ith entry (i=3, 4, 5…) is given according to the following formula[7]:

( )T S P q k ri i i ii = + + (1) where S is RC size in characters, k i is the number of parts RC is divided into, where 2x

ik = , ( 1,2,3...x = ) such that

K i1

t2 4

h5 6 7

e8 9 10

c3 11 12

n13 14 15 16 17 18 19 20

_21 23 24 25 26 27 28 29 30 3122

Entry 1: Kitchen oven

K i t h e rc n _ _ g n i v i L21 8 5 3 2 1 013

K i t h e rc n B e d _ r g o n i o i L0 1 2 5 83 13

Entry 2: Living room Television

Entry 3: Bed room light

32

0 1 3 5 82 13 21

54 Tharinda Nishantha Vidanagama et al.: Name-Based Message Forwarding for Home Ad hoc Networks

12 2x xi +< ≤ . iq and ir are -1 and 0 if i%2=0; and 0 and 1 otherwise. Also if i%2=0; the new entry is written towards the front of the array, otherwise it is written towards the end. The divided part in RC to be occupied is given by Pi(=i-ki). Also for any RC, T1=0; and T2=S. The number of characters allocated for ith entry in RC is given by the following formula[7]:

Number of Characters = iS k . (2)

Character positions of the ith entry in the RC is given by the following formula[7],

Character Positions = ( )ni i iT f q r++ (3)

where n if S k≤ , ( nf = 0,1,2,3,5…, n = 1,2,3…) is a variation of the Fibonacci series number where the repeti-tion of number 1 has been omitted. For entry 3 in Figure 2;

132 3 2 1; 2;x x x k+< ≤ ⇒ = ⇒ =

3 33; 3%2 1 0, 1;i q r⇒ ⇒= = = = 3 3 2 1;P = − =

[ ]3(1) 32(1 0) / 2 1 17T⇒ = + + = ; i.e. the starting position of 3rd entry is the 17th character in an array with positions labeled from 1 to 32. Character length allocated for 3rd entry;

3(2) 32 / 32 / 2 16;k⇒ = = The character positions of 3rd entry are; 3(3) (0 1);nT f⇒ + +

17 (0,1, 2,3,5,8,13)⇒ + = 17,18,19, 20, 22, 25, 30 . The Fibonacci series was chosen for character placement

because the beginning of the series the values are close to each other and as the series values increase the difference between two consecutive series values also rapidly increase. This property is used as a means to preserve the front most part of the node names (i.e. the Location). A measure of character density D of an entry in the RC is described as,

11 ( )iiD f f+∝ − (4)

where fi, fi+1 (i = 0,1,2,…) are consecutive Fibonacci series numbers. Figure 3 was obtained by using equation (4) with a RC entry of size 15 characters. For example in Figure 3 entry 1, D2~3=1/(3-2)=1; D4~5=1/(5-3)=0.5. The use of

Fibonacci series also introduces some empty space towards the end of an RC entry (Figure 3 Entry 1 is written towards the end of the RC and the character density decreases rapidly i.e . the emptiness also increase). But in the proposed methodology the starting position of the next consecutive entry is where this emptiness is at the highest in the RC and the entry is written towards the previous entry (Figure 3 Entry 2 is written towards the beginning of the RC starting from the end). This assures that the beginning parts of both entries only have a very low risk of being overwritten and allows the use of limited RC space in efficient manner. Since the RC has a fixed length, this method also allows flexib ility in the number of RC entries rather than allocation of fixed size slot for each RC entry.

Figure 2, entry 2, the 3rd and 7th characters are overwritten by entry 3, but other characters remain intact. From equations (1),(2),(3) the character positions for entry 2 are 32,31,30,29,27,24,19,11 and for entry 3 are 17,18,19,20,22,25,30. By comparison the overwritten character positions of entry 2 by entry 3 are found as 19 and 30 i.e. the 3rd and 7th characters of entry 2. This method was used to perform a calculat ion to find the probability of preservation of each character position of each entry in the RC. Randomly generated names with varying lengths were inserted to RCs of various lengths using the equations (1), (2) and (3). After insertion the names were read back from the RCs using the same equations and compared with the original entry to find the intact and overwritten character positions. Each character read from the RC entry is compared with the original name’s characters in their corresponding positions. The RCs were also inspected at each entry to find the remaining empty character positions. Figure 4 shows the average probability of staying intact, overwritten by later entries or emptiness of each character position of an entry in the RC. Calculat ion data in Figure 4 also corresponds with the character density described in Figure 3.

Figure 3. Character density (D) Vs Character position range (f2-f1)

00.20.40.60.8

11.2

0~1

2~3

4~5

6~7

8~9

10~11

12~13

14~15

Character Position

Cha

ract

er D

ensi

ty

Entry 2Entry 1

Journal of Wireless Networking and Communications 2013, 3(4): 51-62 55

Figure 4. Probability of Overriting, Intact and Empty

From Figure 4, when RC entries are compared for a match, the beginning of an entry should have a higher weight towards the overall matching percentage as the intact probability of RC entries are higher at the beginning. This also leads to higher accuracy with less amount of memory space. The intact probability of each character position in Figure 4 is used as a weight function (wx) denoted approximately by,

1// (1 exp( ( ln(2 1) ) / ))xe ew a b x d c d= + + − − − − (5)

such that1

( 1)x

x xw→∞

=∑

where a=0.14116953,

b=-0.12824898, c=6.590385, d=1.9205733, e=2.1017526 and x (=1,2,3...) represents the character positions. The total matching percentage is calculated by adding all the weights at each matching character position. The overall matching percentage of entry i is calculated as,

1( ) 100%

N

x xx

w m=

× ∑ (6)

where wx (x=1,2,3,…,N) is the probability weight at charac-ter position x. mx=1, if the character at position x in both the RC entry and a destination address are the same; otherwise mx=0 and N if S k≤ .

To search for a match to a destination address in RC, each RC entry is read and compared with the destination address. In Figure 2 after inserting entry 3 to RC, the RC entry 2 is read using equation (3) where T2=32. The result is “Lioingdr”. When matching RC entry 2 with the original entry 2 (i.e. Liv ing room Television), the 3rd and 7th characters do not match i.e. m3, m7=0. Using equation (6), the overall matching percentage of RC entry 2 to the original entry 2 is (w1+ w2+ w4+ w5+ w6+ w8)×100% =~76.54%.

When there are many instances of the same name, Algorithm-1 allows only one instance to be inserted in to the RC. This overlapping or aggregation of names also al-lows the efficient use of RC space. To limit the RC size, the optimal RC size must be determined for a given number of node names.

4.2. Optimal Routing Cache Size

When a new entry is made to the RC some of the characters of the existing entries may be overwritten. The term affected elements is used to identify the entries that have a possibility o f loosing some characters. In o rder to determine the optimal RC size for a given number of names, the affected elements (iaffected) when a new entry i is inserted into the RC with Procedure-1 are detected.

Procedure-1

Step1. Find 2xik = ;where, 12 2x xi +< ≤ , 0,1, 2...x =

Step2. Find i i iP i k q= − +

Step3. Take the set of fractions E | 0 2 1nn im k< < ;

where n = 1, 2, 3… ( 1)x − , 0nm > is an integer. Step4. If E contains two fractions with the same denominator ( )2 , 2t tm mβα , then select the fraction closest to

i iP k , i.e. the fraction which satisfies the condition,

min ( 2 ) 2,t ti ii im m P kP kα β

− −

where 0, ,m m tβα > are integers.

Step5. For all 2nnm ,

If 2nn i im P q≤ + ; iaffected = 2x n

nm −+ ,

If 2nn i im P q> + ; iaffected = 2 1x n

nm −+ + .

The remaining percentage of an entry is defined as, _ _ _ _ _ _ _ _

100%_ _ _ _ _ _

Number of characters of an entry remaining in RC

Number of characters in original RC entry× .

To calculate the remaining percentage of the iaffected, first, the set A of character positions of iaffected is found by (3),

0

0.2

0.4

0.6

0.8

1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15Character Position

Prob

abili

ty

OverwrittenEmptyIntact

56 Tharinda Nishantha Vidanagama et al.: Name-Based Message Forwarding for Home Ad hoc Networks

1

( )( )affected

affected

ii i i

S P qif q rnki

v

nrA

++ + +

==

(7)

where (n =1,2,3,… v) and |affectedv iv f S k≤ (for any RC,

entries 1 and 2 are affected by all consecutive entries). The element iaffected may also be affected by some of the

entries that are already inserted after iaffected. Let’s define a set J as the set of entries that affect iaffected in the range of (iaffected +1) ~ (i ). The above mentioned Procedure-1 is used exhaustively to find all elements ( j∈ J) of J. Let’s define a set B as the set of all character positions of all elements j∈J. This is also found by (3).

1

( )( )

affected

j jj j j

j

S P qf q rnk

i

j irB

+

++ + +

==

(8)

where (n = 1,2,3,… v) and | jvv f S k≤ . Now the remain-ing percentage θ of iaffected is determined as,

100%A A B

− ∩= × (9)

To detect an entry correctly in the RC, the entry must be intact at least up to a predetermined percentage ( Θ ). Therefore if the number of names is known, the optimal size S o f the RC can be calculated such that the remaining percentage of all entries in the RC is greater than Θ .

Figure 5. RC size Vs Remaining Entry Percentage Vs Number of Entries Vs RC size (Bytes)

Procedure-1 was used to determine the required size of a RC for a g iven number of names to maintain a required remain ing percentage. Figure 5 shows how the number of entries with d ifferent remaining percentage changes with the size o f the RC. Here when using Procedure-1, all names are unique and therefore overlapping or aggregation of names will not occur i.e. Figure 5 shows the number of distinct entries per cache size for each remaining percentage.

The number of entries stored in a given RC size varies with the stored percentage of an entry from its original size. Storing higher percentage of the original names means a less number of entries are inserted to a given RC size and vice versa. After the maximum number of entries has been inserted to a given RC size, inserting even more elements would lower the remain ing percentage of the older entries yielding them unrecognizab le.

4.3. Tabular Support Structures

Three forms of tabular data are kept to support the clustering and routing mechanism, namely Neighbor Tab le (NT)[1], Cluster Adjacency Tables (CAT)[1], and Routing Cache Table (RCT)[9]. All the nodes keep an NT (Tab le 1). It holds the informat ion about a node’s one-hop neighbors that have a bi-directional link with the node. It allows a node to directly send messages to its neighbors. The CH and the GW nodes also keep a CAT (Tab le 2) to hold the informat ion about the neighboring clusters. It holds pairs of a CH name and its GW name, which is the next immediate neighbor in the direction of that CH. CAT allows a CH or GW node to accurately route messages to its neighboring clusters. In some of the proposed mechanisms CH and GW uses the RCT (Table 3). Th is table will store the one hop node name of a GW/CH (that has a RC for that direction), a RC and number of entries in that RC.

Table 1. Neighbor Table

Key Description Name* Name of the node(including location) Status Status of the node (ON/GW/CH)

Time stamp Last message received time at internal clock

Table 2. Cluster Adjacency Table

Key Description CH name* Neighbor CH node name GW name First hop GW node name to this cluster

Time stamp Last Hello received time from first hop GW node

Table 3. Routing Cache Table

Key Description

Name* Name of first hop CH/GW node in the direction of RC

RC Directional RC associated with the link Number of entries Number of entries in the RC

* - denotes the primary key

4.4. Types of Messages

Journal of Wireless Networking and Communications 2013, 3(4): 51-62 57

Figure 6. Control packet format

Figure 7. Data packet format

There are two types of messages used in the proposed network. Control messages are sent only to a node’s one-hop neighbors. A control message (Figure 6) contains the type of message (Type), status (Stat.) and Priority o f the sender as well as CAT and RC of the sender (if a RCT is used at the sender, a single RC with the total size is created by inserting all entries in directional RCs except the directional RC in the sending direction). The length of CAT, RC and each name field is also specified as these may vary. All control messages are terminated at their one-hop neighbors. The receivers update their NT, CAT and RC/RCT with the new control data using Algorithm-3. The receivers collect updates for certain duration and create new control messages that are sent to its neighbors. This procedure configures the entire network. The control packet size is relatively large when compared with IP addressing scheme. But since the network topology is stable, once the network is setup there is no need to send control packets. However occasionally when a CH or GW node is removed from the network, control messages are needed during the reorganizat ion of the network. Also considering the home environment, one CAT entry corresponds to one location in the house and such a location may only have a few adjacent locations i.e. it is likely that any CAT will only have a limited number of entries (<~5). Also the CAT and RC part of the control message is only used by GW and CH nodes to exchange routing information, ON nodes do not use these two components of the control message.

Data messages (Figure 7) are generated by nodes after the network is configured. Data messages consist of the Type of message (Type), message sequence number (MID), time to live (TTL), length of name fields for Next receiver (NRcv), destination (Dest.), source and the corresponding name fields as well as the data it self.

An upper limit of 64 bytes for node names is used for both data and control packets. However the names vary in length. In order to limit the packet size, a length field is used for node names. A destination name length (Length of Dest.) of zero will indicate that a control message is sent without a specific next receiver. For data, next receiver name length (length of NRcv) of zero will indicate the same. Also CAT and RC length of zero will indicate that they are not included in the control packet.

4.5. Routing the Messages

The use of RCs omits the necessity for route discovery. After the network has configured itself, messages are sent without any route discovery procedures. Also all nodes need not participate in the routing process. Nodes in the network can generate data messages for any destination. The destination name does not have to be specified exact ly in the data message but it should be specified as uniquely as possible to avoid multip le nodes with similar names receiving the message*2.

A node forwarding a message will first search for the destination in NT. If a match is found (i.e. destination is a neighbor) the next receiver is specified as the destination address. Next, CAT is also searched. If a match is found the next receiver is the corresponding GW node name in the CAT entry. Thereafter each entry in RC/RCT is also searched. A match found when a single RC is used implies that the message is forwarded without a next receiver. When RCT is used the corresponding GW name of the directional RC is the next receiver. If mult iple next receivers are found, the message is also forwarded without a next receiver. A lgorithm-2 exp lains this procedure. This algorithm gradually routes the data messages in the direction of the destination.

*2 A study of the multicast nature is published in [10] by the authors.

1 2 4 5 6 7 8 9 103 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 30 3122Length of Dest.

0Type

Source name ...Dest. Name ...

Length of CAT CAT entry 1-CH length CAT entry 1-CH name ...

CAT entry n-CH length CAT entry n-CH name ...

RC ...

CAT entry 1-GW length CAT entry 1-GW name ...

CAT entry n-GW length CAT entry n-GW name ...Length of RC Number of RC Entries

…….

Stat. Priority Length of source

Length of NRcv.

Source Name ...

1 2 4 5 6 7 8 9 103 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 30 3122TTL

0Type

Data ...

NRcv Name ...MIDLength of Dest. Dest. Name ...

Length of Source

58 Tharinda Nishantha Vidanagama et al.: Name-Based Message Forwarding for Home Ad hoc Networks

Algorithm-2: 1: if message type is data then { 2: if destination is this node then { 3: consume data; } 4: else if this node is NO T an Ordinary Node then { 5: if this node is Nxt. Receiver or message has no specific Nxt. receiver then { 6: search for new Nxt. Receiver in NT, CAT, RC/RCT; 7: if a new Nxt. Receiver NO T found then { 8: if this node is a GW then { 9: send data message to Home CH;} 10: else { 11: discard message; }} 12: else if only one new Nxt. Receiver found then { 13: forward message to new Nxt. Receiver; } 14: else if multiple new Nxt. Receivers are found then { 15: forward message without specific new Nxt. receiver;}}} 16: else if this node is an ON then { 17: send data message to Home CH;}} 18: else if message type is control then { 19: handle control message using Algorithm-3;}

Due to the broadcast nature of the wireless communicat ion, it may not be possible to direct a transmission towards only one node. Even with the use of directional antennas it may not be possible as some nodes are close together. But if the next receiver field is transmitted at the beginning of the message only the corresponding node needs to receive the entire message for processing and others can ignore the remainder of the message.

Message misdirect ion occurs when GW or CH nodes that are not in the direction of a message destination process a data message. If the sender node is able to find only one next receiver, the next transmission or hop will not result in any misdirection. In Algorithm-2, if the search of the three data structures (NT, CAT and RC/RCT) y ields multip le next receivers for a data message, it is transmitted without a specific next receiver. Th is results in all CH and GW nodes in the transmission range handling the data message. If multip le destinations do exist the intermediate nodes that lie in their path would forward the received messages appropriately repeating Algorithm-2. But other nodes that are not in either of these paths will d iscard the message which is considered as misdirected message.

Algorithm-3: 1: if sender is unknown then { 2: Add as a neighbor;} 3: while next CH, X of the sender’s CAT exists do { 4: if receiver is a CH and previous sender is a GW node then { 5: Add entry to CAT;} 6: else if receiver is a GW and previous sender is a CH/GW then{ 7: if sender has direct link to X then { 8: Add entry to CAT;} 9: else { 10: insert X to RC/RCT using Algorithm 1;}}} 11: while next entry Y exists in sender’s RC do { 12: insert Y to RC/RCT using Algorithm-1;}

4.5.1. Sing le Routing Cache (SRC)[9]

First a single RC is used for CHs and GWs. In SRC

routing, the data messages are forwarded without specifying a next receiver (except in the last hop) as the nodes can not determine the direct ion of the destination. This process continues until the destination address is found in NT of a node. Here at the last hop, the next receiver is specified as the destination. The discarded messages specified in Algorithm-2 are considered as misdirected messages.

4.5.2. Equal-Sized Directional Routing Cache (EDRC)[9] A node using SRC is unable to determine the next

receiver due to lack of info rmation. If the number of bidirectional links is h igh, the amount of resource wastage also becomes higher. This can be avoided if each CH/GW node has directional information in terms of next hop, of other clusters that are stored in the RC. Th is is achieved by having a separate RC for each direction. When a control message is received the receiver node will search the received CAT for non neighbor clusters and received RC for unknown clusters. If there are, it will create a RCT and the full fixed-size RC is associated with the sender’s name and inserts qualified entries from both received CAT and RC. If later more unknown cluster names are found in the CAT or RC of the control messages from the same neighbor sender, it will update the RC for that part icular neighbor sender. Later if unknown cluster names are also received through other CHs or GWs, the node will split the fixed RC size in to equal parts for each direction and add them to the RCT. The entries are also re-sized according to the available RC space. If there are d number of d irections, the node will split the fixed RC size S in to equal parts of size

/EDRCS S d= for each direction.

4.5.3. Proportionally Sized Directional Routing Cache (PDRC)[9]

The number of entries for each link that a node will have cannot be predetermined. Therefore in EDRC some entries will enjoy plenty of RC space while others may lose considerable data due to overwrit ing or be lost completely. When many bi-directional links are established by a node the link with highest entries will suffer the most. This will lead to higher misdirection and loss of messages in that particular d irect ion.

To overcome this issue a fixed size RC is proportionally divided to each bi-directional link accord ing to the number of RC entries each direction has. This is possible because the number of entries in each RC is also kept by the nodes. If a node has n number of links with xi number of entries in each i directional RC and the fixed RC size is S, the size of the RC in d irect ion a is given by aS .

( )1

na ia x iS S x

=∑= (10)

Initially the full RC size will be given to the first bidirectional link with a RC entry. Later if more links require RC entries to be stored, the RC is divided proportionally, and the entries are re-sized according to the available RC size. Since the direct ion in terms o f next hop destination of the new PDRCs must also be kept, they are

Journal of Wireless Networking and Communications 2013, 3(4): 51-62 59

added to a RCT.

4.6. Energy Consumption for Routing

In a home environment it is also important to use technologies that use less energy. A measurement of power consumption for a message transmission can be represented as follows.

2Power M s d∝ × × (11) where M is the memory size used by the node, s is size of message and d is transmission distance. Other factors that may affect power consumption is considered as common to the routing protocols discussed here. From (11) power consumed by a node during simulation for all messages is given as follows.

2

1( )

k

i i ii

M s n d=

× × ×∑ (12)

where k is the number of messages sent by a node. From (12) the power consumed by all nodes in the network is represented as,

2

1 1( )

N k

i i in i

M s n d= =

× × ×∑∑ (13)

where N is the number of nodes in the network.

5. Evaluation A simulation program was developed in order to evaluate

the above proposal. During the simulation, it is assumed that a reliab le connection is provided from lower layers to the network layer.

5.1. Simulation Environment

A flat surface of 100×100 square units was used as the test environment. This proposal considers even the smallest of devices such as lights/sensors to be a part of the network; therefore 100 nodes are located in the test environment.

Each node has various transmission distances (1~3 units) and priorit ies i.e. the nodes are heterogeneous in nature. Nodes are placed randomly in the test area before each simulation to allow the formation of random simulation networks with backbone topology. The location names are assigned to a random number of nodes (1~5) at each location to represent the user’s role in network setup.

First a number of control messages are sent by each node in order to populate NTs, CATs and RC/RCTs. The network is allowed to configure until there are no more UNs present (this period is not considered in the evaluation). Thereafter each node will send data messages to every other node in the network. In the simulat ion environment the maximum number of location names (unique RC entries) remained at 20. According to Figure 5 the RC size of 64 bytes can hold slightly less than 20 of such entries. But this RC size is chosen for the simulation as this may also expose the limitation of RC usage.

5.2. Selecting a Value for “ Θ ”

A simulation was carried out to find a suitable value for Θ . Th is simulation was performed using the PDRC routing algorithm by increasing the number of nodes in the network in steps of 5 as well as the number of location names in steps of 1 and recording the discarded messages and failures in delivering messages to their intended destinations respectively. Simulation showed that both misdirect ion and delivery failure (Figure 8) is high when a greater percentage of the location names is kept in the RC as only a limited number of RC entries can be made. But also when the stored information in the RC also reaches a value lower than a certain percentage, the misdirections and delivery failures increased. When the RC stores less informat ion, it may become too difficu lt to distinguish individual entries clearly, lead ing to higher number of misdirect ions and delivery failures. The simulation showed that a value of 30% was the best values forΘ .

Figure 8. Average undelivered messages per sent messages Vs Number of nodes/Number of Locations

00.020.040.060.08

0.10.12

5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Number of Nodes / Number of Locations

Und

eliv

erd

mes

sage

s pe

r sen

t mes

sage

s 70% 50%

30% 20%

60 Tharinda Nishantha Vidanagama et al.: Name-Based Message Forwarding for Home Ad hoc Networks

Figure 9. Average Undelivered messages per Sent messages Vs Number of Nodes/ Number of Locations

5.3. Performance Evaluation The CBRP[1] and CBR[3] are also used to compare the

performance against the proposed routing algorithms. Both CBRP as well as the proposed methods use three conceptual data structures of which two are common i.e. NT and CAT. For comparability, first the simulation only uses three data structures for the routing purpose i.e. NT, CAT and two-hop topology database (TDb) for CBRP and RC/RCT for the proposed methods. The previous simulation was repeated after setting the value of Θ as 30 for all three proposed routing mechanis ms and CBRP.

One-to-one communication in CBR requires that every node subscribe to every other node. But when implementing CBR in a clustered environment, the covering optimization [3] is used to forward subscriptions by GW and CH nodes at each location in o rder to minimize the SubsTable. The SubsTable is used to compare with RC/RCT.

Figure 9 shows that the delivery failures for SRC are lower than that of EDRC. The reason here is that EDRC divides the cache size equally among the directions but the number of entries in each direction may d iffer. If a large number of entries have to be inserted in to one of the smaller d irectional RCs, some entries may be lost after reaching maximum number of entries. The d irections that may have lost some of its entries cause the messages to fail to reach the intended destinations. This doesn’t occur in SRC until maximum number of entries fo r total RC size is reached as RC is not divided. But the amount of misdirections per hop for SRC is very much h igher (Maximum is 1.0386 at 100 nodes) than EDRC and PDRC. This is because nodes using SRC can not determine the exact next hop destination. EDRC and PDRC show negligibly low message misdirections per hop compared with SRC, as these methods are able to determine the next hop. Even here, EDRC (Maximum is 0.0042 at 100 nodes) shows a slightly higher amount of misdirected messages per

hop compared with PDRC (Maximum is 0.0028 at 100 nodes).

Routing in CBRP and CBR will not result in any misdirection/overhead (Here CBRP will not use source routing) as data messages are sent only after the TDb of CBRP and SubsTable for CBR is populated during network initiat ion. This allows CBRP and CBR to forward data messages without additional route discovery. CBRP uses the TDb which enables the discovery of exact next hop for the known destinations. Also CBR uses the SubsTable at each node to achieve the same. Figure 9 shows that the delivery failu res for CBRP and CBR are very high compared with the proposed methods with equal resources. In Figure 9 PDRC shows a min imum of 99.2% delivery success rate at 100 nodes at cache limit of 64 bytes, whereas this value for CBRP and CBR are only 6% and 28.9% respectively. CBRP was unable to achieve 100% success rate even with unlimited TDb size. However given 256 bytes limit for SubsTable in CBR, it achieved 100% success rate. The proposed methods were also able to achieve the same at 128 bytes of cache space for the current network environment. Incase of a delivery failure for the proposed methods due to insufficient memory, source routing can easily be applied as an alternative with the existing conceptual data structures.

Figure 10 shows the message overhead of the proposed methods and CBRP to achieve a 100% success rate (Here CBRP will use source routing if destination is not found even in TDb which causes the message overhead for CBRP). CBR will not cause any routing overhead as the SubsTable is already populated by all nodes in the simulat ion. However CBR requires larger memory size than other methods discussed here. Message overhead observed for the proposed methods are caused by the misdirection o f data messages.

0

0.2

0.4

0.6

0.8

1

5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20Number of Nodes / Number of Locations

Und

eliv

erd

mes

sage

s pe

r sen

t m

essa

ges

PDRC - Cache limit=64 EDRC - Cache limit=64SRC - Cache limit=64 CBRP - TDb Size=64CBRP - TDb Size=128 CBRP - Unlimited TDb SizeCBR - SubsTable limit=128 CBR - SubsTable limit=64

Journal of Wireless Networking and Communications 2013, 3(4): 51-62 61

Figure 10. Overhead messages per hop for delivered messages Vs Number of Nodes/ Number of Locations

Figure 11. Power consumption to achieve 100% success Vs Number of Nodes/ Number of Locations

Figure 11 shows the power consumption of the proposed routing protocols as well as CBRP and CBR to achieve a 100% message delivery success rate. Here CBRP only showed very little variat ion in the power consumption when the memory size used for TDb was varied as it is mostly affected by the larger number of rout setup messages generated by CBRP. Even though CBR does not cause any message routing overhead, it requires larger memory size to maintain the SubsTable. The larger memory size is the main factor for CBR’s observed power consumption. SRC shows higher power consumption than EDRC/PDRC due to its higher number of misdirected messages. Figure 11 shows that the all proposed methods on average consume less power when compared with CBR and CBRP.

When comparing the three RC usages and the performance against CBRP and CBR, PDRC shows the best performance fo r any number of nodes considered in the

simulation. The limitation of the use of the RCs was also discovered

during the simulat ion. It showed that after the network accumulated a certain number of nodes (i.e . the number of location names also increases) delivery failures (Figure 8, Figure 9) show a significant increase. This occurs when the chosen RC (of size 64) reaches its threshold number of inserted names. Here, the RC is unable to accept more names and maintain the value of Θ and thus it rejects the new names leading to the observed increase in the message misdirections and delivery failures.

The RC was also compared with sequential storage. The randomly generated names were stored sequentially in an array (same size as RC) until it was unable to store and maintain at least 30% of each entry. The results showed that number of sequential entry storage is 51.8% lower on average than that of RC values shown in Figure 5. During

5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20Number of Nodes/Number of Locations

Ove

rhea

d Pe

r Hop

for

Del

iver

ed M

essa

ges

PDRC-128 EDRC-128SRC-128 CBRP-128CBRP-Unlimited CBRP-64

10-3

10-4

10-5

10-2

10-1

100

101

5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20Number of Nodes/ Number of Locations

Pow

er U

nits

PDRC-128 EDRC-128SRC-128 CBR-256CBRP-128 CBRP-Unlimited CBRP-64

0

2☓108

4☓108

6☓108

8☓108

62 Tharinda Nishantha Vidanagama et al.: Name-Based Message Forwarding for Home Ad hoc Networks

the comparison by allowing aggregation of similar keywords, an average increase in storage of ~6.11% than values in Figure 5 was also observed.

6. Conclusions This paper proposed and presented the usage of a new

conceptual data structure as a routing cache. Its underlying mathematical foundation is analyzed and a guideline (Figure 5) was produced for its use.

Three methods that use the proposed RC to route messages were also presented and the message overhead, delivery failures and power consumption experienced by each method were also discussed. The comparison of the three methods shows that the use of directional RCs minimizes the amount of misdirected messages and delivery failure of messages. The comparison with equal resources also showed high performance with all three proposed mechanis ms against CBRP and CBR. When comparing the two types of directional RCs, the PDRC method gives the most preferable performance when considering limited memory usage.

The limitations of this RC usage were also exposed by forcib ly overwhelming the selected RC size in the simulation. The observed RC limitation in the simulation is also coherent with the mathematically calculated RC limitat ions.

With no ext ra equipment and the usage of real world language which also promotes ease of use, this proposal offers an attractive solution to the prob lem of a futuristic ad hoc household network.

REFERENCES [1] Jiang M. Li. J. and Y.C. Tay; “Cluster based routing protocol,

(CBRP)”. draft-ietf-manet-cbrp-spec-01.txt, Internet draft, Aug’99.

[2] P. Krishna, N.H. Vaidya, M. Chatterjee and D.K. Pradhan; “A cluster-based approach for routing in dynamic networks”. ACM SIGCOMM Computer Communication Review 27:49-65, 1997.

[3] M. Petorvic, V. Muthusamy, and H. Jacobsen; “Content-Based routing in mobile ad hoc networks”, IEEE MobiQuitous, 2005.

[4] M. Meisel, V. Pappas and L. Zhang; “Ad hoc networking via Named-data” MobiArch '10, Proc. of the 5th ACM intl. workshop, pp 3-8, 978-1-4503-0143-5

[5] M. Gerla, J. Tzu-Chieh Tsai,; “Multicluster, Mobile, Multimedia radio network”. ACM- Baltzer Journal of Wireless Networks, 1: 255-265, 1995

[6] A. Ephremides, J.E. Wieselthier, D.J. Baker,; “A design concept for reliable mobile radio networks with frequency hopping signaling”, in Proc. of IEEE, 75(1) (1987), pp.56~73.

[7] Vidanagama, T.N.; Nakazato, H.; “Description Based Routing & Addressing in Cluster Based Ad Hoc Network” IEICE-General Conference 2009.

[8] R.C.Shah, J.M. Rabaey, “Energy aware routing for low energy ad hoc sensor networks”, 0-7803-7376-6/02 IEEE 2002, pp.350-355.

[9] Vidanagama, T.N.; Nakazato, H.; "Reduction of Message Misdirection in Description Based Clustered Ad Hoc Networks," CCNC 2010 7th IEEE, pp.1-5, 9-12 Jan. 2010.

[10] Vidanagama, T. N.; Nakazato, H.; "Keyword-based Unicast and Multicast in a Cluster-based Ad hoc Network", IEICE Tech. Rep., CS2011-66, pp. 13-18, Dec. 2011.