0% found this document useful (0 votes)
8 views61 pages

06 Network Layer IP 6LoWPAN

This document discusses IP-based network layer solutions for the Internet of Things. It provides information on IPv4 and IPv6 protocols. IPv6 was developed to replace IPv4 and address the issue of IPv4 address exhaustion. IPv6 features extended 128-bit addressing capabilities, different address types like unicast and multicast, and a redesigned IP header with additional fields removed. The document is from a course on IP-based network layer solutions for IoT taught at the University of Bologna by Professors Bononi and Di Felice.

Uploaded by

Nomi Alvi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views61 pages

06 Network Layer IP 6LoWPAN

This document discusses IP-based network layer solutions for the Internet of Things. It provides information on IPv4 and IPv6 protocols. IPv6 was developed to replace IPv4 and address the issue of IPv4 address exhaustion. IPv6 features extended 128-bit addressing capabilities, different address types like unicast and multicast, and a redesigned IP header with additional fields removed. The document is from a course on IP-based network layer solutions for IoT taught at the University of Bologna by Professors Bononi and Di Felice.

Uploaded by

Nomi Alvi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

The

Internet of Things:
IP-based Network Layer Solu<ons
Course website: h8p://www.cs.unibo.it/projects/iot/

Prof. Luciano Bononi Prof. Marco Di Felice


[email protected] [email protected]

MASTER DEGREE IN COMPUTER SCIENCE


DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IoT Protocol Stack

IP-BASED NETWORK LAYER SOLUTIONS


2
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IoT Protocol Stack
TCP/IP STACK

MESSAGING
PROTOCOLS MQTT CoAP AMQP HTTP OTHERS

TRANSPORT PROPRIETARY
PROTOCOLS TCP UDP STACKS

NETWORK
PROTOCOLS IPv4 and IPv6 + 6LoWPAN
PHY/MAC
PROTOCOLS IEEE 802.3 IEEE 802.11 IEEE 802.15 IEEE 802.16 OTHERS

IP-BASED NETWORK LAYER SOLUTIONS


3
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv4 Protocol
q  IP version 4 (IPv4)

²  First version deployed by the ARPANET project in 1983


²  Uses 32-bit network addresses (address space à 4294967296 values).
²  IPv4 can be public (i.e. routable over the Internet) or private
²  Each IPv4 address contains two parts: the (i) network iden^fier
and the (ii) host iden^fier. The network mask indicates the number
of bits (over the 32) used to represent the network iden^fier.
PRIVATE
ADDRESS 192 168 10 3 /24
MASK
NETWORK IDENTIFIER HOST

IP-BASED NETWORK LAYER SOLUTIONS


4
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol
q  IP version 6 (IPv6)
²  Developed by the Internet Engineering Task Force (1998).
²  Replace IPv4 and address the IPv4 address exhaus^on problem.
²  Addi^onal rou^ng func^onali^es (not included in IPv4).
²  Not compa^ble with the IPv4 protocol.

q  The migra<on process to IPv6 involves:


network infrastructures, routers, applica^ons

q  Complete migra^on expected by 2025

IP-BASED NETWORK LAYER SOLUTIONS


5
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol
q  IP version 6 (IPv6) adop^on worldwide

IP-BASED NETWORK LAYER SOLUTIONS


6
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol
q  Novel features of the IPv6 protocol (compared to IPv4)
1. Extended addressing capabili<es

IPv4 address: 32 bit, IPv6 address: 128 bit à 2128 combina<ons available!

3FFE:085B:1F1F:0000:0000:0000:00A9:1234

8 groups of 16-bit hexadecimal numbers separated by “:”

Leading zeros can be removed à 3FFE:85B:1F1F::A9:1234

IP-BASED NETWORK LAYER SOLUTIONS


7
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol
q  Novel features of the IPv6 protocol (compared to IPv4)
1. Extended addressing capabili<es

Three types of IPv6 addresses:


²  Unicast: one-to-one communica^on


²  Mul<cast: one-to-many communica^on
²  Anycast: one-to-a-group, and a single des^na^on is chosen
²  Broadcast: not supported

IP-BASED NETWORK LAYER SOLUTIONS


