A Preemptive Distributed Address Assignment ... - IEEE Xplore

9 downloads 198 Views 188KB Size Report
exhausts its list of addresses while another node has addresses go unused. Therefore ... Keywords—wireless sensor network; addressing; ZigBee; routing.
A Preemptive Distributed Address Assignment Mechanism for Wireless Sensor Networks Miaoqi Fang

Jian Wan

Xianghua Xu

Grid and Services Computing Lab S. of Computer Science, Hangzhou Dianzi University Hangzhou, China [email protected]

Grid and Services Computing Lab, S. of Computer Science, Hangzhou Dianzi University Hangzhou, China [email protected]

Grid and Services Computing Lab, S. of Computer Science, Hangzhou Dianzi University Hangzhou, China [email protected]

Abstract—Dynamic address assignment is a desirable feature for deploying wireless sensor network. Typically, a distributed address assignment mechanism is accomplished by ZigBee alliance, whereas, sensors join a network is unpredictable, it may engender uneven node density, so it is possible that one node exhausts its list of addresses while another node has addresses go unused. Therefore, a preemptive approach is needed for ZigBee addressing mechanism. This paper presents a preemptive distributed address assignment to provide a preemptive scheme for ZigBee addressing mechanism. In addition, we give an autorouting algorithm. Simulation results show that nodes can acquire an address even in high node density area, and the scheme increases the total number of nodes in a sensor network. Keywords—wireless sensor network; addressing; ZigBee; routing.

I. INTRODUCTION Recently, the researches in wireless communications have motivated the development of low-cost sensors, low power consumption, low transmission rate, single processing and wireless communication capability. Wireless sensor networks are becoming to provide commercial solutions to many problems. For example, patient monitoring, building lighting control, remote consumer electronics, environment control and so on. In wireless sensor networks, maybe thousands of sensor network nodes collect information in an area. Sensors often generate abundant data and the nodes often have limited power, memory, computation capabilities, etc. For wireless sensor networks with a large number of sensors, it is important to design a proper algorithm to assign sensors address in order to increase the number of nodes in a sensor network. Besides, aside from the very few setups that utilize mobile sensors, most of the network architectures assume that sensor nodes are stationary [1]. In a typical wireless sensor network, the sensors’ locations are fixed and the instability of clusters due to mobility of sensors is not an issue [2]. In wireless sensor networks, the sensors might be densely deployed [3]. In some solutions, the sensors density is uneven. In this condition, we propose an automatic preemptive distributed addressing mechanism in order to establish the network quickly and neatly.

This paper presents an addressing mechanism based on the ZigBee Specification’s Distributed Address Assignment Mechanism which is often called Cskip. The main contributions of this paper are: i) We design an address Autoconfiguration mechanism called Preemptive Distributed Address Assignment Mechanism (PDAAM). ii) We design a routing protocol in wireless sensor networks based on PDAAM. iii) We show the performance of PDAAM for the increase of total number of nodes in a sensor network. The remainder of this paper is organized as follows. Section II discusses related work of address assignment. Section III develops the motivation of our improvement. In section IV, we propose the preemptive addressing mechanism and autorouting algorithm. Section V presents evaluation performance and a simple implementation. Finally, in section VI, we present our conclusion. II. RELATED WORK There are several addressing mechanisms that address the node configuration problem [4-11]. The most famous protocol is Dynamic Host Configuration Protocol (DHCP) [4], but it is commonly used for the purpose of providing configuration parameters to Internet hosts. DHCP protocol may not fit for wireless sensor networks. In [5], C. E. Perkins presents a Duplicate Address Detection (DAD) protocol to determine whether a candidate address is used or not. With the DAD, when a node needs an address, it picks a random address, sends a "Route request (RREQ)" to the random address, if the chosen node is in used, the node will reply a "Route reply (RREP)" to the node. If the node received RREP, then the chosen address is already assigned to another node, it will pick up another address and retry the procedure. If the node hasn’t received RREP during timeout period, it retries the RREQ up to RREQ_RETRIES times. If there is no RREP received after RREQ_RETRIES times, it assigns the candidate address to the new node. At last, MANETconf in [8] presents a distributed dynamic host configuration protocol in a mobile ad hoc network. In

