5
Research on Routing Protocol Based on Dynamic Mask Address Zhang Jian Feng Shiyan, Lü Hui Meng Lei (School of Computer ,Wu Han University, Wu Han, Hubei 430072 ) AbstractAODV and Cluster-Tree are usually used as route protocol in ZigBee network. In AODV, the broadcast mechanism makes energy run fast. Cluster-Tree protocol gets a long route path, which leads to high delay. This paper has done detailed research on these two protocols, and proposes a new address allocation scheme in order to make addresses carry with the topology information. In the process of route discovery, request packets will be send with the directivity. That will cut down packet delay and energy consumption in the systemic level. Keywords-ZigBee; dynamic mask; NS2; energy consumption I. INTRODUCTION ZigBee is a group of technical standards of network, security and application software which are developed on the basis of wireless standard IEEE802.15.14. ZigBee architecture is composed of Physical layer, Data link layer, Network layer, Application convergence subl ayer and High- level application specification [1] . At present research on how to design high performance ZigBee network in different environments and how to achieve reliable interconnection between the ZigBee network becomes the major project and hot point.These can be classified to the routing problem of Network layer. An effective routing algorithm can effectively decrease network delay and save node energy consumption. II. ZIGBEE NETWORK CONFIGURATION For the network configuration, ZigBee network nodes are divided into three types ZigBee routing node,ZigBee coordination node,ZigBee terminal node ZigBee routing node can only work as the full functional device(FFD) node. It’s main task includes data storage and forwarding ,route discovery and maintenance .ZigBee routing nodes can also play the role of a normal coordinator node. ZigBee coordination node must also be FFD. It can also serve as a convergence node in the wireless sensor network. Usually there is only one coordination node in a ZigBee network. It is responsible for the launching of new network, the setting of network parameter, the management of nodes and the storage of network node’ information. It may also play the role of routing node. ZigBee terminal node is the reduced function device (RFD) or FFD. Other nodes cannot join the network through a terminal node. A node connects to the ZigBee network only through the coordination node or the routing nodes. Three network topologies are defined in ZigBee protocol standards. They are Star topology, Tree topology and Mesh topology. Star network and tree network can actually be seen as a subset of the mesh, so this paper only focuses on the mesh network. III. ZIGBEE ADDRESS ALLOCATION MECHANISM If a node in network allows a new node to join in the network by it, they construct a parent-child relationship. Parent node distributes a unique 16-bit short address. Assume the number of child nodes accepted by a parent node is C m , he maximum depth of the network is L m , the largest number of routers of child nodes is R m , then the parent node can calculate the offset C skip (d) for child nodes address through formula 1(The depth of the parent node is d). C skip (d)= (Formula 1) For different joining child nodes, the calculation method of the addresses is also different. If node A is a reduced function device(RFD)node, which joins in the network through A p , A p uses the formula 2 to allocate a network address for A. A=A p +C skip (d)R m +n m m R C n 1 (Formula 2) If a child node is the FFD node with routing ability, the parent node A p uses formula 3 to allocate a network address for A. A=A p +1+C skip (d)(n-1) (Formula 3) IV. ZIGBEE NETWORK ROUTING ALGORITHM A. Cluster-Tree Routing Algorithm In Cluster-Tree routing algorithm [5] , nodes calculate next hop node address according to the network address of the destination node. Assume that the address of a ZigBee node is A and its depth is d. When it receives a data frame with destination address D, node A will first judge that if destination node is its offspring node through formula 4. A<D<A+C skip (d-1) (Formula 4) If the calculated destination node is the offspring node of the receiving node,a message will be sent to its child node N. It could be judged by formula 5 that the message is transmitted to end child nodes or routing child node. others Formula 5) ) ( ] ) ( ) 1 ( [ 1 ) ( d C d C A D A d C R A D D N skip skip skip m 2012 11th International Symposium on Distributed Computing and Applications to Business, Engineering & Science 978-0-7695-4818-0/12 $26.00 © 2012 IEEE DOI 10.1109/DCABES.2012.88 130

[IEEE 2012 11th International Symposium on Distributed Computing and Applications to Business, Engineering & Science - Guilin, China (2012.10.19-2012.10.22)] 2012 11th International

  • Upload
    meng

  • View
    214

  • Download
    1

Embed Size (px)

Citation preview

Page 1: [IEEE 2012 11th International Symposium on Distributed Computing and Applications to Business, Engineering & Science - Guilin, China (2012.10.19-2012.10.22)] 2012 11th International

Research on Routing Protocol Based on Dynamic Mask Address Zhang Jian Feng Shiyan, Lü Hui Meng Lei

(School of Computer ,Wu Han University, Wu Han, Hubei 430072 )

Abstract—AODV and Cluster-Tree are usually used as route protocol in ZigBee network. In AODV, the broadcast mechanism makes energy run fast. Cluster-Tree protocol gets a long route path, which leads to high delay. This paper has done detailed research on these two protocols, and proposes a new address allocation scheme in order to make addresses carry with the topology information. In the process of route discovery, request packets will be send with the directivity. That will cut down packet delay and energy consumption in the systemic level.

Keywords-ZigBee; dynamic mask; NS2; energy consumption

I. INTRODUCTION

ZigBee is a group of technical standards of network, security and application software which are developed on the basis of wireless standard IEEE802.15.14. ZigBee architecture is composed of Physical layer, Data link layer, Network layer, Application convergence subl ayer and High-level application specification[1].

At present research on how to design high performance ZigBee network in different environments and how to achieve reliable interconnection between the ZigBee network becomes the major project and hot point.These can be classified to the routing problem of Network layer. An effective routing algorithm can effectively decrease network delay and save node energy consumption.

II. ZIGBEE NETWORK CONFIGURATION

For the network configuration, ZigBee network nodes are divided into three types ZigBee routing node,ZigBee coordination node,ZigBee terminal node

ZigBee routing node can only work as the full functional device(FFD) node. It’s main task includes data storage and forwarding ,route discovery and maintenance .ZigBee routing nodes can also play the role of a normal coordinator node.

ZigBee coordination node must also be FFD. It can also serve as a convergence node in the wireless sensor network. Usually there is only one coordination node in a ZigBee network. It is responsible for the launching of new network, the setting of network parameter, the management of nodes and the storage of network node’ information. It may also play the role of routing node.

ZigBee terminal node is the reduced function device (RFD) or FFD. Other nodes cannot join the network through a terminal node. A node connects to the ZigBee network only through the coordination node or the routing nodes.

Three network topologies are defined in ZigBee protocol standards. They are Star topology, Tree topology and Mesh topology. Star network and tree network can actually be seen as a subset of the mesh, so this paper only focuses on the mesh network.

III. ZIGBEE ADDRESS ALLOCATION MECHANISM

If a node in network allows a new node to join in the network by it, they construct a parent-child relationship. Parent node distributes a unique 16-bit short address.Assume the number of child nodes accepted by a parent node is Cm, he maximum depth of the network is Lm, the largest number of routers of child nodes is Rm, then the parent node can calculate the offset Cskip(d) for child nodes address through formula 1(The depth of the parent node is d).

Cskip(d)=��

���

����

������ (Formula 1)

For different joining child nodes, the calculation method of the addresses is also different. If node A is a reduced function device(RFD)node, which joins in the network through Ap, Ap uses the formula 2 to allocate a network address for A.

A=Ap+Cskip(d)Rm+n mm RCn �1 (Formula 2)

If a child node is the FFD node with routing ability, the parent node Ap uses formula 3 to allocate a network address for A.

A=Ap+1+Cskip(d)(n-1) (Formula 3)

IV. ZIGBEE NETWORK ROUTING ALGORITHM

A. Cluster-Tree Routing Algorithm In Cluster-Tree routing algorithm[5], nodes calculate next

hop node address according to the network address of the destination node. Assume that the address of a ZigBee node is A and its depth is d. When it receives a data frame with destination address D, node A will first judge that if destination node is its offspring node through formula 4.

A<D<A+Cskip(d-1) (Formula 4)If the calculated destination node is the offspring node of

the receiving node,a message will be sent to its child node N. It could be judged by formula 5 that the message is transmitted to end child nodes or routing child node.

others Formula 5)��

��

���

��

��

)(])(

)1([1

)(

dCdC

ADA

dCRADDN

skipskip

skipm

2012 11th International Symposium on Distributed Computing and Applications to Business, Engineering & Science

978-0-7695-4818-0/12 $26.00 © 2012 IEEE

DOI 10.1109/DCABES.2012.88

130

Page 2: [IEEE 2012 11th International Symposium on Distributed Computing and Applications to Business, Engineering & Science - Guilin, China (2012.10.19-2012.10.22)] 2012 11th International

If the destination node is not the offspring node of the receiving node, a message will be sent to the parent node of the receiving node along tree structure, and the parent node do similar judgment or forwarding.

B. AODV Routing Algorithm AODV algorithm is based on vector routing algorithm,

which mainly includes three kinds of message format[2].They are routing request (RREQ), routing response (RREP), routing error (RRER). Specific steps of the algorithm as follows

If it wants to find a path to destination node a source node will first search its own routing table. If no records ,the source node will broadcast a RREQ to all its neighbor nodes. A RREQ includes source node, destination node, request sequence number, hop from the source node and so forth. After receiving this RREQ, neighbor nodes compare request sequence number and destination address to judge whether they have received the same request. If they has done, the message is directly discarded. If not, the hop is added by 1 first and then a table is created to record the reverse path to source node through the RREQ information .If containing the routing path to destination path, neighbor node could directly return a RREP to the source node. Otherwise, neighbor nodes continue to broadcast RREQ to their neighbor nodes until destination node received. Destination node would send a RREP to its upstream node and establish a reverse routing. As getting request path from reverse routing all of the intermediate node will establish reverse routing, until source node receives RREP. Intermediate nodes will broadcast information to the neighbor node when its location has changed or lose efficacy. Then neighbor nodes will send a RREP to the upstream node. The RREP will be transmitted to the source node. The routing request process will be re-launched by the source node according to the actual situation.

Above two routing algorithm don’t associated routing with the node address. In the Cluster-Tree protocol, addressing path is so long that the end-to-end delay is quite high. In AODV protocol, broadcasting mechanism leads to node energy consumption faster. This paper proposes an address allocation solution based on dynamic mask address, which enables the network address to reflect topology information. Forwarding routing request packet will be more directed and thus reduce network delay and power consumption in the system level.

V. ROUTING BASED ON DYNAMIC MASK ADDRESS ALLOCATION

A. The Allocation of the network address In ZigBee network, the address is allocated by tree

structure. Coordinator is located in the root node .Generally its depth is 0 and its initial address is 0x0000. A joining node sends request to its parent node who works as the coordinator or FFD nodes. An address will be allocated after the approval of the parent node[6].In the dynamic mask

address allocation, the parent node will still continue to monitor for a while after it received a request from child nodes, and record these nodes. After the parent node gets the number y of joining nodes, mask length n of child nodes could be confirmed as following:

� �yn 2log� (n<16) Then, the parent node allocates network address of child

node according to its own mask and address. And address length still takes short address of 16bit.

Assume mask length of parent node is k bit k<16 if parent node is a coordinator, then k=0 .The mask of the parent node is:

1 …… 1 0 …… 0

Assume the network address of parent node is:

fk-1 fk-2. …… f0 0 …… 0

Assume the mask length of child nodes calculated by the parent node is n, then mask of child nodes is:

Thus 2n-1 subnets could be divided (excluding total 0). If each subnet is allocated to one child node, the network address of child nodes is:

The middle n bits sn-1,sn-2,……,s0 is set to different values for different child nodes.

B. Judgment About Address Correlation It can be seen from the process of network address

allocation that the former k bits of the child nodes’ address are the same as the parent’s . So the address of the child node has a strong correlation with his parent node and brother nodes, while the correlation with the other nodes will be weak. So the greater the correlation, the stronger is the reachability. Routing discovery mechanism based on dynamic mask address allocation takes the advantage of this correlation. Sending node will select a neighbor node who has the strongest correlation with the destination node as the next hop .

Address correlation calculation is to determine the next hop. Node D will search all the neighbor nodes Dnab from the neighbor table and calculate correlation with destination node Ddes. Mask M is used to judge address correlation. Correlation between two nodes is calculated as following:

RelationShip = (Dnab & M) & (Ddes & M)

131

Page 3: [IEEE 2012 11th International Symposium on Distributed Computing and Applications to Business, Engineering & Science - Guilin, China (2012.10.19-2012.10.22)] 2012 11th International

The value of RelationShip is based on the number of consecutive 1 from the highest bit . The bigger the number of consecutive 1, the closer is the relationship between two nodes.

C. Route Discovery and Establishment The process based on dynamic mask address mainly

includes the following six steps: (1)The source node initializes route request table and

routing table. First perform the correlation computation.One node or some neighbor nodes that have the strongest correlation are selected as the next hop node. Then establish the routing table according to the calculated next hop addressand set the route record status to discovery. Fill in the routing table with destination address and the next hop. A route request packet (RREQ) can be produced and a route discovery table can be established after the direction of the routing request is ensured[8].

(2)The source node sends a route request message:the path cost of the routing request message is set to 0, and other parameters is set according to the relevant status.

(3)The receiving node compares the routing request number and the destination node address with the message in the routing discovery table of this node. If there is a same record, this node discards this repeated information. Otherwise go to step (4).

(4)Compare the network address of the destination node with its own network address and the addresses in the neighbor table and the routing table. If there is the same destination address,the message is forwarded to the destination address and the node responses route reply message(RREP), which is transmitted back to source node according to reverse routing formed in routing process. Otherwise, turn to (5).

(5)Fill in relevant content and create new record in route discovery table. The source node network address and route request number can be extracted directly from the message, and sending node address can be extracted in the same way. The prior cost is determined by the message path cost, and the current time is added to the timeout. With the extracted source node as the destination node address field in routing discovery table and sending node address filled in node address field of previous hop, the reverse routing is established by route discovery table. Turn to (6).

(6)Repeat the above steps. If the current time is found to be greater than the timeout period set in step (1),the process of route discovery is terminated. If the destination address is found in step (4) , search the route discovery table and return routing reply packet to the previous node. The previous node responses in the same way until the reply packet arrives the source node. So far, the process of routing discovery is finished.

parent node

Multiple of 0 is omitted behind address and maskFigure 1. Address allocation process instance diagram

Figure 1 is an example of dynamic mask address allocation. Coordinator with the address 0x0000 listens to the access request of 3 nodes A, B and C.So the mask length is calculated to be 2 bits according to the address allocation rule and 3 child nodes are respectively assigned the address 0x4000,0x8000, 0xC000. Node B with the address 0x8000 has two child nodes, but mask cannot be allocated only one bit because mask set to all zeros cannot be used. Thus node B should add two bits on the basis of its own mask length so that the network addresses of two child nodes are respectively 0x9000 and 0xA000. The child nodes of Node A and Node C can get their network addresses similarly.

Figure 2 is an example of the route step. Now assume finding a path from 0x9000 to 0xD000. First, the source node with the address 0x9000 searches its own neighbor table and finds two nodes 0x8000 and 0xA000. Then the source node carries on the correlation calculation between the destination node 0xD000 and its two neighbor nodes (Due to the different length of mask, only the first two bits need to be used when calculated for the address 0x8000, while the first four bits need to be used when calculated for the address 0xA000). The source node send the request message to two neighbor nodes because the correlation is the same. After receiving the route request, the node 0xA000 finds out its neighbor node includes one node with the address 0x8000 besides the source node. So it only forwards the request message to the node 0x8000. But the node 0x8000 has received the same message so that the message will be discarded. The node 0x8000 has five neighbor nodes including the node 0x9000 and 0xA000 who have send the request message to it. After making correlation calculation for other three nodes 0x0000, 0x4000 and 0xC000, the node 0x8000 finds out the node 0xC000 has the closer correlation with the destination node. So the request message is forwarded to the node 0xC000. At last, the request message will be sent directly to the destination node because it has already existed in the neighbor table of the node 0xC000. Thus, a reverse routing is found. The node 0xD000 establishes the forwarding route according to the reverse path.

132

Page 4: [IEEE 2012 11th International Symposium on Distributed Computing and Applications to Business, Engineering & Science - Guilin, China (2012.10.19-2012.10.22)] 2012 11th International

0x8000 0xA000 mask 0xC000 mask 0xF000

take first 2 bits take first 4 bits 0x8000 1 0 0 0 0xA000 1 0 1 0

0xD000 & 1 1 0 1 0xD000 & 1 1 0 1 1 0 1 0 0 0

0x4000 0xC000 mask 0xC000 mask 0xC000take first 2 bits take first 4 bits

0x4000 0 1 0 0 0xC000 1 1 0 0 0xD000 & 1 1 0 1 0xD000 & 1 1 0 0

0 1 1 1 0 0

Figure 2. Correlation Calculation of Dynamic mask

VI. ROUTING PROTOCOL SIMULATION EXPERIMENT

This paper chooses the NS2 as the network simulation platform.Based on the provided IEEE802.15.4 MAC layer and PHY layer, it simulates the AODV, the Cluster-Tree and the new protocol proposed in this paper. Specific simulation parameters can be seen in Table 1.

TABLE I. Simulation Parameters

Network Size 50 50

Number of Nodes 21Node Initial Energy 1J

Business source Type CBRRate 2.0

Size of Packets 512BCluster-Tree parameters Cm=4 Rm=4 Lm=3

Figure 3. the contrast figure of each protocol on end- to-end delay simulation

Figure 3 is the end-to-end delay simulation diagram of each protocol. It can be seen clearly that the average time delay of Cluster-Tree routing algorithm is higher than that of AODV and New-Route. Because a node transmits the request message to its parent node when the message cannot be directly forwarded to the destination node in the Cluster-Tree algorithm. This will lead to the greater probability that the path is not the shortest and the time delay is increased.On the whole the time delay of New-Route and AODV algorithm is similar. In AODV, the time delay is suddenlyincreased in 30 to 40 seconds. Because there are a lot of routing request and response packet to cope with. New-Route algorithm tends to more stable and it finds the shortest path in the tree topology. Compared with the AODV, it does not take advantage in the path length, but in the process of setting up route it effectively reduces the scope of broadcast,so that the data packets would be much less than AODV.

Figure 4. the contrast figure of each protocol on surplus energy simulation

Figure 4 shows the surplus energy simulation diagram of each protocol in network. The differences among the three curves are significant. At 100s, the surplus energy of AODV, New-Route and Cluster-Tree is respectively 14.2532 joules,16.205766 joules and 17.1253 joules. It fully demonstrates the choice of routing algorithm has the great influence on the wireless network. The trend of the curve also can get the reasonable explanation. In the process of establishing route in AODV algorithm, each node constantly broadcasts routing request packet, sends response packet to the prior node andmaintains the routing table. This process expend large amount of energy of nodes. Cluster-Tree algorithm neither needs to establish a route, nor has a routing table. The energy is mainly consumed in calculating next node and the energy consumption is the lowest. New-Route algorithm is located between AODV and Cluster-Tree. It has to maintain its own routing table , but the scope of broadcast is reduced.

VII. CONCLUSION

This paper focuses on the research of the network layer,proposes an improved networking and routing scheme and

133

Page 5: [IEEE 2012 11th International Symposium on Distributed Computing and Applications to Business, Engineering & Science - Guilin, China (2012.10.19-2012.10.22)] 2012 11th International

completes the simulation on NS2 platform. This method has improved the performance at some aspects compared to the commonly used AODV and Cluster-Tree algorithm. But each protocol has its own applicability. The idea presented in this paper has its own shortcomings compared to some existed protocols at some performance indicators.

The performance of ZigBee network depends largely on the distribution of network nodes. It is difficult to have a pervasive network environment due to the broad application scope of the ZigBee network. So the problem of how to put the theory algorithm to use in practice is also worthy of research.

REFERENCES

[1] Shouwei Gao Canyang Wu. ZigBee Technology Practice.BeijingBeijing University of Aeronautics and Astronautics Press 2009.6

[2] Dilip Kumar Ahirwar, Prashant Verma and Jitendra Daksh. Enhanced AODV Routing Protocol for Wireless Sensor Network Based on ZigBee. Department of Electronics and Telecommunication, SVNiT, Sagar, India,2012

[3] ting Jiang Chenglin Zhao. ZigBee technology and its application.Beijing: Beijing University of Posts and Telecommunications Press 2006.50-60

[4] Shuanghua Huang.ZigBee Research and Implementation on Wireless sensor network.Electronic Measurement Technology,2007,30(2):59-64

[5] Zhian Lü.ZigBee Network Principle and Application Development.Beijing Beijing University of Aeronautics and Astronautics Press2008.10-12

[6] jing sun,Zhongxiao Wang,hongwang,Research on Routing Protocols Based on ZigBee Network.Shenyang Normal University,2008

[7] Tachong Kin, Daeyoung Kim, Noseong Park, Seong-enu Yoo. Tomas Sanchez Lopez Shortcut Tree Routing in ZigBee Netorks.IEEE,2007

[8] Kwang Koog Lee,g Hoon Kim.Cluster Label-based ZigBee Routing Protocol with High Scalability,Second International Conference on Systems and Networks Communications,2007

134