8
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol
q  Novel features of the IPv6 protocol (compared to IPv4)
1. Extended addressing capabili<es

A network interface can have mul^ple addresses

LINK-LOCAL ADDRESSES

² Start using a link-local prefix FE80::/10 Global Site-Local Link-Local


² Contain the interface iden^fier (e.g. MAC address)
in the modified EUI-64 format.
² Can be used to reach the neighboring nodes a8ached to the same link
² IPv6 routers must not forward packets having link-local source/des^na^on
² All IPv6 enabled interfaces have a link-local unicast address.
IP-BASED NETWORK LAYER SOLUTIONS
9
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol
q  Novel features of the IPv6 protocol (compared to IPv4)
1. Extended addressing capabili<es

A network interface can have mul^ple addresses

SITE-LOCAL ADDRESS
² Start using a link-local prefix FC00::/7 Global Site-Local Link-Local
² Similar proper^es as IPV4 private addresses

GLOBAL ADDRESS
² Can be used to route IP datagrams over the Internet
² Variable prefix, defined from router adver^sements. Some IP addresses can be reserved.
IP-BASED NETWORK LAYER SOLUTIONS
10
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol
q  Novel features of the IPv6 protocol (compared to IPv4)
2. IP Header re-newed

IPv6 header, 40 Byte



Version Traffic Class Flow Label

Version IHL Type of Service Total Length Next


Payload Length Hop Limit
Header
Fragment
Identification Flags
Offset

Time to Live Protocol Header Checksum Source Address


Source Address
Destination Address
Options Padding
Destination Address
IPv4 header, 20 Byte
IP-BASED NETWORK LAYER SOLUTIONS
11
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol
q  Novel features of the IPv6 protocol (compared to IPv4)
2. IP Header re-newed

Version IHL Type of Service Total Length


Fields removed in the IPv4 header:

Fragment ²  Checksum à replicated in MAC and TSP


Identification Flags
Offset header, not needed at the IP layer.
Time to Live Protocol Header Checksum ²  Fragmenta<on à fragmenta^on is
Source Address performed by end-points, while might not
Destination Address
be supported by routers.
Options Padding ²  Op<ons à replaced by pointer to next
IPv4 header, 20 Byte header extension (next header).

IP-BASED NETWORK LAYER SOLUTIONS


12
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol
q  Novel features of the IPv6 protocol (compared to IPv4)
2. IP Header re-newed
Version Traffic Class Flow Label

IPv6 header, 40 Byte


Iden^fy possible QoS requirements
Next
Payload Length Hop Limit
Header
Iden^fy a source-des<na<on traffic flow

Pointer to next header extension (op^onal) Source Address


IPv6 header
Next header=TCP
TCP header + data

IPv6 header Rou^ng header


Destination Address
TCP header + data
Next header=Rou^ng Next header=TCP

IP-BASED NETWORK LAYER SOLUTIONS


13
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol
q  Novel features of the IPv6 protocol (compared to IPv4)
3. IP Address assignment process, three ways

² Manual configura^on à like using the “ifconfig” u^lity


² Stateful configura^on à using DHCPv6 protocol
² Stateless autoconfigura<on à no DHCP, IPv6 nodes can connect to a network
and automa<cally generate global IPv6 addresses without the need for
manual configura^on or help of a server.

IPv6 address=interface
iden<fier + RA prefix ROUTER ADVERTISEMENT (RA)

IP-BASED NETWORK LAYER SOLUTIONS


14
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol
q  Novel features of the IPv6 protocol (compared to IPv4)
3. IP Address assignment process, three ways

² Manual configura^on à like using “ifconfig” u^lity


² Stateful configura^on à using DHCPv6 protocol
² Stateless autoconfigura<on à no DHCP, IPv6 nodes can connect to a network
and automa<cally generate global IPv6 addresses without the need for
manual configura^on or help of a server.
Check for possible IP duplicates, using
the Neighbour Discovery Protocol (NDP)
ROUTER ADVERTISEMENT (RA)
IPv6 address
IP-BASED NETWORK LAYER SOLUTIONS
15
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol
q Managing transi^on from IPv4 to IPv6


²  Dual-stack approach
Some routers will support both IPv4 and IPv6 protocols