*This work is supported by Science and Technology Research and Development Program of Zhejiang Province, China. (Grant No. 2007C11023, 2007C21G3230005 and 2007R40G2040097)

978-1-4244-2108-4/08/$25.00 © 2008 IEEE

1

MANETconf, each node maintains two data structures, one is Allocated, the other is Allocate_Pending. The Allocated maintains a set of all addresses used, the Allocate_Pending maintains a set of addresses for which is allocating, but not yet completed. When a node joins the MANET, it chooses one neighbor i, then the neighbor i selects an address x, and informs the network. If the address x is neither in the Allocated nor in the Allocate_Pending of the other nodes in the MANET, these nodes send a negative reply to the node i. The node i assigns the address x to the new node, otherwise another address must be tried. III.

MOTIVATION

the node gives address 4 to it, and it assigns the address to Node X. IV.

PRESENTATION OF THE ALGORITHMS

A. Preemptive Addressing Mechanism We propose an addressing mechanism in which there is a need for a special preemptive address table, and the unicity is ensured. It is based on DAAM [12], and it helps DAAM sharing addresses between devices. When an address preempted happened, the two nodes maintain a preemptive address table, and the preemptive address is inserted into two tables to record the address is preempted.

In ZigBee Specification [12], ZigBee alliance presents a distributed address assignment mechanism (often called Cskip). In the algorithm, it distinguishes three types of devices as coordinator, routers and end devices. A coordinator starts a PAN, and it begins to assign addresses to other nodes. Routers have a capability of assigning addresses to other nodes to join PAN. End devices do not have the capability of assigning addresses to other nodes. In [13], it just distinguishes two types of devices as coordinator and other nodes, whether other nodes have the capacity of assigning addresses due to its level away from the coordinator. In this paper, we classify the nodes types as coordinator, routes and end devices. Each router is designed to hold a finite block of network addresses. These addresses are generated by the nodes’ parent and given to its children. When the first node (coordinator) starts a PAN, it dictates the maximum number of children, Cm, dictates the maximum number of routers, Rm, the routers or coordinator may have, and dictates the maximum depth, Lm, of the physical topology, we know the tree. In a PAN, which following ZigBee standard, the maximum nodes number (Nm) is given by the following equation:

if Rm = 1 ­Cm ⋅ Lm + 1, ° Lm Nm = ®1 − Cm ⋅ Rm + Cm − Rm , otherwise ° 1 − Rm ¯

(1)

From the equation we can learn that if Nm established, the value scale of Cm, Rm and Lm are limited. If Cm increases, Lm decreases. Both of them influence how network addresses are dispensed. Further more, in some conditions the sensor density is uneven, there might be a high density area, and a router covers this area can not assign so many addresses to the sensors. But maybe the other routers in the PAN have many unsigned addresses held, it can not share the addresses between devices. Figure 1(a) shows the drawback of the DAAM. As shown in Figure 1(a), the sensor density around the node which address is 7 is over than other area, and the node can not assign so much address to its children, so Node X can not associate to the PAN. Figure 1(b) shows in PDAAM the node how to preempt an address and assign to its child. For the node which address is 7 can not assign so many addresses to its children when another child ask for association, it connects with its neighbor the node which address is 3, asks for an address, then

Figure 1. Example of Node X Associated to Network in PDAAM

We assume that the sensors are stationary, and we don’t care the address reuse when a node failed. There is no single addressing server like DHCP server. Instead, each node has the capability of configuring a new node with an address. 1) Nodes’ addresses pre-configure When the coordinator starts a PAN, it dictates Cm, Rm and Lm. A router with a short address Ax is in charge of assigning short addresses to its children according to the following algorithms: If the new node’s device type is router, the first new node is assigned Ax+1, the second one is assigned Ax+Cskip(Lx)+1, the nth router is calculated as the following equation:

An = Ax + Cskip ( Lx ) ⋅ ( n − 1) + 1

(2)

