The paper proposes a routing scheme for IPv6-based all-IP wireless sensor networks. The paper creates the IPv6 address structure and the IPv6 address configuration algorithm for all-IP wireless sensor networks. Based on the IPv6 address structure, the paper proposes the routing algorithm in the link layer for all-IP wireless sensor networks. In the routing scheme, a sensor node stores the next channel-sampling time of its neighbor nodes. In this way, only during the next channel-sampling time, a sensor node keeps active. and during any other time it returns to sleep. Therefore, the routing performance is improved. and the power consumption is reduced. Finally, the paper discusses the reduced IPv6 protocol stack performing the routing scheme. The routing scheme’s performance parameters are evaluated, including routing power consumption and delay, and the data results show the correctness and efficiency of the scheme.
With the dramatic growth of the WSN (wireless sensor network) application space and the emergence of a variety of new applications, WSN is required urgently to achieve the point-to-point communication with the Internet [
Compared to traditional WSN, all-IP WSN has more extensive applications space. For example, in the modern agriculture field, farm laborers can use the Internet to access all-IP WSN in the agricultural environment and acquire the real-time agricultural parameters for monitoring without geographical location constraint.
At present, the following key technologies on implementing IPv6-based all-IP WSN need further researches [
The IPv6 address auto-configuration is the important technical feature of IPv6, and it can configure an IPv6 address for each interface in the absence of intervention. The feature is consistent with WSN’s design goals, such as self-organization and self-configuration. At present, there are still some problems in implementing the existing IPv6 address auto-configuration strategies in WSN. For example, the stateful address configuration causes a lot of control messages, and the stateless address configuration needs to perform DAD (duplicate address detection) to ensure an address’s uniqueness. Therefore, it is necessary to propose an IPv6 address auto-configuration algorithm for all-IP WSN.
The WSN architecture is different from the IPv6 one. For example, in WSN, a sensor node works as both a node and a router. Therefore, the existing WSN routing schemes are not suitable for all-IP WSN. Therefore, it needs to propose a routing algorithm for all-IP WSN.
Due to resource constraints of WSN and the fact that IPv6 was not initially designed for embedded applications, it is necessary to reasonably reduce the IPv6 protocol stack so that the reduced IPv6 protocol stack can be implemented in all-IP WSN.
Therefore, the paper proposes a routing scheme for IPv6-based all-IP WSN, and the paper has the following contributions: the paper creates the IPv6 address structure and the IPv6 address auto-configuration algorithm for all-IP WSN, based on the proposed IPv6 address structure, the paper proposes a routing algorithm in the link layer for all-IP WSN, the IPv6 stack performing the proposed routing algorithm is optimized.
The remainder of the paper is organized as follows. In Section
Reference [
Reference [
Reference [
The scheme [
References [
References [
The routing scheme is achieved in the link layer and adopts the 6LoWPAN architecture [
Taking into account the full integration of the WSN architecture and the IPv6 architecture, the scheme divides one PAN into multiple clusters, and each cluster has only one cluster head node. One gateway node and multiple cluster head nodes form a tree topology which is called a cluster tree, where the root node is the gateway node and intermediate/leaf nodes are the cluster head nodes. All the cluster trees in one WSN constitute the backbone routing system, as shown in Figure
Cluster tree.
In the scheme, a node has an initial ID set by manufacturer, for example, the MAC address. The initial IDs of sensor nodes are independent of each other and unique in one all-IP WSN.
According to the WSN characteristics, the following IPv6 address structure is proposed, as shown in Table
IPv6 address structure.
80 bits | 16 bits | 16 bits | 16 bits |
Global routing prefix | PAN ID | Cluster head ID | Cluster member ID |
Sensor node ID |
In Table
In the scheme, the cluster head ID and cluster member ID of a gateway node are 0, and the cluster member ID of a cluster head node is 0.
Due to the resource constraints of sensor nodes, the routing scheme is achieved in the link layer. A sensor node’s link address is its sensor node ID, that is, a gateway node’s link address is its PAN ID, a cluster head node’s link address is its cluster head ID, and a cluster member’s link address is its cluster member ID.
IEEE 802.15.4 employs 3 mechanisms to achieve the data transmission [
The routing scheme is built on cluster trees, and a cluster tree has the following characteristics: one cluster tree is made up of one gateway node and multiple cluster head nodes, where the root node is the gateway node, and the intermediate/leaf nodes are the cluster head nodes, one cluster tree forms one PAN which is uniquely identified by the PAN ID of the tree’s root node, and PAN IDs of all cluster head nodes and cluster members in one PAN are identical, the gateway nodes are preset, and their IPv6 addresses are predetermined.
An FFD node becomes a cluster head node and acquires its sensor node ID through joining a cluster tree. Since a gateway node is preset, its neighbor FFD nodes first join the tree and become cluster head nodes through becoming the gateway node’s child nodes.
The process of an FFD sensor node X joining a cluster tree is as follows. X broadcasts a request beacon frame whose command identifier is After X’s neighbor gateway nodes/cluster head nodes receive the frame, they, respectively, return a response beacon frame whose payload includes the depth of the position in the corresponding cluster tree, the next channel-sampling time, and the PAN ID of the corresponding cluster tree. X selects the gateway node/cluster head node F with the minimum depth as its parent node and records F’s cluster head ID, F’s next channel-sampling time, and its own depth which is equal to F’s depth plus 1. Then, X combines F’s PAN ID with its initial ID to form a sensor node ID, marks itself as a cluster head node, and registers the sensor node ID with the gateway node of the cluster tree which it joins. X successfully joins a cluster tree to become a cluster head node and to obtain a sensor node ID, as shown in Figure
FFD becomes a cluster head node.
In the scheme, a node’s channel-sampling time means the time when a node awakens and can receive/send frames. In general, the number of nodes in a WSN is vast, so the topology of a cluster tree is maintained through a child node recording the sensor node ID of its parent node. In the scheme, the depth of a node’s position in a tree is used as a metric to select a parent node in order to shorten the length of the routing path reaching the gateway node and reduce the routing cost and delay.
In Figure
In the scheme, an RFD node joins a cluster to become a cluster member and acquire its sensor node ID.
After an FFD node H becomes a cluster head node, it periodically broadcasts a beacon frame whose payload includes the depth of its position in the cluster tree, the next channel-sampling time, and its PAN ID. After an RFD node X receives a beacon frame from H, it checks if it is marked as a cluster member. If not, then X marks itself as a cluster member, records the depth of H’s position in the cluster tree, H’s next channel-sampling time, and H’s PAN ID, and combines H’s PAN ID and cluster head ID with its own initial ID to obtain a sensor node ID.
From the previous cluster formation process, it can be inferred that a cluster is made up of only a cluster head node and multiple cluster members and has the star topology.
In the scheme, after a cluster member receives a beacon frame from its parent node, it updates the information on its cluster head node with the one in the frame’s payload.
If a cluster head node X does not receive a beacon frame from its parent node within the specified time, then it considers that its parent node fails. In this situation, X chooses the neighbor cluster head node F with the minimum depth as its parent node, combines F’s PAN ID with its initial ID to acquire a new sensor node ID, and records the depth of its position in the cluster tree. If X’s sensor node ID/depth value is different from its original one, then it registers the sensor node ID with the gateway node, of the corresponding cluster tree.
A node acquires its sensor node ID from a neighbor node, as shown in Section
If a cluster member X does not receive a beacon frame from its cluster head node within the specified time, then it considers that its cluster head node fails. Therefore, X chooses the neighbor cluster head node H with the minimum depth as its cluster head node and combines H’s PAN ID and cluster head ID with its initial ID to acquire a new sensor node ID.
A gateway node maintains a cluster head node table which records the information on the cluster head nodes in the same cluster tree, and the information includes a cluster head node’s cluster node ID and the depth of its position in the cluster tree.
The process of a cluster head node X registering a sensor node ID with the corresponding gateway node G is as follows. X sends G a Reg command frame whose payload includes its sensor node ID and the depth of its position in the cluster tree. After G receives the Reg frame, it checks if there is X’s record in its cluster head node table. If there is, then G updates the depth value with the depth value in the frame. Otherwise, G adds a record into the table to store X’s sensor node ID and depth value.
In the scheme, a gateway node/cluster head node stores a temporary routing table, and each routing entry consists of four fields: destination cluster, next hop, next channel-sampling time, and life time. Among them, the destination cluster records the sensor node ID of the destination cluster head node, the next hop field records the sensor node ID of the next hop reaching the destination cluster, the next channel-sampling time records the next channel-sampling time of the next hop, and its value is periodically updated with the one in the beacon frame from the next hop, and the life time field records the life survival time of the corresponding routing entry and automatically attenuates with the machine clock. When the life time is equivalent to 0, the corresponding entry is automatically removed from the routing table. Each time one routing table entry is used, its life time is set to the initial value, namely, the maximum life time.
An IPv6 node N uses the IPv6 address of a cluster member X to request the collected data, and the routing process is as follows. N sends a request packet to X. Through the IPv6 networks, the packet is routed to the gateway node G which identifies the cluster tree where X locates. G checks if there is a routing entry reaching the destination cluster in its routing table. If not, G establishes a routing path reaching the destination cluster head node H. G performs the fragmentation of the request packet, encapsulates each fragment with the mesh delivery header, where the source address is G’s PAN ID and the destination address is X’s sensor node ID, and the IEEE802.15.4 header, where the source address is G’s PAN ID and the destination address is the cluster head ID of the next hop in the corresponding routing entry, and sends the frames. After the next hop receives the frames, it sends the frames to the next hop in the corresponding routing entry. In this way, the frames finally reach H which then forwards the frames to X. After X receives all the frames, it reassembles the fragments into the request packet, performs the fragmentation of the response packet, encapsulates each fragment with the IEEE802.15.4 header, where the source address is X’s cluster member ID and the destination address is H’s cluster head ID, and then sends the frames at H’s next channel-sampling time. After H receives the frames, it sends the frames to its parent node. In this way, the frames finally reach G. G reassembles the fragments into the response packet and then sends the response packet to the IPv6 network, where the response packet reaches N in the IPv6 routing way, as shown in Figures
Routing process.
In Figures
In the scheme, a cluster head node periodically sends a beacon frame. If a cluster head node receives a beacon frame from the next hop, it updates the next channel-sampling time field of the next hop. Since a node only communicates with the next hop, only during the next channel-sampling time of the next hop it keeps active in order to send/receive the frames, and during any other time, it returns to sleep. In this way, the power consumption is reduced.
In IEEE 802.15.4, the command frame and data frame are defined by the frame type of the frame control. For example, if the frame type is 001/011, then the frame is the data frame/command frame. The IEEE802.15.4 data frame adopted by the scheme is shown in Table
Data frame.
2 bytes | 1 byte | 2 bytes | 2 bytes |
|
2 bytes |
Frame control | Sequence number | Destination address | Source address | MAC payload | Frame check sequence |
Routing of a data frame is performed through a cluster tree. The PAN ID of the source address of a data frame is the same as the one of the destination address of the frame, so the link address is 16-bit short address. If the next hop of a data frame is a cluster head node, then the destination address is the cluster head ID of the next hop. If the next hop of a data frame is a cluster member, then the destination address is the cluster member ID of the next hop.
The MAC payload format adopted by the scheme is shown in Table
MAC payload format.
Mesh delivery header | Fragment header | Compression control header | IPv6 header and payload |
The mesh delivery header format is shown in Table
Mesh delivery header format.
10 | O | F | Hop limit | Source address | Destination address |
2 bits | 1 bit | 1 bit | 4 bits | 2 bytes | 8 bytes |
In Table
The fragment header includes the first fragment header format and the subsequent fragment header format, as shown in Tables
First fragment header.
11000 | Datagram size | Datagram tag |
5 bits | 11 bits | 16 bits |
Subsequent fragment header.
11100 | Datagram size | Datagram tag | Datagram offset |
5 bits | 11 bits | 16 bits | 8 bits |
In Tables
The compression control header is shown in Table
Compression control header.
HC1 | HC2 |
4 bits | 4 bits |
In Table
HC1.
TF | Next header | HC2 |
1 bit | 2 bits(01) | 1 bit |
HC2.
Length | RSV |
1 bit | 3 bit |
In Table
In Table
To sum up, the differences between the structure of the adaptation layer in the scheme and the one in 6LoWPAN are as follows. In the scheme, only the first fragment includes the IPv6 header and other fragments do not include the IPv6 header. The size of the control information in the scheme is reduced.
Therefore, the scheme reduces the transmission power consumption.
The proposed scheme adopts the public-key infrastructure for 6LoWPAN [
The existing routing schemes [
In formula (
According to references [
Redundant power consumption.
It is assumed that the delay taken by transmitting 1 bit between two neighbor nodes is
When
Redundant delay.
In ns-2, the simulation region is
We select the existing scheme [ the existing scheme is a routing scheme for IPv6-based all-IP WSN, the existing scheme has better performance than the typical routing protocols, such as AODV and LOAD.
The goal of the scheme is to reduce the routing cost and delay, so we evaluate the routing cost and delay, as shown in Figures
Routing power.
Routing delay.
The results of Figures The proposed routing scheme is achieved in the link layer, so the routing performance is better and the packet loss rate is lower. Only the first fragment includes the IPv6 header, and other fragments do not include the IPv6 header, so the fragment utilization is improved. As a result, the routing performance is improved. In the proposed scheme, the IPv6 stack is optimized and the size of the control information is reduced, so the transmission power consumption is reduced.
This paper proposes a routing scheme in the link layer for all-IP WSN. The paper evaluated the proposed scheme’s performance parameters, including the routing power consumption and the routing delay, and the data results show the efficiency of the proposed scheme.
In the scheme, if a cluster head node near a gateway node fails, then the sensor nodes in the corresponding branch have to acquire new sensor node IDs and register them with the gateway. Therefore, the scalability is limited to some extent. In our future works, we plan to overcome the deficiency and improve the scalability.
This work is supported by the National Natural Science Foundation of China (61202440).