²  GRE Tunnelling approach


Communica^on tunnels enable communica^on between IPv6
subnetworks over IPv4 links

IPv6 network D-S IPv4 network D-S IPv6 network


IP-BASED NETWORK LAYER SOLUTIONS
16
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol and the IoT
q  Benefits of using IPv6 protocols on IoT scenarios:
²  Address/manage/access any IoT device from the Internet.
²  Easily connect to other IP networks without the need for
transla<on gateways or proxies.
²  Use well-known socket API for the deployment of network
applica^on.
²  Easily re-use tools for managing, commissioning and diagnosing
IP-based networks.
²  Leverage on the addressing capability of the IPv6 protocol.

IP-BASED NETWORK LAYER SOLUTIONS


17
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol and the IoT
q  At the same ^me, suppor^ng IPv6 over IoT scenarios
present several challenges:
²  IPv6 datagrams are not a natural fit for IEEE 802.15.4 networks
²  MTU size of an IEEE 802.15.4 frame is 127 bytes, while the minimum IPv6
frame size is 1280 bytes;
²  The IPv6 header size (40 bytes) can occupy 1/3 of the MTU
²  IPv6 assumes that a link is a single broadcast domain, while the assump^on
does not hold in mul^-hop wireless sensor networks.
²  IPv6 includes op<onal support for IP security (IPsec), authen^ca^on and
encryp^on but these techniques might be too complex for IoT-devices.

IP-BASED NETWORK LAYER SOLUTIONS


18
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
IPv6 Protocol and the IoT
q  Worst case scenario calcula^ons.
²  Maximum frase size in IEEE 802.15.4 à 127 bytes
²  Reduced by the max frame header (25 bytes) à 102 bytes
²  Reduced by the highest link layer security (21 bytes) à 81 bytes
²  Reduced by standard IPv6 header (40 bytes) à 41 bytes
²  Reduced by standard UDP header (8 bytes) à 33 bytes
²  Only 33 bytes led for data payload!

FRAME HEADER (25) LLSEC (21) IPv6 HEADER (40) UDP(8) PAYLOAD (33)

IP-BASED NETWORK LAYER SOLUTIONS


19
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN
q  Set of standards defined by the Internet Engineering Task
Force (IETF) enabling the efficient use of IPv6 over low-
power, low-rate wireless networks on simple embedded IoT
devices. It provides:
²  A novel Adapta<on Layer;
²  Several op<miza<on of IPv6 func^onali^es.
²  RFC 4919 (first specifica^on, 2007)
²  RFC 4944 (auto-configura^on)
²  RFC 6282 (header compression)
²  RFC 7400 (header compression)
²  …

IP-BASED NETWORK LAYER SOLUTIONS


20
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN MarketShare

Source: h8ps://www.ee^mes.com/document.asp?doc_id=1324664

IP-BASED NETWORK LAYER SOLUTIONS


21
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN
INTERNET
Router Router Three Network Architectures

Edge router Backhaul link


R Edge router Edge router H

R
R
R

R
H
R
R
R
R
R
H
H H
H H H H H H

Simple LoWPAN
Ad-Hoc LoWPAN
Extended LoWPAN

IP-BASED NETWORK LAYER SOLUTIONS


22
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN
Three types of nodes:
INTERNET Hosts à end-user sleepy device,
Router Routers à forward data inside the LoWPAN
Router
Edge Routers à connect a LoWPAN to an
external IPv6 network
Edge router Backhaul link


R Edge router Edge router

R
R H

R
H
R
R
R
R
R
H
R
H
H
H H H H H
H
Simple LoWPAN
Extended LoWPAN Ad-Hoc LoWPAN

IP-BASED NETWORK LAYER SOLUTIONS


23
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN
q  6LoWPAN Protocol Stack vs Ethernet Protocol Stack
UDP is the most common
TSP protocol with
APPLICATIONS APPLICATIONS
ETHERNET PROTOCOL STACK

6LoWPAN PROTOCOL STACK


