6lowpan: The Wireless Embedded Internet - Part 3: 6lowpan Architecture, Protocol Stack & Link Layers

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

6LoWPAN: The wireless embedded Internet -

Part 3: 6LoWPAN architecture, protocol stack


& link layers
Zach Shelby and Carsten Bormann - June 13, 2011

[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.

Footnote:
2
The 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.

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.

Footnote:
2
The 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.

Link layers for 6LoWPAN

One of the most important functions of the Internet Protocol is the interconnection of heterogeneous
links into a single interoperable network, providing a universal "narrow waist". This is equally true
for 6LoWPAN and embedded networks, where there are many wireless (and also wired) link-layer
technologies in use.

The specialized applications of embedded networks require a wider range of communication


solutions than typical personal computer networks, which almost universally use Ethernet and WiFi.
Luckily the IEEE 802.15.4 standard is the most common 2.4 GHz wireless technology for embedded
networking applications, and has been used as a baseline for 6LoWPAN development. Other
technologies used with 6LoWPAN include sub-GHz radios, long-range telemetry links and even
power-line communications. The requirements and interactions of 6LoWPAN with the link layer are
discussed next, along with an introduction to IEEE 802.15.4, a sub-GHz radio and power-line
communications.
There is a set of required or recommended features that a link should provide in order to work with
Internet protocols. These include framing, addressing, error checking, length indication, some
reliability, broadcast and a reasonable frame size. The issues involved with designing a subnetwork
for use with IP are discussed in [RFC3819]. 6LoWPAN is designed to be used with a special type of
link, and has its own set of link requirements and recommendations.

The most basic requirements for a link layer to support 6LoWPAN are framing, unicast transmission
and addressing. Addressing is required to differentiate between nodes on a link, and to form IPv6
addresses which are then elided by 6LoWPAN compression. It is highly recommended that a link
supports unique addresses by default (e.g. a 64-bit extended unique identifier [EUI-64]), to allow for
stateless autoconfiguration.

Multi-access links should provide a broadcast service. Multicast service is required by standard
IPv6, but not by 6LoWPAN (broadcast is sufficient). IPv6 requires a maximum transmission unit
(MTU) of 1280 bytes from a link, which 6LoWPAN fulfills by supporting fragmentation at the
LoWPAN adaptation layer. A link should provide payload sizes at least 30 bytes in length to be useful
(and preferably larger than 60 bytes). Although UDP and ICMP include a simple 16-bit checksum, it
is recommended that the link layer also provides strong error checking.

Finally, as IPsec may not always be practical for 6LoWPAN, it is highly recommended that links
include strong encryption and authentication. The 2006 version of the IEEE 802.15.4 standard
actually does not include a "next protocol identifier", making the detection of which protocol is being
carried difficult. Although partially dealt with in the LoWPAN format using a dispatch value, it is a
feature that a link should preferably have. Subnetwork design and link-layer issues are discussed in
Section 2.2.

The next sections introduce three link-layer technologies used with 6LoWPAN: IEEE 802.15.4, a sub-
GHz ISM band radio and low-rate power line communications.

IEEE 802.15.4
The IEEE 802.15.4 standard [IEEE802.15.4] defines low-power wireless embedded radio
communications at 2.4 GHz, 915 MHz and 868 MHz. The first version of the standard was released
in 2003, and was then revised in 2006. More recently the IEEE 802.15.4a standard was released,
extending 802.15.4with two new physical layer options: Chirp Spread Spectrum at 2.4 GHz and
Ultra Wide-Band at 3.1–10.6 GHz. Work continues on new features such as MAC improvements in
IEEE 802.15.4 Task Group 4e (TG4e), active RFID (TG4f), larger networks (TG4a) and specialized
PHYs for China (TG4c) and Japan (TG4d). More information is available on these efforts from [IEEE].

In practice IEEE 802.15.4 at 2.4 GHz is used almost exclusively today as it provides reasonable data
rates, and can be used globally. The sub-GHz channels are limited geographically with 915 MHz
mainly available in North America and 868 MHz in the European Union (EU). That, combined with
the limited data rates and channel selection of sub-GHz IEEE 802.15.4, means that there are only a
few chips on the market today. Often more flexible sub-GHz chips tend to be used, as explained in
the next section. This trend may yet change, with new sub-GHz applications becoming widespread
and efforts like the IP500 Alliance, together with improvements in the latest IEEE 802.15.4 standard
for sub-GHz channels.

The 802.15.4 standard provides 20–250 kbit/s data rates depending on the frequency. Channel
sharing is achieved using carrier sense multiple access (CSMA), and acknowledgments are provided
for reliability. Link-layer security is provided with 128-bit AES encryption. Addressing modes for 64-
bit (long) and 16-bit (short) addresses are provided with unicast and broadcast capabilities. The
physical layer payload is up to 127 bytes, with 72–116 bytes of payload available after link-layer
framing, addressing, and optional security.

The MAC can be run in two modes: beaconless mode and beacon-enabled mode. Beaconless mode
uses pure CSMA channel access and operates quite like IEEE 802.11 without channel reservations.
Beacon-enabled mode uses a hybrid time division multiple access (TDMA) approach,with the
possibility of reserving time-slots for critical data. IEEE 802.15.4 includes many mechanisms for
forming networks, and for controlling the superframe settings. An IEEE 802.15.4 reference is
provided in Appendix B.

Early 6LoWPAN standardization work was originally aimed at the IEEE 802.15.4 standard
[RFC4919, RFC4944] and thus assumed that some 802.15.4-specific features such as beacon-
enabled mode and association mechanisms would be used along with 802.15.4 device roles. Based
on practical experience with [RFC4944] and industry needs, recent 6LoWPAN standardization has
been generalized to work with a larger range of link layers and avoids the assumption of IEEE
802.15.4-specific features. The use of 6LoWPAN with IEEE 802.15.4 is covered in more detail in
Section 2.2.

Sub-GHz ISM band radios


Sub-GHz radio technologies using the industrial, scientific and medical (ISM) bands for unlicensed
operation are especially popular in low-power wireless embedded applications such as telemetry,
metering and remote control. The sub-GHz ISM bands cover 433 MHz, 868 MHz and 915 MHz. The
main reasons for sub-GHz popularity are the better penetration of lower frequency, resulting in
better range compared to 2.4 GHz, and the 2.4 GHz ISM band becoming very crowded in urban
environments.

One example of a popular sub-GHz chip is the Texas Instruments CC1101 transceiver [CC1101]. This
transceiver acts as a reconfigurable radio and is capable of 300–928 MHz operation, with a wide
variety of modulations, channel and data rates up to 500 kbit/s. Such a chip can also be used with an
external power amplifier for increasing range. The features of the chip include carrier sensing,
received signal strength indicator (RSSI) support, and frame sizes up to 250 bytes. The system-on-
a-chip version, the CC1110, additionally includes a 128-bit AES encryption hardware engine.

This kind of transceiver only provides the physical layer, so the datalink layer is implementation
specific and needs to provide e.g. framing, addressing, error checking, acknowledgments and frame
length. When designing a link layer for this type of transceiver, the IEEE 802.15.4 frame structure
and beaconless mode operation is typically used as a starting point.

Power line communications


6LoWPAN also has interesting uses over special wired communication links, such as lowrate power
line communications (PLC). Applications of this technology include home automation, energy
efficiency monitoring and smart metering.

One such system from Watteco [Watteco] uses what is called a watt pulse communication (WPC)
technique, greatly reducing the complexity of communications. The data rate of the physical layer
provided using WPC is 9.6 kbit/s, and the resulting channel over the power system of a house,
building or urban area is multi-access and similar to a wireless CSMA channel.

Watteco provides a version of WPC with an emulation of the IEEE 802.15.4 data link layer. This
allows 6LoWPAN to be used with PLC in a very similar way to IEEE 802.15.4 and other ISM band
radios. With PLC, multihop routing is not an issue as typically all nodes are on the same stable link.
Multihop forwarding may be useful to interconnect several PLC subnets, or to integrate PLC and
wireless 6LoWPAN islands.
Coming up in Part 4: Addressing, header format, bootstrapping, mesh topologies and Internet
integration.

Printed with permission from John Wiley & Sons, Ltd. Copyright 2009. "6LoWPAN: The Wireless
Embedded Internet" by Zach Shelby and Carsten Bormann, ISBN: 978-0-470-74799-5. For more
information about this title and other similar books, please visit John Wiley & Sons.

Related links:
6LoWPAN: The wireless embedded Internet - Part 1: Why 6LoWPAN? | Part 2: 6LoWPAN
history, market perspective & applications
Top Embedded Internet How-To's of 2010 (so far)
Web services for smart objects - Part 1: Overview | Part 2: Performance | Part 3: A real-
world web service system for smart objects
Analyzing 6LoWPAN Networks
Signal Chain Basics (Part 24): Basic networking using the IEEE 802.15.4 PHY/MAC
protocol
Clearing up the mesh about wireless networking topologies: Part 2
Rise of the Embedded Internet

You might also like