6LoWPAN IPv6 for Wireless Sensor Network SASE 2012 Carlos Taffernaberry UTN - Mendoza - Argentina [email protected]This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA
References
• N. Kushalnagar, G. Montenegro, C. Schumacher “IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs):Overview, Assumptions, Problem Statement, and Goals”, RFC 4919, August 2007, IETF
• G. Montenegro,N. Kushalnagar,J. Hui, D. Culler “Transmission of IPv6 Packets over IEEE 802.15.4 Networks”, RFC 4944, September 2007, IETF
• Shelby & Bormann, “The Wireless Embedded Internet” ISBN: 978-0-470-74799-5, (c) 2009 John Wiley & Sons Ltd
David E. Culler & Jonathan Hui ”6LoWPAN Tutorial: IP on IEEE 802.15.4 Low-Power Wireless Networks”, Arch Rock Corporation
• “Compression Format for IPv6 Datagrams in 6LoWPAN Networks” draft-ietf-6lowpan-hc-13. RFC 6282.
• “Neighbor Discovery Optimization for Low-power and Lossy Networks” draft-ietf-6lowpan-nd-15
• “Design and Application Spaces for 6LoWPANs”, draft-ietf-6lowpan-usecases-09.
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA
Outline
• Introduction, Motivation
• Introduction to 6LoWPAN
• The 6LoWPAN Format
• Neighbor Discovery
• Routing
• Application Layer
• Implementing 6loWPAN
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA
Introduction
Internet of Things- A global network infrastructure, linking physical and virtual objects through the exploitation of data capture and communications capabilities.
- This infrastructure includes existing and evolving Internet and
network developments.
- It will offer specific object-identification, sensor and connection
capability as the basis for the development of independent
federated services and applications.
- These will be characterised by a high degree of autonomous
data capture, event transfer, network connectivity and
interoperability.Source CASAGRAS 2
Internet of Things
Internet of ThingsScope
Internet of ThingsInterconnection Challenge
Wires are too expensiveElectrical wall socket + installation = $50Cat5 socket + installation = $1501 Trillon nodes >> 1000 DGP Argentina
Wireless ?
Technology
RangeRange SpeedSpeed Power UsePower Use CostCost
Wifi 100 mts. 10-100 Mb/s
High $$$
Bluetooth 10-100 mts.
1-3 Mb/s Medium $$
802.15.4 10-100 mts.
0,25-Mb/s Low $
Evolution of Wireless Sensor Networks
ScalabilityPrice
Cabling
Cables
Proprietaryradio + network
20001980s 2006
Vendorlock-in
IncreasedProductivity
ZigBee
Complex middleware
6lowpanInternet
Open developmentand portability
Z-Wave, prop. ISM etc.
ZigBee andWHART
Any vendor6lowpanISA100
2008 ->
Internet (v4) Regional Registry ExhaustionAddresses Challenge
IANA Unallocated Address Pool Exhaustion: 03-Feb-2011
"Exhaustion" when the pool of available addresses in each RIR reaches the
There are only ~ 1025 grains of sand on the earthLet’s settle for a trillion objects on the net
Fix size HeaderNo fragmentation in the path
Extensibility by adding extension header
Unicast, Multicast y Anycast (NO Broadcast)
Stateless and stateful address autoconfiguration
Benefits of 6LoWPAN TechnologyIPv6 over Low-Power Wireless Personal Area Networks
• Low-power RF + IPv6 = The Wireless Embedded Internet
• 6LoWPAN makes this possible
• The benefits of 6LoWPAN include:– Open, long-lived, reliable standards– Easy learning-curve
– Transparent Internet integration– Network maintainability– Global scalability– End-to-end data flows– Use of existing Internet infrastructure
Introduction to 6LoWPAN
What is 6LoWPAN?
• IPv6 over Low-Power wireless Area Networks
• Defined by IETF standards– RFC 4919, 4944
– draft-ietf-6lowpan-hc and -nd
– draft-ietf-roll-rpl
• Stateless header compression
• Enables a standard socket API
• Minimal use of code and memory
• Direct end-to-end Internet integration– Multiple topology options (802.15.4, Bluetooth,etc)
Challenge to LoWPAN's
Hard to implement in embedded devices:-Power and duty-cycle: Battery-powered wireless devices need to keep low duty cycles.-Frame size: Current Internet protocols require links with sufficient frame length.-Multicast: Wireless embedded radio technologies, do not typically support multicast.-Reliability: Standard Internet protocols are not optimized for low-power wireless and lossy networks.-WebServices: Internet services today rely on webservices, mainly using the transmission control protocol (TCP).-Management: Management with SNMP or web services.
• 6LoWPAN has a broad range of applications– Facility, Building and Home Automation
– Personal Sports & Entertainment
– Healthcare and Wellbeing
– Asset Management
– Advanced Metering Infrastructures
– Environmental Monitoring
– Security and Safety
– Industrial Automation
– SIPIA
6LoWPAN Applications
Protocol Stack
6loWPAN Features
• Useful with low-power link layers such as IEEE 802.15.4, narrowband ISM and power-line comunications (Bluetooth working)
• Support for e.g. 64-bit and 16-bit 802.15.4 addressing
• Efficient header compression– IPv6 base and extension headers, UDP header
• Network autoconfiguration using neighbor discovery
• Unicast, multicast and broadcast support– Multicast is compressed and mapped to broadcast
• draft-ietf-6lowpan-hc Features:– New HC (IPv6 header) and NHC (Next-header) compression– Support for global address compression (with contexts)– Support for IPv6 option header compression– Support for compact multicast address compression
C = Class and Flow LabelSAE/DAE = Source/Destination Address EncodingNH = Next HeaderS/D = Source/Destination Port Compression (61616 + 16)L= whenever the length es compressedNever Compressed Hop Limit and UDP Checksum
• IPv6 requires underlying links to support Minimum Transmission Units (MTUs) of at least 1280 bytes
• IEEE 802.15.4 leaves approximately 80-100 bytes of payload!
• RFC4944 defines fragmentation and reassembly of IPv6
• The performance of large IPv6 packets fragmented over low-power wireless mesh networks is poor!– Lost fragments cause whole packet to be retransmitted
– Low-bandwidth and delay of the wireless channel– 6LoWPAN application protocols should avoid fragmentation
– Compression should be used on existing IP application protocols when used over 6LoWPAN if possible
• Fragment recovery is currently under IETF consideration
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Type | Length | Info Length |L|A|C|V| CID |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Valid Lifetime |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+. .. Prefix or Address Information .. .+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
LoWPAN Information Option
Simplification:
Removed a second lifetime
Removed a Reserved field
Added a CID field for context-based compression
Prefix Dissemination
• In normal IPv6 networks RAs are sent to a link based on the information (prefix etc.) configured for that router interface
• In ND for 6LoWPAN RAs are also used to automatically disseminate router information across multiple hops
• The whiteboard is used in the LoWPAN for:– Duplicate address detection for the LoWPAN (= prefix)– Dealing with mobility (Extended LoWPANs)
– Locating nodes
Routing
6LoWPAN RoutingMultihop Mesh Topology
• Link Layer Forwarding (Mesh Under) :
– Link Layer mesh (e.g. 802.15.5 )
– LoWPAN mesh (RFC but not forward algorithm)
• IP Layer Routing (Route Over):
• Routing in a LoWPAN– Single-interface routing
– Flat address space (exact-match)
– Stub network (no transit routing)
Types of Routing Protocols
• Algorithm classes– Distance-vector
Links are associated with cost, used to find the shortest route.Each router along the path store local next-hop information about its route table.
– Link-stateEach node aquires complete information about the network, typically by flooding. Each node calculated a shortest-path tree calculated to each destination.
• Types of Signaling– Proactive
Routing information aquired before it is needed.– Reactive
Routing information discovered dynamically when needed.• Route metrics are an important factor
Protocols for 6LoWPAN
• IP is agnostic to the routing protocol used– It forwards based on route table entries
• Thus 6LoWPAN is routing protocol agnostic
• Special consideration for routing over LoWPANs– Single interface routing, flat topology– Low-power and lossy wireless technologies
– Specific data flows for embedded applications
• MANET protocols useful in some ad-hoc cases– e.g. AODV, DYMO
• New IETF working group formed– Routing over low-power and lossy networks (ROLL)– Deloped specifically for embedded applications
IETF ROLL
• Routing Over Low power and Lossy networks (ROLL)– Working group at the IETF
• Standardizing a routing algorithm for embedded apps• Application specific requirements
– Home automation– Commercial building automation– Industrial automation– Urban environments
• Analyzed all existing protocols• Solution must work over IPv6 and 6LoWPAN• Protocol in-progress called RPL “Ripple”
– Proactive distance-vector approach– See draft-ietf-roll-rpl for detailed information
Application Formats and Protocols
Introduction
• The processes of applications communicate over IP using an Internet Socket approach
• 6LoWPAN also uses the Internet Socket paradigm
• Application protocols used with 6LoWPAN however have special design and performance requirements
Socket API
• The Socket API provides access to data communications for applications
• Well-known interface for handling data flow and buffer management via socket
• Supports also control messages to protocols
• Commands include:– socket, bind, send, read, close etc.
• Examples of Socket APIs– Berkeley sockets in *nix systems
– Mac OSX (Darwin)
– Contiki uIP (Pseudo socket approach)
End-to-end Paradigm
Application Formats and Protocols
Custom Protocols
• The most common solution today
• Application data typically binary encoded, application specific
• Application protocol uses a specific UDP port, application specific
• As 6LoWPAN is end-to-end IPv6 communications, not a problem
• Advantage:– Compact, efficient, security can be
integrated, end-to-end
• Disadvantage:– Custom server app needed, little re-use,
learning curve, interoperability
L2/DLL
IPv6 / 6lowpan
UDP
L1/PHY
Custom Protocol
Streaming and RTP
• The correct streaming solution
• For audio or continuous sensor streaming– Audio over 802.15.4 needs good codec
• Advantages:– RTP can be used over 6LoWPAN– Provides end-to-end solution
– No server modifications needed
– Jitter control
• Disadvantages: – Headers could be more efficient for simple
sensor data streaming
L2/DLL
IPv6 / 6lowpan
L1/PHY
Stream
RTP
UDP
XML/HTTP
• De-facto for inter-server communications
• Well-known XML schema important
• All Internet servers speak HTTP/XML• Useable for RPC, pub/sub and events
• SOAP or REST paradigm
• Advantages:– Well known XML schema
– Formal message sequences
– Internet-wide support
• Disadvantages:– Inefficient, complex
• Solution: Embedded web-services– See the IETF 6lowapp effort http://6lowapp.net
L2/DLL
IP
HTTP
L1/PHY
SOAP
XML Messages
TCP
Implementation
Chips Solutions
• Single-Chip (App + 6LowPAN + Transceiver)• Minimizing cost and size is critical.• All soft on the same micro increases complexity and development time.• Complexity of the embedded application is low.• Examples TI CC2530, ATMEGA 128RF and the Jennic JN5139.
• Two-Chip (App + 6LowPAN <UART/SPI> Transceiver)• Great application complexity and performance requirements.• Leaves the developer freedom in the choice of application microcontroller.• 6LoWPAN and application need to be integrated in the same
microcontroller and may require extensive engineering and testing.• Examples of radio transceivers are TI CC2520, Atmel AT86RF231.
• Network Processor (App <UART/SPI> 6LowPAN + Transceiver)• Projects in which a design or application software already exists.• Programming is often realized as an extended socket-like protocol.• Not be possible for devices with extreme cost limitations.• Example of network processor is TI CC1180.