6LOWPAN, since its
header can be easily
TCP UDP ICMP UDP ICMP compressed …
6LoWPAN can work with
IPv6 LOWPAN other link-layer protocols
beside IEEE 802.15.4.
ETHERNET MAC IEEE 802.15.4 MAC Requirements:
²  Unique addressing
ETHERNET PHY IEEE 802.15.4 PHY ²  Unicast transmissions
²  MTU size > 30 bytes

IP-BASED NETWORK LAYER SOLUTIONS


24
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN
q  Use-cases: Large-scale IoT Deployment

WASTE MANAGEMENT SYSTEM


SMART LIGHTING SYSTEM

IP-BASED NETWORK LAYER SOLUTIONS


25
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
h8ps://iot6.eu/iot6_%20use_cases

6LoWPAN
q  Use-cases: Interoperable, Smart Environments

SMART BUILDING
SMART OFFICE

IP-BASED NETWORK LAYER SOLUTIONS


26
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
Digression: IEEE 802.15.4
q  Low-power, low-cost technology for Wireless Personal
Area Networks (WPANs) Source: h8p://file.scirp.org/Html/1-4000110_65802.htm

IP-BASED NETWORK LAYER SOLUTIONS


27
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
Digression: IEEE 802.15.4
q IEEE 802.15.4 à standard for the deployment of WPAN.
Characteris^cs: low complexity, low-power for low-datarate
wireless connec^vity among fixed and portable devices.
APPLICATIONS } USER-DEFINED
The specifica^ons define the
PHY techniques and MAC layer,
while the upper layers are
PROFILES
NETWORK LAYER
} ZIGBEE
defined by the Zigbee stack. MAC LAYER
PHY LAYER
} IEEE
IP-BASED NETWORK LAYER SOLUTIONS
28
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
Digression: IEEE 802.15.4
q IEEE 802.15.4 à standard for the deployment of WPAN.
Characteris^cs: low complexity, low-power for low-datarate
wireless connec^vity among fixed and portable devices.
Feature Descrip<on
Spectrum bands 2.4GHz, 915 MHz or 868 MHz
Data-rate Up to 250 Kbs (2.4GHz)
Range <30 meters
Channels 16 (2.4GHz)
Channel access CSMA/CA or slo8ed CSMA/CA

IP-BASED NETWORK LAYER SOLUTIONS


29
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
Digression: IEEE 802.15.4
q IEEE 802.15.4 à standard for the deployment of WPAN.
Characteris^cs: low complexity, low-power for low-datarate
wireless connec^vity among fixed and portable devices.

STAR TOPOLOGY PAN COORDINATOR AD HOC TOPOLOGY

IP-BASED NETWORK LAYER SOLUTIONS


30
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
Digression: IEEE 802.15.4
Conten^on Period CF Period Inac^ve

Network BEACON, send by the PAN coordinator, and containing network-related info. Used also
for synchronizing each device with the start of the conten^on-free opera^ons.

Conten^on-period slots. Accessed by using CSMA/CA protocol.

Conten^on-Free period slots. Reserved by PAN coordinator to applica^ons with QoS requirements.

Inac^ve periods (needed for energy saving on ba8ery-constrained devices)

IP-BASED NETWORK LAYER SOLUTIONS


31
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
Digression: IEEE 802.15.4
q Performance of IEEE 802.15.4 networks (Arduino Xbee testbed).

Source: www.arduino.cc

IP-BASED NETWORK LAYER SOLUTIONS


32
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN
q  Main opera<ons:
²  Device Addressing
²  Rou^ng (different from forwarding)
²  Header Extensions
²  Header compression
²  Fragmenta^on
²  Bootstrapping & Device discovery
² …
IP-BASED NETWORK LAYER SOLUTIONS
33
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN: Addressing
q  IPv6 addresses are typically formed automa<cally from
the prefix of the LoWPAN edge router, and the MAC
address of the wireless card.
q  The IEEE 802.15.4 supports two MAC address format:
²  64-bit EUI-64 address
ACDE:4812:3456:7890 + 2001:ODB8:0BAD:FADE
EUI-64 MAC address Network Prefix
²  48-bit EUI-64 address
PAN Network Iden^fier (16 bits) + 16 bits (zeros) + PAN Address (16 bits)
IP-BASED NETWORK LAYER SOLUTIONS
34
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN: Rou<ng
q  6LoWPAN supports two different rou<ng modes
MESH-UNDER ROUTING ² Uses the layer-two (MAC layer) addresses to
forward data packets.
APPLICATIONS ² A mesh-under network is a single IP subnet APPLICATIONS
with a single edge router.
UDP ² Useful for small or local networks. UDP

