7/31/2019 6lowpan Webinar Slides
1/25
6LoWPAN
David E. CullerUniversity of California, Berkeley
Jonathan HuiCisco Systems, Inc.
Zach ShelbySensinode
November 30th, 2010
7/31/2019 6lowpan Webinar Slides
2/25
2
6LoWPAN what it means for smart objects
Low-Power Wireless Embedded devices can now beconnected using familiar networking technology,
like ethernet (but even where wiring is not viable)
and like WiFi (but even where power is not plentiful)
All of these can interoperate in real applications
Interoperate with traditional computing infrastructure
Utilize modern security techniques
Application Requirements and Capacity Planning dictatehow the network is organized,
not artifacts of the underlying technology
7/31/2019 6lowpan Webinar Slides
3/25
3
Low Power Wireless Internet
IP/LoWPAN Router
IP/LoWPAN Sensor Router
IP Device
IP Network(powered)
LoWPAN -Extended IP Network
IP/LoWPAN Router
IP/LoWPAN Sensor Router
IP Device
IP Network(powered)
LoWPAN -Extended IP Network
7/31/2019 6lowpan Webinar Slides
4/25
4
Wireless links
802.15.4 802.15.1 802.15.3 802.11 802.3
Class WPAN WPAN WPAN WLAN LAN
Lifetime(days)
100-1000+ 1-7 Powered 0.1-5 Powered
Net Size 65535 7 243 30 1024
BW (kbps) 20-250 720 11,000+ 11,000+ 100,000+
Range (m) 1-75+ 1-10+ 10 1-100 185 (wired)
GoalsLow Power,Large Scale,
Low Cost
CableReplacement
CableReplacement
Throughput Throughput
7/31/2019 6lowpan Webinar Slides
5/25
7/31/2019 6lowpan Webinar Slides
6/25
6LoWPAN Adaptation Needs
6
Transport Header
(UDP, TCP) Application Payload (HTTP, Modbus, BACnet)
IPv6 Network Payload
Link Header Link Payload
Min MTU Requirement of 1280
40+ bytes
8-20+ bytes
802.15.4 MTU = 127 bytes
Minimum MTU >> 802.15.4 MTU Fragmentation
48+ byte UDP IPv6 Header Header Compression
Defines a Chained Header format via Dispatch Analogous to IPv6 Header stack
7/31/2019 6lowpan Webinar Slides
7/25
6LoWPAN Fragmentation
802.15.4-2006 has a link MTU of 127 bytes
IPv6 requires a min link MTU of 1280 bytes
6LoWPAN must provide fragmentation
802.15.4 IPv6 Datagram
802.15.4 IPv6 Datagram (Frag 1)Frag
802.15.4 IPv6 Datagram (Frag 2)Frag
802.15.4 IPv6 Datagram (Frag N)Frag
7/31/2019 6lowpan Webinar Slides
8/25
6LoWPAN Fragmentation
1 1 0 0 0 dgram_size dgram_tag
1 1 1 0 0 dgram_size dgram_tag
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
0 1 2 3
dgram_offset
2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
0 1 2 3
802.15.4 IPv6 Datagram (Frag 1)Frag
Size: size of datagram in bytes Included in all fragments to simplify buffer allocation
Tag: identifies all fragments of a datagram
Offset: location of fragment in 8-byte units Elided in first fragment
7/31/2019 6lowpan Webinar Slides
9/25
6LoWPAN Header Compression
Use little state and do no depend on flows
Common values for header fields => compact forms
Version is always 6 Traffic Class and Flow Label are zero
Payload Length always derived from L2 header
Source and Destination Addrs are link-local and derived from L2 addrs
Ver
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Traffic Class Flow Label
Payload Length Next Header Hop Limit
Source Address
Destination Address
0
4
8
12
16
24
28
32
3640
IPv6 Header
7/31/2019 6lowpan Webinar Slides
10/25
IPv6 Header Compression
0 1 1 TF NH HLIM CID SAC SAM M DAMDAC
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
TF (Traffic Class and Flow Label) 0: Carried Inline (ECN+DSCP+Flow), 1: ECN+Flow, 2: ECN+DSCP, 3: All zero
NH (Next Header compression)
0: Carried Inline, 1: Next Header is compressed
HLIM (Hop Limit = Inline, 1, 64, 255) 0: Carried Inline, 1: 1, 2: 64, 3: 255
CID (Context Identifier Extension) 0: No 1-byte CID identifier, 1: 1-byte identifier follows
SAC/DAC (Source/Destination Address Compression) 0: Stateless, 1: Context-based
SAM/DAM (Source/Destination Address Mode) 0: 16 bytes inline, 1: 8 bytes inline, 2: 2 bytes inline, 3: elided
M (Multicast Destination) 0: Destination is not multicast, 1: Destination is multicast
In-line IPv6 Header Bits
7/31/2019 6lowpan Webinar Slides
11/25
6LoWPAN Header Compression
Traffic Class and Flow Label
11
ECN DSCP rsv Flow Label
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
TF = 00
ECN Flow Label
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
TF = 01 rsv
TF = 10 ECN DSCP
0 1 2 3 4 5 6 7
TF = 11 [ECN=0, DSCP=0, Flow Label=0]
[DSCP = 0]
[Flow Label = 0]
IPHC
IPHC
IPHC
IPHC
Inline IPv6 Bits
Inline IPv6 Bits
Inline IPv6 Bits
Inline IPv6 Bits
7/31/2019 6lowpan Webinar Slides
12/25
6LoWPAN Header Compression
Next Header
12
IPHCNH = 0 Inline IPv6 Bits Next Header Inline IPv6 Bits Uncompressed Next Header
IPHCNH = 1 Inline IPv6 Bits Inline IPv6 Bits Uncompressed Next HeaderNHC
Hop Limit
HLIM = 00 IPHC Inline IPv6 Bits Hop Limit Inline IPv6 Bits
HLIM = 01 IPHC Inline IPv6 Bits [Hop Limit = 1]
HLIM = 10 IPHC Inline IPv6 Bits [Hop Limit = 64]
HLIM = 11 IPHC Inline IPv6 Bits [Hop Limit = 255]
7/31/2019 6lowpan Webinar Slides
13/25
6LoWPAN Header Compression
Prefix
Addrs within 6LoWPAN typically contain common prefix
Nodes typically communicate with one or few central devices
Establish state (contexts) for such prefixes only state maintenance
Support for up to 16 contexts
Interface Identifier
Typically derived from L2 addr during autoconfiguration
Elide when Interface Identifier can be derived from L2 header
Prefix Interface IdentifierIPv6 Addr
128 bits
IPv6 Unicast Address
7/31/2019 6lowpan Webinar Slides
14/25
6LoWPAN Header Compression
IPv6 Unicast Address
14
Prefix Interface IdentifierIPv6 Addr
128 bits
Source/Destination Address Mode
SAM/DAM = 00 IPv6 Address Bits [0,127]
SAM/DAM = 01 IPv6 Address Bits [64,127]
SAM/DAM = 10Bits
[112,127]
SAM/DAM = 11
[64-bit prefix elided]
[112-bit prefix elided]
[Full 128-bit address elided, IID derived from link-layer]
7/31/2019 6lowpan Webinar Slides
15/25
6LoWPAN Header Compression
IPv6 Unicast Address
15
Prefix Interface IdentifierIPv6 Addr
128 bits
IPv6 Prefix
Stateless Mode (SAC/DAC=0)
Prefix is link-local (fe80::/10)
Context-based Mode (SAC/DAC=1)
Prefix taken from stored contexts (up to 16 contexts)
CID = 0, use ContextID = 0
CID = 1, include 4-bit ContextID for source & destination
7/31/2019 6lowpan Webinar Slides
16/25
6LoWPAN Header Compression
0xFFDAM = 00 Flags Group Identifier Bits [0,111]Scope
DAM = 01 Flags Group Identifier Bits [64,111]Scope
DAM = 10 Flags Group Identifier Bits [80,111]Scope
DAM = 11Group ID
Bits [104,112]
IPv6 Multicast Address
GroupIDs typically consume a small number of bits
(Solicited Node Mcast)
[Flags = 0, Scope = 2] (Link-local All-Nodes, All-
Routers)
(All DHCP Servers/Relays)
7/31/2019 6lowpan Webinar Slides
17/25
6LoWPAN Header Compression
Each compressed header indicates if the next header is alsocompressed
Following control byte(s) include next header identifier
Framework for defining arbitrary Next Header compression methods
802.15.4 Compressed IPv6 Hdr
Com
presse
dIP
v6
How
IPv6
iscomp
ressed
How
UDP
iscomp
ressed
Compressed UDP Hdr
7/31/2019 6lowpan Webinar Slides
18/25
UDP Header
6LoWPAN Header Compression
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
0
4
Source Port Destination Port
Length Checksum
Assume common values for header fields and define compact forms
Ports within 61616 to 61632 (4 bits)
Length derived from IPv6 Length
Checksum may be elided if other integrity checks are in use (e.g. Ipsec)
No definition for TCP or ICMPv6
1 1 1 1 0 C P
0 1 2 3 4 5 6 7
C (Checksum): 0: Inline, 1: Elide P (Ports):
0: Inline
1: Elide first 8 bits of Dest Port
2: Elide first 8 bits of Source Port
3: Elide first 12 bits of Source and Dest Ports
7/31/2019 6lowpan Webinar Slides
19/25
Example: Link-Local Unicast
Ver = 6 Traffic Class = 0 Flow Label = 0
Payload Length Next Header = UDP Hop Limit = 1
Source Prefix = fe80::/64
Len = 50 FCF DSN DSTPAN
DST = 00-17-3B-00-AA-BB-CC-DD
SRC = 00-17-3B-00-11-22-33-44
802.15.4
Source IID = 0217:3B00:AABB:CCDD
Dest Prefix = fe80::/64
Dest IID = 0217:3B00:1122:3344
Link Hdr
IPv6 Hdr
Derived from link hdr
Compact forms
Source Port Destination Port
Length Checksum
UDP Hdr
1 1 12 2
48-byte UDP/IPv6 Hdr 7 bytes
7/31/2019 6lowpan Webinar Slides
20/25
Example: Global Unicast
Ver = 6 Traffic Class = 0 Flow Label = 0
Payload Length Next Header = UDP Hop Limit = 23
Source Prefix = 2001:5a8:4:3721::/64
Len = 50 FCF DSN DSTPAN
DST = 00-17-3B-00-AA-BB-CC-DD
SRC = 00-17-3B-00-11-22-33-44
802.15.4
Source IID = ::1234
Dest Prefix = 2001:5a8:4:3721::/64
Dest IID = ::ABCD
Link Hdr
IPv6 Hdr
Derived from link hdr
Compact forms
Source Port Destination Port
Length Checksum
UDP Hdr
1 1 12 2
48-byte UDP/IPv6 Hdr 12 bytes
1 2 2
Derived from context
7/31/2019 6lowpan Webinar Slides
21/25
Example: Link-Local Multicast
Ver = 6 Traffic Class = 0 Flow Label = 0
Payload Length Next Header = UDP Hop Limit = 255
Source Prefix = fe80::/64
Len = 50 FCF DSN DSTPAN
DST = 00-17-3B-00-AA-BB-CC-DD
SRC = 00-17-3B-00-11-22-33-44
802.15.4
Source IID = 0217:3B00:AABB:CCDD
Dest Prefix = ff02::1
Link Hdr
IPv6 Hdr
Derived from link hdr
Compact forms
Source Port Destination Port
Length Checksum
UDP Hdr
1 1 12 2
48-byte UDP/IPv6 Hdr 8 bytes
1
7/31/2019 6lowpan Webinar Slides
22/25
Neighbor Discovery in 6LoWPAN
IPv6 Neighbor Discovery defines [RFC4861]
How hosts discover routers and prefixes How nodes resolve L2 addresses from IP addresses
How nodes perform unreachability detection
But ND was originally designed for LAN (e.g. Ethernet) connected interfaces
Always-on equipment such as PCs 6LoWPAN has unique requirements
Both single-hop mesh and multi-hop IP routed networks
Lossy and asymmetric radio environment
Frequent multicast traffic is expensive
Address resolution is not required Unique EUI-64 addresses
Hosts may be sleeping to preserve energy
7/31/2019 6lowpan Webinar Slides
23/25
6LoWPAN ND at a Glance
7/31/2019 6lowpan Webinar Slides
24/25
24
LoWPAN in an IP Stack
802.15.4, 802.11Ethernet Sonet
XML / RPC / REST / SOAP / OSGI
IP
IETF 6lowpan
Web Services
TCP / UDP
HTTP / FTP / SNMP Pro
xy/G
ateway
LoWPAN 802.15.4
1% of 802.11 power, easier toembed, as easy to use.
8-16 bit MCUs with KBs, notMBs.
Off 99% of the time
7/31/2019 6lowpan Webinar Slides
25/25
Conclusion
6LoWPAN turns IEEE 802.15.4 into the next IP-enabled link
Provides open-systems based interoperability among low-power devices over IEEE 802.15.4
Provides interoperability between low-power devices andexisting IP devices, using standard routing techniques
Paves the way for further standardization of communication
functions among low-power IEEE 802.15.4 devices Offers watershed leverage of a huge body of IP-based
operations, management and communication services andtools
Great ability to work within the resource constraints of low-
power, low-memory, low-bandwidth devices like WSN