If the new node’s device type is end device, the first new node is assigned Ax+Cskip(Lx Rm+1, the second one is assigned Ax+Cskip(Lx Rm+2, and the nth end device is calculated as the following equation:

An = Ax + Cskip ( Lx ) ⋅ Rm + n

(3)

The above two equations are the same to DAAM, and we call it as nodes’ addresses pre-configure. Where Ax is the short address of the new node’s parent, Lx is the level of the new node and the Cskip is given as follows:

978-1-4244-2108-4/08/$25.00 © 2008 IEEE

2

if Rm = 1 ­1 + Cm ⋅ (Lm − Lx −1), ° Cskip(Lx ) = ®1+ Cm − Rm − Cm ⋅ RmLm−Lx −1 (4) , otherwise ° 1 − Rm ¯ The Cskip equation is also given in [12]. 2) Addresses Preemption Let a new node i send a beacon message and want to join the network. It will receive some neighbors’ beacon replies and the new node will select one neighbor to be its parent. The selected neighbor doesn’t have an unallocated address, and the new node will try another neighbor to be its parent. If all of its neighbors do not have unallocated addresses, preempting happened. Fig.2 shows the example of preempting happened.

After node k selects the address x, it adds a tuple (x, Aj) to Preempt_Pendingk and sends a positive Preempt_Address_Response to node j. If node j receives a negative Preempt_Address_Response, it recalculates Ak and preempts it again. If it retries up to Preempt_Retries times, and after all retries, no positive Preempt_Address_Response is still received, node j replies a failed Associate_Response to node i, and new node i can not associate to the network. Otherwise, node j maintains the following data structures: ‹

Preemption_Tablej: this is the list of all addresses preempted.

After Node j receives the Preempt_Address_Response, it inserts the preempted address into Preemption_Tablej, replies a positive Preempt_Address_Acknowledgement to node k and replies a succeed Associate_Response to node i. Node i then associates to the network. When node k receives the positive Preempt_Address_Acknowledgement, it adds a new tuple (x, Aj) to Preemptedk and deletes the corresponding tuple in Preempt_Pendingk. Fig.3 shows the example of three data structures. Fig.4 shows the process of addresses preemption.

Figure 2. Example of Preempting Happened

Node i selects node j in its neighbor list, and sends it an Associate_Request_with_Preempting_Address. Node j then receives the request, and chooses an unused address to node i as its device type, but it will find there is no unallocated address, so it sends a Preempt_Address_Request to a node k with short address follow the following algorithm: a) If the device type of node i is router, then node k’s short address as follows:

Ak =

Lm −3

¦ [Cskip(i) ⋅ rand

i

+ 1]

(5)

i =0

Figure 3. Example of Preempted: A node with short address 8 has succeed in preempting an address 21

b) If the device type of node i is end device, then node k’s short address as follows:

Ak =

Lm − 2

¦ [Cskip(i) ⋅ rand

i

+ 1]

(6)

i =0

where randi is a random integer between 0 to Rm-1. After node k receives Preempt_Address_Request, it checks is there are some available addresses. If it has no available addresses, then it replies a negative Preempt_Address_Response, otherwise it chooses an address in its address sub-block, and it maintains the following data structures: ‹

Preemptedk: this is the set of all addresses preempted by other sensor nodes in PAN.

‹

Preempt_Pendingk: this is the set of addresses for which address preemption has been initiated, but not yet completed.

Figure 4. Execution scheme of addresses preemption

The entries in these sets are a two-tuple of the form {address, preemptor}.

978-1-4244-2108-4/08/$25.00 © 2008 IEEE

3

B. Autorouting Mechanism The autorouting mechanism is based on the addressing mechanism which is proposed above. As of ZigBee Specification [12], we know that each node knows its parent’s address. From above we have proposed, we can learn that the address of every node isn’t duplicate, and every node holds a sub-block of network addresses which provide by its parent. From this we expect that the route between source address to destination can deduce from the address change between parents and children. In a PAN, each router knows its depth, and the Cm, Rm and Dm. An address sub-block which a router with short address Ax holds given by the following equation:

Amin = Ax + 1

(7)

Amax = Ax + Cskip ( Lx ) ⋅ Rm + (Cm − Rm)

(8)

TABLE I.

THE PROBABILITY OF DEPRIVERS EXIST IN A PAN

Cm, Rm, Lm, Nm

10 nodes

50 nodes

100 nodes

200 nodes

4, 3, 4, 161

0.018

0.267

0.594

/

7, 2, 6, 442

0.002

0.095

0.284

0.764

5, 3, 5, 606