LoWPAN LoWPAN LoWPAN

MAC 802.15.4 MAC 802.15.4 MAC 802.15.4

PHY802.15.4 PHY802.15.4 PHY802.15.4

IP-BASED NETWORK LAYER SOLUTIONS


35
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN: Rou<ng
q  6LoWPAN supports two different rou<ng modes
ROUTE OVER ROUTING ² Uses the layer-three (IPv6) addresses to
forward data packets.
APPLICATIONS ² IPv6 addresses must be routable (Global only). APPLICATIONS
² Deploy scalable, large-scale networks.
UDP UDP

LoWPAN LoWPAN LoWPAN

MAC 802.15.4 MAC 802.15.4 MAC 802.15.4

PHY802.15.4 PHY802.15.4 PHY802.15.4

IP-BASED NETWORK LAYER SOLUTIONS


36
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
J. Olsson, 6LoWPAN Demys^fied, Whitepaper h8p://www.^.com/lit/wp/swry013/swry013.pdf

6LoWPAN: Extension Headers


q Analogously to IPv6, 6LoWPAN uses the Extension
Headers for the op^onal data and for specific use-cases.
q Two 6LoWPAN Extension Headers are defined:
FRAGMENT HEADER à used in case of packet fragmenta^on, see next slides

MESH HEADER à used by MESH_UNDER rou^ng, it contains: <ORIGINATOR_MAC, DESTINATION_MAC, NUM_HOPS_LEFT>

IP-BASED NETWORK LAYER SOLUTIONS


37
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN: Fragmenta<on
q All IPv6 subnetworks have to provide a minimum MTU of
1280 bytes (recommended: 1500 bytes).
² IPV6 does provide its own fragmenta^on for
datagrams larger than the minimum MTU (1280 bytes).
² 6LoWPAN provides fragmenta^on in order to fit the
size of 802.15.4 MTU (127 bytes)
²  Mesh-Under à fragments are reassembled at the des^na^on.
If any fragment is missing, the complete packet must be re-
transmiked by the source node.
IP-BASED NETWORK LAYER SOLUTIONS
38
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN: Fragmenta<on
q All IPv6 subnetworks have to provide a minimum MTU of
1280 bytes (recommended: 1500 bytes).
² IPV6 does provide its own fragmenta^on for
datagrams larger than the minimum MTU (1280 bytes).
² 6LoWPAN provides fragmenta^on in order to fit the
size of 802.15.4 MTU (127 bytes)
²  Route-over à fragments are reassembled at every hop (and
fragmented again). If is fragment is missing, the complete
packet must be re-transmiked by the previous node.
IP-BASED NETWORK LAYER SOLUTIONS
39
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN: Fragmenta<on
q Fragment info are contained in the Fragment Header.
q All Fragments carry the same tag value, assigned
sequentually by the source of fragmenta^on.
FIRST FRAGMENT

11000 SIZE TAG


OTHER FRAGMENTs

11000 SIZE TAG OFFSET

IP-BASED NETWORK LAYER SOLUTIONS


40
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
J. Olsson, 6LoWPAN Demys^fied, Whitepaper h8p://www.^.com/lit/wp/swry013/swry013.pdf

6LoWPAN: Header Compression


q 6LoWPAN can use state-less or shared-context header
compression mechanisms.

IP-BASED NETWORK LAYER SOLUTIONS


41
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
J. Olsson, 6LoWPAN Demys^fied, Whitepaper h8p://www.^.com/lit/wp/swry013/swry013.pdf

6LoWPAN: Header Compression


q 6LoWPAN can use state-less or shared-context header
compression mechanisms.

IP-BASED NETWORK LAYER SOLUTIONS


42
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
J. Olsson, 6LoWPAN Demys^fied, Whitepaper h8p://www.^.com/lit/wp/swry013/swry013.pdf

6LoWPAN: Header Compression


q 6LoWPAN can use state-less or shared-context header
compression mechanisms.

