6LoWPAN Introduction: The protocol stack
[Part 1 reviews the concept of the Internet of Things - and its subset, the wireless embedded Internet - and answers the question "Why 6LoWPAN?" Part 2 discusses 6LoWPAN's history and standardization, its relation to other trends like ZigBee and wireless sensor networks, and some application examples.]
1.2 The 6LoWPAN Architecture
The Wireless Embedded Internet is created by connecting islands of wireless embedded devices, each island being a stub network on the Internet. A stub network is a network which IP packets are sent from or destined to, but which doesn't act as a transit to other networks.
The 6LoWPAN architecture is made up of low-power wireless area networks (LoWPANs)2, which are IPv6 stub networks. The overall 6LoWPAN architecture is presented in Figure 1.7. Three different kinds of LoWPANs have been defined: Simple LoWPANs, Extended LoWPANs, and Ad hoc LoWPANs.
A LoWPAN is the collection of 6LoWPAN Nodes which share a common IPv6 address prefix (the first 64 bits of an IPv6 address), meaning that regardless of where a node is in a LoWPAN its IPv6 address remains the same. An Ad hoc LoWPAN is not connected to the Internet, but instead operates without an infrastructure. A Simple LoWPAN is connected through one LoWPAN Edge Router to another IP network. A backhaul link (point-to-point, e.g. GPRS) is shown in the figure, but this could also be a backbone link (shared). An Extended LoWPAN encompasses the LoWPANs of multiple edge routers along with a backbone link (e.g. Ethernet) interconnecting them.
LoWPANs are connected to other IP networks through edge routers, as seen in Figure 1.7. The edge router plays an important role as it routes traffic in and out of the LoWPAN, while handling 6LoWPAN compression and NeighborDiscovery for the LoWPAN. If the LoWPAN is to be connected to an IPv4 network, the edge router will also handle IPv4 interconnectivity (discussed further in Section 4.3). Edge routers typically have management features tied into overall IT management solutions. Multiple edge routers can be supported in the same LoWPAN if they share a common backbone link.
Figure 1.7 The 6LoWPAN architecture.
A LoWPAN consists of nodes, which may play the role of host or router, along with one or more edge routers. The network interfaces of the nodes in a LoWPAN share the same IPv6 prefix which is distributed by the edge router and routers throughout the LoWPAN. In order to facilitate efficient network operation, nodes register with an edge router. These operations are part of Neighbor Discovery (ND), which is an important basic mechanism of IPv6.
Neighbor Discovery defines how hosts and routers interact with each other on the same link. LoWPAN Nodes may participate in more than one LoWPAN at the same time (called multi-homing), and fault tolerance can be achieved between edge routers. LoWPAN Nodes are free to move throughout the LoWPAN, between edge routers, and even between LoWPANs. Topology change may also be caused by wireless channel conditions, without physical movement. A multihop mesh topology within the LoWPAN is achieved either through link-layer forwarding (called Mesh-Under) or using IP routing (called Route-Over). Both techniques are supported by 6LoWPAN.
Communication between LoWPAN Nodes and IP nodes in other networks happens in an end-to-end manner, just as between any normal IP nodes. Each LoWPAN Node is identified by a unique IPv6 address, and is capable of sending and receiving IPv6 packets. Typically LoWPAN Nodes support ICMPv6 traffic such as "ping", and use the user datagram protocol (UDP) as a transport. In Figure 1.7 the Simple LoWPAN and Extended LoWPAN Nodes can communicate with either of the servers through their edge router. As the payload and processing capabilities of LoWPAN Nodes are extremely limited, application protocols are usually designed using a simple binary format in a UDP payload. Application protocols suitable for 6LoWPAN are discussed in Chapter 5.
The main difference between a Simple LoWPAN and an Extended LoWPAN is the existence of multiple edge routers in the LoWPAN, which share the same IPv6 prefix and a common backbone link. Multiple LoWPANs can overlap each other (even on the same channel). When moving from one LoWPAN to another, a node's IPv6 address will change. A LoWPAN Edge Router is typically connected to the Internet over a backhaul link such as cellular or DSL [ID-6lowpan-nd].
A network deployment may also choose to use multiple Simple LoWPANs rather than an Extended LoWPAN on a shared backbone link, e.g. for management reasons. This is not a problem if there is low mobility between LoWPANs in the network, or the application does not assume stable IPv6 addresses for nodes. A deployment example of a Simple LoWPAN connected by a backhaul link to the Internet is given in Section 1.4.
In an Extended LoWPAN configuration, as shown on the right-hand side of Figure 1.7, multiple edge routers share a common backbone link and collaborate by sharing the same IPv6 prefix, offloading most Neighbor Discovery messaging to the backbone link [ID-6lowpan-nd]. This greatly simplifies LoWPAN Node operation as IPv6 addresses are stable throughout the Extended LoWPAN and movement between edge routers is very simple.
Edge routers also handle IPv6 forwarding on behalf of the nodes. To IP nodes outside the LoWPAN, the LoWPAN Nodes are always reachable regardless of their attachment point in the Extended LoWPAN. This enables large enterprise 6LoWPAN infrastructures to be built, functioning similar to a WLAN (WiFi) access point infrastructure (but at layer 3 instead of layer 2).
6LoWPAN does not require an infrastructure to operate, but may also operate as an Ad hoc LoWPAN [ID-6lowpan-nd]. In this topology, one router must be configured to act as a simplified edge router, implementing two basic functionalities: unique local unicast address (ULA) generation [RFC4193] and handling 6LoWPAN Neighbor Discovery registration functionality. From the LoWPAN Node point of view the network operates just like a Simple LoWPAN, except the prefix advertised is an IPv6 local prefix rather than a global one, and there are no routes outside the LoWPAN.
LoWPAN types and 6LoWPAN Neighbor Discovery operation are covered in detail in Chapter 3. Also refer to the 6LoWPAN Neighbor Discovery document in [ID-6lowpan-nd] for the complete specification.
2The terms 6LoWPAN and LoWPAN are often used interchangeably. In this book we use 6LoWPAN as a general term for the technology or set of standards, and the term LoWPAN as it is used in the IETF standards: to refer to a specific type of LoWPAN or node.