Unit 3
Unit 3
NETWORK DESIGN
UNIT III
6LOWPAN
Contents
2
1. 6LoWPAN Architecture
6LoWPAN (IPv6 over Low-Power Wireless Personal Area Network) is a
networking protocol designed to enable communication between low-power
devices over wireless connections using IPv6. It targets devices that have
limited processing power, memory, and energy resources, making it suitable for
applications like home automation, industrial control, healthcare monitoring,
and sensor networks.
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.
3
4
The 6LoWPAN architecture is made up of low-power wireless area networks
(LoWPANs), which are IPv6 stub networks.
The edge router plays an important role as it routes traffic in and out.
A LoWPAN consists of nodes, which may play the role of host or router, along
with one or more edge routers.
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.
A multihop mesh topology within the LoWPAN is achieved either through link-
layer forwarding (called Mesh-Under) or using IP routing (called Route-Over).
The Simple LoWPAN and Extended LoWPAN Nodes can communicate with
either of the servers through their edge router.
6LoWPAN only supports IPv6, for which a small adaptation layer (called the
LoWPAN adaptation layer) has been defined to optimize IPv6 over IEEE
802.15.4.
The most common transport protocol used with 6LoWPAN is the user
datagram protocol (UDP), which can also be compressed using the LoWPAN
format.
12
Adaptation between full IPv6 and the LoWPAN format is performed by routers
at the edge of 6LoWPAN islands, referred to as edge routers.
In many cases, more effort is required to map IP layer services to those of the
lower layer. This kind of specification can sometimes become a distinct
(sub)layer, often referred to as an adaptation layer.
13
An “IP-over-X” adaptation layer needs to map IP datagrams to the services
provided by the subnetwork, which is usually considered to be at layer 2 (L2)
of a layered reference model.
Once the IP layer determines the next hop's IP address for a packet, the
adaptation layer's role includes finding the appropriate link-layer address.
This link-layer address ensures the packet reaches the right destination on its
journey to the intended IP-layer endpoint.
14
In some cases, the subnetwork might not immediately offer a route for
packets to reach the next IP node.
Different link layers can transport various packet types beyond IP datagrams,
often indicating next-layer packet type, unlike IEEE 802.15.4 where
6LoWPAN autonomously distinguishes packet encapsulations.
16
IP is designed for standalone packets, leading to potentially redundant
headers. In LoWPAN, a 48-byte IP/UDP header in an IEEE 802.15.4 packet
occupies much payload space, often necessitating fragmentation. A better
solution is 6LoWPAN's approach: reducing redundancy between L3 and
L2 via header compression.
The most basic requirements for a link layer to support 6LoWPAN are
framing, unicast transmission and addressing.
17
Addressing is required to differentiate between nodes on a link, and to form
IPv6 addresses which are then elided by 6LoWPAN compression.
18
1.2.1 IEEE 802.15.4
The 802.15.4 standard provides 20–250 kbit/s data rates depending on the
frequency.
19
20
Channel sharing is achieved using carrier sense multiple access (CSMA), and
acknowledgments are provided for reliability.
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 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.
The sub-GHz ISM bands cover 433 MHz, 868 MHz and 915 MHz and are
especially popular in low-power wireless embedded applications such as
telemetry, metering and remote control.
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.
When designing a link layer for this transceiver, the IEEE 802.15.4 frame
structure and beaconless mode operation is typically used as a starting point.
22
1.2.3 Power line communications
6LoWPAN also has interesting uses over special wired communication links,
such as lowrate power line communications (PLC).
23
1.3 Addressing
IPv6 addresses are typically formed automatically from the prefix of the
LoWPAN and the link-layer address of the wireless interfaces.
IPv6 addresses are 128 bits in length, and consist of 64-bit prefix part and a
64-bit interface identifier (IID). 24
Stateless address autoconfiguration (SAA) is used to form the IPv6 interface
identifier from he link-layer address of the wireless interface.
For simplicity and compression, 6LoWPAN networks assume that the IID has a
direct mapping to the linklayer address, therefore avoiding the need for address
resolution.
25
2. Forwarding and Routing
Packets will often have to traverse multiple radio hops on their way through the
LoWPAN.
In each node, the routing protocol fills in a routing information base (RIB),
which contains all the information needed to run the routing protocol.
27
Figure 2.5 shows the usual illustration for routing at the network layer:
Packets are sent through some link and arrive at a router on an interface if0.
The router looks up the destination address in its FIB, selects an interface to
forward it out on (here: if1), together with a linklayer address to send it to, and
sends the packet encapsulated with the new link-layer address out via that
interface.
In LoWPAN, the interface that the packet arrives on at the router node is
usually the same interface that is used again for sending it out has been called
“router on a stick”. It is shown in Figure 2.6
28
29
2.1 L2 forwarding (“Mesh-Under”)
When routing and forwarding happen at layer 2, they are performed based on
layer-2 addresses, i.e., 64-bit EUI-64 or 16-bit short addresses.
In case the actual link-layer forwarding is not hidden from the LoWPAN
adaptation layer (Figure 2.8) ,the link-layer headers describe the source and
destination addresses for the current layer-2 hop.
30
31
32
To forward the packet to its eventual layer-2 destination, the node needs to
know the final destination address and originator address.
33
Since the diameters of useful wireless multihop networks are usually small, the
format is optimized for hops left values below 15 by only allocating four bits
to that value (first case in Figure 2.9).
The V and F bits indicate whether the originator (or “very first”) address and
the final Destination address, respectively are 16-bit short (1) or 64-bit EUI-
64 (0) addresses.
34
35
2.2 L3 routing (“Route-Over”)
In the "Route-Over" approach, each routing node in the network makes its
routing decisions based on the Layer 3 (network layer) information. In other
words, every individual router in the path makes a routing decision, thus the
name "Route-Over."
Layer-3 Route-Over forwarding does not require any special support from the
adaptation layer format.
Before the layer-3 forwarding engine sees the packet, the adaptation layer has
done its work and decapsulated the packet.
A separate set of techniques has evolved that focuses on compressing the stacks
of headers in sequences of packets: header compression.
39
ROHC (robust header compression) standards and its predecessors focus on
compressing flows of packets, such as the sequence of packets from a single
TCP connection or an RTP ( Real-time Transport Protocol) stream.
This works by setting up flow state for each new connection/stream, and
stepping through a set of compression states during the exchange of the initial
packets of the flow until a high level of compression is attainable.
The main problem that flow-based header compression needs to solve is that
the per-flow state, the context, is likely to get out of sync between the sender
and the receiver when packets get lost.
HC1 allows the compressor to select elision of each half of both source and
destination address independently by using two bits in the HC1 header each,
called SAE (source address encoding) and DAE (destination address
encoding).
The rest of the HC1 header is concerned with the compression of the non-
address components of an IPv6 header and illustrated in Fig. 2.12 42
43
The version number is obviously always 6 and therefore never needs to be
sent.
Two fields that often are zero in IPv6 headers are the traffic class and the
flow label.
The C bit in the HC1 header, if set, indicates that these bits indeed are zero
and are not sent. If the C bit is clear, they are included among the non-
compressed fields in the sequence explained below.
The payload length can be inferred from the remaining length of the
6LoWPAN PDU and therefore is never sent in a compressed header.
The next header field is one full byte, but has a number of values that are
much more likely than others.
44
Finally, the Hop Limit was considered to be too difficult to compress and
therefore is always sent in-line in the non- compressed fields.
The non-compressed fields that follow the HC1 or HC1/HC2 header always
start with the Hop Limit (8 bits). After that it follow
source address prefix (64 bits), if the high-order bit of SAE is zero;
source address interface identifier (64 bits), if the low-order bit of SAE is
zero; 45
destination address prefix (64 bits), if the high-order bit of DAE is zero;
traffic class (8 bits) and flow label (20 bits), if the C bit is zero;
next header (8 bits), if NH is zero;
any non-compressed fields left by HC2, if present;
any next headers and payloads not further subject to compression.
46
3.2 Context-based header compression
In many LoWPANs, most packets will go from LoWPAN hosts to some nodes
external to the LoWPAN or in the inverse direction.
Both cases cannot work with link-local addresses; both source and
destination addresses will be routable addresses.
Generally, only eight of the 32 bytes of IPv6 addresses in such packets will be
compressible.
The new context-based header compression scheme does not define how the
context is acquired, but the assumption is that this will be done using
6LoWPAN’s extensions to Neighbor Discovery.
The TF bits control how the IPv6 header fields traffic class and flow label are
handled.
50
The N bit controls both whether a next header field is sent in-line and whether the
next header uses LOWPAN_NHC.
The S flag and the D flag control whether compression of the respective address
is context-based or not.
Figure 2.16 shows the LOWPAN_NHC base header values for UDP.
51
The P field and C bit control how
the port number and checksum
fields of the UDP header are
compressed.
52
If it is set, the UDP checksum is removed by the compressor and must be
recomputed at the decompressor.
The P field controls the compression of the source and destination fields of
the UDP header (see Figure 2.18). 53
54
4. Fragmentation and Reassembly
IP packets vary in size, with IPv6 packets having a minimum size of 40 bytes,
consisting of a 40-byte IP header and a payload length of 0 bytes.
However, dealing with multiple interfaces or changing MTUs along the route
becomes complex.
IPv4 accommodates larger packets but requires the ability to fragment and
reassemble them, with a minimum requirement of 68 bytes. 56
The don't fragment (DF) flag and path MTU detection (PMTUD) are used in
IPv4 to handle MTU variations along the route and prevent fragmentation issues.
PMTUD has led to a minimal fragmentation rate in typical Internet traffic, with
less than 1% of packets being fragmented.
57
4.1 The fragmentation format
6LoWPAN has distinct requirements for fragmentation and reassembly
compared to ATM due to differences in link layer capabilities and the absence
of in-sequence virtual circuit semantics.
The first byte of a fragment (dispatch byte) indicates the frame type; some
values are allocated for fragments with datagram_size, reducing the need for
padding.
59
60
A procedure is outlined for sending large 6LoWPAN PDUs that are too big to
fit into a link-layer frame, involving calculations for packet size, header size, and
available frame space.
62
5. Mobility
Mobility in 6LoWPAN refers to the ability of nodes within such networks to
move, change their point of attachment to the network, or even change their
network domain while maintaining their connectivity and communication
capabilities.
All of these uses of the wireless network require us to deal with node mobility
between edge routers in the same LoWPAN, between LoWPANs and
possibly between network domains.
63
At the same time, active data flows may be in progress and application servers
may need to know how to reach tracked devices.
1. Mobility types
Roaming: A process in which a mobile node moves from one network to
another, typically with no existing packet streams.
Mobility can alternatively be described with the terms micro-mobility and macro-
mobility.
64
Micro-mobility refers to mobility that occurs within a network domain. In
6LoWPAN we can consider micro-mobility to refer to the mobility of a node
within a LoWPAN where the IPv6 prefix does not change.
In wireless networks there are a number of things that may cause a network
to make a change in topology. The causes of topology change can be
categorized simply as
67
5.2 Mobile IPv6
The mobility of well-known IP address nodes on the Internet can be dealt
with at the network layer using a protocol called Mobile IP (MIP).
This new version takes advantage of IPv6 mechanisms and provides route
optimization.
The goal of MIP is to deal with the mobility roaming problem by allowing a
host to be contacted using a, regardless of its location on the Internet.
Mobile IP does this using the concept of a home address, which is associated
with a host’s home network.
68
When a host is away from its home network, and attaches to another
network domain (called the visited network), the new IP address it configured
there is called its care-of address.
5.2.1 Functionality
When a mobile node moves away from its home network, it sends a MIPv6
binding update message to its Home Agent (HA) to inform it of the change
in location.
If the mobile node doesn't know the location of its HA or its home prefix, there
are methods to discover both to ensure proper communication.
To optimize routing and enable direct communication between the mobile node
and corresponding nodes, MIPv6 includes route optimization and security
association procedures. Once established, communication can proceed directly
between these nodes.
The use of MIPv6 as defined in with 6LoWPAN has the following problems:
IPv6-in-IPv6 tunneling between the HA and LoWPAN Node would incur large
header overheads.
The traffic burden caused by MIPv6 may be too much for low-bandwidth
wireless links. 72
The added complexity of implementing MIPv6 in terms of code size and RAM
may be unjustifiable for LoWPAN Nodes.
This greatly simplifies the functions that a mobile node needs to perform to
participate in MIPv6.
73
74
The PHA is located in the visited network where a mobile node is roaming, in
6LoWPAN this would logically be the LoWPAN Edge Router.
A PHA acts like a normal MIPv6 host, but additionally performs binding
updates, HA tunneling and route optimization on behalf of other nodes.
In order to use the PHA concept with 6LoWPAN, a mechanism for registering
with the PHA would need to be defined for use inside the LoWPAN.
(6LoWPAN-ND Node Registration message).
It include the Home Agent’s address or home prefix, the node’s home address
and some credentials.
75
5.4 Proxy MIPv6
Proxy MIPv6 (PMIPv6), uses a local hierarchical structure of routers to handle
mobility on behalf of nodes.
The LMA handles the local mobility of nodes with the help of mobile access
gateways (MAGs), which are points of attachment supporting PMIPv6.
76
77
Mobile access gateways (MAG) send proxy binding updates to the LMA on
behalf of mobile nodes attached to them.
Using bidirectional tunnels built between each MAG and the LMA, the LMA is
then able to forward traffic to the mobile node always using its static address
(known as a mobile node home address).
A binding in the LMA is made between this address and the temporary
address from the visited MAG (the proxy care-of address).
PMIPv6 makes use of RS/RA exchanges directly between the mobile node and
MAG in order to detect when the mobile node has changed its point of
attachment.
78
Limitations
PMIPv6 is meant to provide a separate 64-bit prefix for each mobile node.
PMIPv6 only enables a node to talk with its point of attachment (default router).
5.5 NEMO
Network mobility (NEMO) is a solution for dealing with network mobility
problems, when a router and the nodes attached to it, move their point of
attachment all together.
79
The philosophy behind NEMO is to extend Mobile IP so that each node does not
need to run Mobile IP, instead only the router they are attached to runs
Mobile IP.
This philosophy fits the 6LoWPAN model perfectly as LoWPAN Nodes are not
capable of dealing with MIPv6.
The NEMO protocol introduce a new logical entity called mobile router, which
is responsible for handling MIPv6 functions for the entire mobile network.
Mobile nodes which are part of the mobile network are called mobile network
nodes (MNNs).
NEMO extends the functionality of the Home Agent to be able to deal with
prefixes in addition to home addresses of mobile nodes. 80
81
A mobile router functions like a normal MIPv6 host setting up a bidirectional
tunnel with its Home Agent, but in addition it negotiates prefixes to be
forwarded to it by the Home Agent.
The Home Agent then forwards all packets matching the bound prefix (therefore
packets for the MNNs) to the mobile router.
A special flag in the binding update allows the mobile router to indicate it wants
prefix forwarding, and a prefix option lets it configure prefixes with the HA.
Drawback of NEMO
It can not deal with individual node mobility on behalf of the LoWPAN Nodes.
There are two main classes of routing protocols useful for 6LoWPAN:
Distance-vector routing and
Link-state routing
83
Distance-vector routing
Using this approach, each link (and possibly node) is assigned a cost, using
appropriate route metrics.
When sending a packet from node A to node B, the path with the lowest cost is
chosen.
The routing table of each router keeps soft-state route entries for the
destinations it knows about, with the associated path cost.
84
Link-state routing
In this approach, each node acquires complete information about the entire
network, called a graph.
To do this, each node floods the network with information about its link
information to nearby destinations.
After receiving link-state reports from sufficient nodes, each node then
calculates a tree with the shortest-path (least cost) from itself to each
destination using e.g. Dijkstra’s algorithm.
85
6.1 MANET
The mobile ad hoc network (MANET) has three common protocols:
It includes methods for local repair, and includes a destination sequence number
to ensure loop-free operation.
AODV is purely a route table management protocol; after routes have been
established they are simply used by IP for forwarding.
88
6.1.2 DYMO
A new reactive distance-vector routing protocol called the dynamic MANET
on-demand (DYMO) protocol has been developed by making improvements
on previous protocols such as AODV and dynamic source routing (DSR).
This protocol makes use of the same types of route discovery and maintenance
messages as AODV. 89
The main improvements compared to previous work include:
6.1.3 OLSR
The MANET WG has also produced a proactive link-state routing protocol
called the optimized link-state routing (OLSR) algorithm.
This algorithm applies optimization to the classical link-state algorithm for use
in mobile ad hoc networks
90
In order to build link-state tables, OLSR routers regularly exchange topology
information with other routers.
OLSR is best suited for relatively static ad hoc networks, thus minimizing the
number of link-state updates throughout the network, which can cause a lot of
overhead.
91
6.2 The ROLL routing protocol
The routing over low power and lossy (ROLL) networks was formed to
analyze the requirements for and standardize a routing protocol for embedded
applications such as urban ubiquitous networks, industrial automation, building
automation and home automation.
Traffic patterns are not only peer-to-peer unicast flows, but more often
point-to multipoint or multipoint-to-point flows. 92
Routers in LLNs have a very small, hard bound on state (limited
memory).
Most LLNs must be optimized for energy consumption.
Security and manageability are extremely important as LLNs are typically
autonomous.
The application spaces aimed at by ROLL are heterogeneous.
Each may need a different set of features along with routing metrics to
fulfill its requirements.
ROLL architecture
93
The ROLL protocol can be classified as a proactive distance-vector algorithm
with advanced options for constraint-based routing, multi-topology routing
and traffic engineering.
The key requirements or assumptions for LLNs that affect the routing
architecture are:
LLNs are Internet-connected stub networks, with support for multiple
points of attachment.
Support for dynamic topologies and mobility is required.
Support is required for multipath routing, and thus multiple forwarding
options.
Support is required for multiple node and route metrics, and their application
in constraint-based and multi-topology routing.
Routers in LLNs have limited memory resources.
Most applications will require enterprise-class security.
94
95
Routers with interfaces to the LLN and another IP link are called LLN border
routers (LBRs).
Inside the LLN, the network is made up of LLN routers and LLN hosts.
Hosts do not participate in the LLN routing algorithm, and instead simply
choose default LLN routers.
Metric granularity:
ROLL uses the concept of a very granular route metric called depth.
This metric is used by the basic ROLL protocol mechanisms for building the
graph, making use of siblings and for loop avoidance.
99
The ROLL protocol maintains a fundamental topology enabling upstream
forwarding from LLN nodes to Local Border Routers (LBRs).
Source routing can be stateless or utilize states and flow labeling for path
indication.
100
Optimizations
Traffic engineering:
To meet specific requirements like traffic engineering, solutions in ROLL may
include off-line traffic engineering for quality of service, accomplished by
labeling, multi-topology routing, or source routes to designated nodes.
Node-to-node flows:
ROLL addresses diverse needs, such as node-to-node flows, with optimizations
like boulevard routes or reactive distance-vector features.
Mobility support:
Additionally, mobility support (MIPv6, NEMO, MANEMO) integration with
ROLL is explored to enhance adaptability for various applications.
101
6.3 Border routing
The ROLL protocol is designed to optimize traffic flows in Low-power and
Lossy Networks (LoWPANs), especially for applications with traffic coming
from or going towards the Internet.
Border routing, common on the broader Internet, becomes relevant at the edge,
especially with the emergence of IP routing in wireless stub networks using
mesh routing protocols.
102
Three cases of border routing in
6LoWPAN are considered:
Simple LoWPAN,
Extended LoWPAN, and
Route redistribution
103
In Simple LoWPANs, with a single edge router, prefix-based route entries are
used between the LoWPAN and IPv6 link.
Filtering mandates the use of a routing protocol only over specific access
networks.
104