IP-BASED NETWORK LAYER SOLUTIONS


43
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN: Device Discovery
q The IPv6 Neighbour Discovery Protocol is used by IPv6
nodes to find routers, to determine their link-layer
address and to maintain reachibility info about the paths.
² Routers send Announcement messages (RA) in
mul^cast, a8aching their network prefix.
² IPv6 nodes can solicit a RA message by using a Router
Solicita<on (RS) message.
² Each IPv6 node builds its own address: <Prefix, MAC>
IP-BASED NETWORK LAYER SOLUTIONS
44
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN: Device Discovery
q Differences compared to the standard NDPv6 protocol
²  In 802.15.4 networks, 6LoWPAN nodes might belong to
different broadcast domains (e.g. mul^-hop scenarios).
²  RA messages must be flooded in the en^re 6LoWPAN.
RA from the ER
6LoWPAN

R
H
H

R
R
EDGE ROUTER H
RA from the IPv6 ROUTER

R H
RA from each 6LoWPAN router

IP-BASED NETWORK LAYER SOLUTIONS


45
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
6LoWPAN: Device Discovery
q Differences compared to the standard NDPv6 protocol.
²  The 6LoWPAN Edge Router maintains a whiteboard of all the
IPv6 address registered in the 6LoWPAN.
²  It also performs Duplicate Address Detec<on (DAD).
H
SINGLE-HOP TOPOLOGY

H R

MULTI-HOP TOPOLOGY
EDGE ROUTER EDGE ROUTER
ROUTER SOLICITATION RS
RA
ROUTER ADVERTISEMENT
NR
NR
NODE REGISTRATION
NC
NODE CONFIRMATION NC

IP-BASED NETWORK LAYER SOLUTIONS


46
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
RPL IETF specifica^ons (RFC 6550) -- h8ps://tools.ie{.org/html/rfc6550

RPL Protocol: Rou<ng over 6LoWPAN


q RPL à IPv6 Rou^ng Protocol for Low-Power and
Lossy Networks
² Standardized by the IETF in 2011 (current draz: RFC 6550)
² De Facto standard rou<ng protocol for IoT scenarios characterized by the presence of
low-power, resource-constrained devices.
² It supports: point-to-point, point-to-mul^point and mul^point-to-point communica^ons.
² It separates packet processing and forwarding from the rou^ng op^miza^on objec^ve
(e.g. min energy, maxthroughput, min delay, etc).
² It can be used to disseminate IPv6 or 6LoWPAN specific info (e.g. neighbour discovery).
² It does not rely on any specific link-layer protocol (although it is commonly coupled with
the IEEE 802.15.4 standard).

IP-BASED NETWORK LAYER SOLUTIONS


47
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
O. Iova, G. P. Picco, T. Istomin, and C. Kiraly, RPL, the Rou^ng Standard for the Internet of Things ... Or Is It?, Communica^on
Magazine: 54(12), 16-22, 2016

RPL Protocol: Rou<ng over 6LoWPAN


q  RPL creates a rou^ng topology in the form of a
Des<na<on-Oriented Directed Acyclic Graph (DODAG)
² Directed graph without cycles, oriented towards a root
node (the edge router).
ER ER
PHYSICAL LINKS

RPL DODAG

R
R
R
R

R
R


R
R
R

R

R

R
IP-BASED NETWORK LAYER SOLUTIONS
48
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
O. Iova, G. P. Picco, T. Istomin, and C. Kiraly, RPL, the Rou^ng Standard for the Internet of Things ... Or Is It?, Communica^on
Magazine: 54(12), 16-22, 2016

RPL Protocol: Rou<ng over 6LoWPAN


q  In case of Extended LoWPANs (i.e. presence of
mul^ple Edge Routers), RPL might create mul<ple
disjoint DODAGs, routed at different ER.

BACKBONE LINK
ER
ER
RPL DODAG


R
R
R
R
R
R

R
R

R
R
R

