## 1 Introduction  
Recent technological advances in wireless communication and electronics have developed sensor nodes containing low cost, low power, multifunctional sensor nodes that are small in size and can communicate over short distances [1]. In the past, applications of sensor networks were thought to be very specific. The communication protocols of sensor network were also very simple and straightforward. The research communities were even against the use of the internetworking protocols in WSNs. There are reasons behind this, such as the resource constraints for layered architecture, the problems of configuring large numbers of devices, the essence of sensor nodes' distinct identity, _etc._, but with the advent of the Internet of things and federated IP-WSNs, this concept is going to become blurred. The huge number of IPv6 addresses, the necessity for end to end communication and the advances in micro-electronics have changed the concepts of the research community [2]. Nowadays a tiny sensor node can hold a compatible TCP/IP protocol stack [3], so we can now think of using the concept of internetworking protocols in IP-WSNs [4]. IP-WSN nodes are expected to vastly outnumber conventional computer hosts, so we can easily think of providing IPv6 addresses to individual sensor nodes since it provides around 6 \(\times\) 10\({}^{23}\) addresses per square meter of the Earth's space. The IPv6 over low power wireless personal area network (6 LoWPAN) working group of the Internet Engineering Task Force (IETF) defines the manner in which IPv6 communication is to be carried out over IEEE 802.15.4 interface [5,6]. Although 6 LoWPAN helps in making the wide implementation of IP-WSN a reality and its end to end communication to the external world feasible, the excessive signaling costs for sensor nodes because of too much tunneling through the air makes it difficult. Excessive signaling costs therefore become a barrier for the application of IP-WSNs, especially in the case of the mobility scenario of individual sensor nodes or groups of nodes in different areas such as in a patient's body sensor network, in industrial automation, _etc._[5]. Nowadays most communication protocols are host based, which is practically infeasible for IP-WSNs since individual nodes need to participate in mobility related signaling. On the other hand, addressing of individual sensor nodes in IP-WSNs is necessary for the end to end communication. The tiny sensors are not capable of holding the complete IPv6 addressing since the IEEE 802.15.4 packet size is 127 octets [6,7] and it is not feasible to contain the routing table for the individual IP-WSN sensor node. These are the major problems to be addressed in IP-WSNs. With this in mind, in our previous work [8] we focused on the issue of mobility in IP-WSNs with the intention of developing an energy efficient network-based communication protocol for IP-WSNs. We proposed the Sensor Proxy Mobile IPv6 (SPMIPv6), which is a network-based protocol that provides mobility support to any IPv6 host within a restricted and topologically localized portion of the network, but in our previous paper we did not focus in detail on the addressing and routing issues. In this paper we propose a hierarchical addressing and layer three routing protocol for IP-WSNs. In the proposed addressing and routing protocol individual IP-WSN nodes will be identified by a unique global IPv6 address. This global IPv6 address will be generated in a hierarchical approach. IP-WSN nodes known as Reduced Function Devices (RFDs) will be identified within a particular Wireless Personal Area Network (WPAN) domain by a 16 bit short address. The Sensor Mobile Access Gateway (SMAG) known as a Full Functional Device (FFD) will hold IEEE EUI-64, and finally a Border Router (BR) will hold 128 bits global unicast addressing. The RFD is assigned a 16 bit short address, which is unique within a WPAN or SMAG domain, and remains fixed irrespective of its location within the WPAN.