R
IP-BASED NETWORK LAYER SOLUTIONS
49
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
RPL Protocol: Rou<ng over 6LoWPAN
q  In order to create and maintain the DODAG, the RPL
protocol introduces the following control packets:
²  DIO (DODAG Informa^on Object) à used to enstablish the
upward path (from leafs to root)
²  DAO (Des^na^on Adver^sment Object) à used to enstablish the
downlink path (from root to leafs)
²  DIS (DODAG Informa^on Solicita^on) à used by an internal node
in order to solicitate the transmission of DIO messages
²  DAO-ACK (Des^na^on Adver^sement Object Acknowledgement)
IP-BASED NETWORK LAYER SOLUTIONS
50
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
O. Iova, G. P. Picco, T. Istomin, and C. Kiraly, RPL, the Rou^ng Standard for the Internet of Things ... Or Is It?, Communica^on
Magazine: 54(12), 16-22, 2016

RPL Protocol: Rou<ng over 6LoWPAN


q  Two modes of opera^on: storing and non-storing
²  Storing à each node keeps a rou<ng entry for all the
des^na^ons reachable via its sub-DODAG.
²  Non-Storing à the root is the only network node maintaining
rou^ng informa^on; source rou^ng is used for downward rou^ng.
Storing Mode: Contains the info Non-storing Mode:
²  Node 4 forwards ER ER
about next-hops ²  Node 4 always
data toward Node 2 forwards data
²  Node 2 stores 1 2 3 1 2 3 toward the root
rou<ng info for all R R
its subgraph SOURCE 4 5 DESTINATION SOURCE 4 5 DESTINATION
(nodes 4 and 5) 4 4
IP-BASED NETWORK LAYER SOLUTIONS
51
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
RPL Protocol: Rou<ng over 6LoWPAN
q  Each node of the DODAG has its own rank value.
PROPERTIES
ER Rank 0
² Abstract numeric value, expression of a
rela^ve posi^on within a DODAG Version. Rank 1 Rank 1 Rank 4
² Rank of the nodes must monotonically
R
R
R
decrease towards the DODAG des^na^on.
Rank 2 R

R
² Rank is used to avoid and detect loops. Rank 6


R
HOW TO COMPUTE IT?
Rank 8
²  Rank is computed according to the Objec<ve
Func<on in use (see next slides)
IP-BASED NETWORK LAYER SOLUTIONS
52
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
RPL Protocol: Rou<ng over 6LoWPAN
q  Crea^on of the upward paths (assumed at start-up)
1.  The Edge router creates the DIO message,
containing its rank and DODAG id, and sends it in mul<cast. ER
DIO message
RECEIVING NODES
Rank: 2
2. Each node establishes the upward link toward the sender.
R
R
R

3. Each node computes its own rank value, based on the


R
R
root’s rank and on the Objec<ve Func<on.

R
4. Each node rebroadcasts the DIO message (following the
Trickle algorithm), by including its own computed rank.

IP-BASED NETWORK LAYER SOLUTIONS


53
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
RPL Protocol: Rou<ng over 6LoWPAN
q  Crea^on of the upward paths (assumed at start-up)
A node receiving mul^ple DIO messages (e.g the blue node)
2. Based on the used metric and constraints defined by the ER
Objec^ve Func^on, it chooses an appropriate parent:
Ø  Mul^ple parents can be established, but a preferred
Rank: 2 Rank: 3
parent is selected;

R
R
R
Ø  If the node has already its own rank, and the received
one is greater than the local rank, the DIO message is

R
R
discarded (loop avoidance)
3. As before, each node rebroadcasts the DIO message
R
(following the Trickle algorithm), by including its own The rou^ng procedure ends when
computed rank. reaching the leaf nodes.

IP-BASED NETWORK LAYER SOLUTIONS


54
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
RPL Protocol: Rou<ng over 6LoWPAN
q  Crea^on of the downward paths (from leaf to edge router)

NON-STORING MODE

1. Each node periodically generates a DAO message and sends ER


it to the des^na^on, by using the upward path established 6-4-1
through the DIO message.

1 2 3
2. All the intermediate parents extend the DAO message by
adding their IPv6 address in the Transit Informa<on Op<on. 4 5
6-4
6
DAO message

IP-BASED NETWORK LAYER SOLUTIONS


55
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
RPL Protocol: Rou<ng over 6LoWPAN
q  Crea^on of the downward paths (from leaf to edge router)

STORING MODE

1. Each node periodically generates a DAO message and sends ER


it to all parents node (differently to the previous case, the
message is not forwarded toward the root).

1 2 3
2. Each parent maintains addi^onal rou^ng tables for all the
nodes of its sub-DODAG. 4 5

6
DAO message

IP-BASED NETWORK LAYER SOLUTIONS


56
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
Trickle algorithm – IETF specifica^ons: h8ps://tools.ie{.org/html/rfc6206

RPL Protocol: Rou<ng over 6LoWPAN


q  Trickle algorithm à data dissemina^on scheme for lossy
shared medium (e.g. low-power and lossy networks).
²  It can be applied to a wide range of protocol design problems
(beside our topic, i.e. the DIO message dissemina^on in RPL)
²  Three configura<on parameters: the minimum interval size Imin,
the maximum interval size Imax, and a redundancy constant k.
²  In addi^on, Trickle maintains three variables:
ü  I à the current interval size.
ü  t à a ^me within the current interval.
ü  c à a counter.
IP-BASED NETWORK LAYER SOLUTIONS
57
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
Trickle algorithm – IETF specifica^ons: h8ps://tools.ie{.org/html/rfc6206

RPL Protocol: Rou<ng over 6LoWPAN


q  The Trickle execu^on follows five rules:
1.  At startup, it sets I to a value in the range of [Imin, Imax], c to 0 and t to a
random point in the interval, [I/2, I];
2.  Whenever Trickle hears a transmission that is "consistent", it increments
the counter c;
3.  At ^me t, Trickle transmits if and only if the counter c is less than the
redundancy constant k.
4.  When the interval I expires, Trickle doubles the interval length (I).
5.  If Trickle hears a transmission that is "inconsistent" and I is greater than
Imin, sets I to Imin and t to a random point in the interval [I/2, I] (step 1).
The meaning of consistent and inconsistent depends on the specific use-case!
IP-BASED NETWORK LAYER SOLUTIONS
58
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
Trickle algorithm – IETF specifica^ons: h8ps://tools.ie{.org/html/rfc6206

RPL Protocol: Rou<ng over 6LoWPAN


q  The Trickle execu^on follows five rules:
1.  At startup, it sets I to a value in the range of [Imin, Imax], c to 0 and t to a
random point in the interval, [I/2, I];
2.  Whenever Trickle hears a transmission that is "consistent", it increments
the counter c;
3.  At ^me t, Trickle transmits if and only if the counter c is less than the
redundancy constant k.
4.  When the interval I expires, Trickle doubles the interval length (I).
5.  If Trickle hears a transmission that is "inconsistent" and I is greater than
Imin, sets I to Imin and t to a random point in the interval [I/2, I] (step 1).
EXAMPLE: CONSISTENCY of TOPOLOGY in RPL-DIO messages …
IP-BASED NETWORK LAYER SOLUTIONS
59
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
RPL Protocol: Rou<ng over 6LoWPAN
q  The Objec<ve Func<on (OF) defines the specific metrics/
constraints to use for finding minimum cost paths.
² How to compute the rank;
² How to select the parents (and the preferred parent);
² How to compute the path cost.
Ø  EXAMPLE1. Determine the shortest route (METRIC) by avoiding low-
energy nodes (CONSTRAINT).
Ø  EXAMPLE2. Determine the lowest end-to-end delay (METRIC) by
avoiding low-quality links (CONSTRAINT).
IP-BASED NETWORK LAYER SOLUTIONS
60
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY
Minimum Rank with Hysteresis Objec^ve Func^on– IETF specifica^ons: h8ps://tools.ie{.org/html/rfc6719

RPL Protocol: Rou<ng over 6LoWPAN


q  Two objec^ve func^ons have been defined so far:
² OF0: Objec^ve Func^on Zero à
use hop count as default rou^ng metric.

² OF1: Minimum Rank with Hysteresis Objec^ve Func^on à


Select routes which minimize an addi^ve metric.
Default Metric: Expected Transmission Number (ETX)

IP-BASED NETWORK LAYER SOLUTIONS


61
L. BONONI, M. Di FELICE, DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, UNIVERSITY OF BOLOGNA, ITALY

You might also like