75
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

4 - 2012 SASE 6lowpan

  • Upload
    others

  • View
    14

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 4 - 2012 SASE 6lowpan

6LoWPANIPv6 for Wireless Sensor Network

SASE 2012

Carlos TaffernaberryUTN - 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

Page 2: 4 - 2012 SASE 6lowpan

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

Page 3: 4 - 2012 SASE 6lowpan

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

Page 4: 4 - 2012 SASE 6lowpan

Introduction

Page 5: 4 - 2012 SASE 6lowpan

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

Page 6: 4 - 2012 SASE 6lowpan

Internet of Things

Page 7: 4 - 2012 SASE 6lowpan

Internet of ThingsScope

Page 8: 4 - 2012 SASE 6lowpan

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 $

Page 9: 4 - 2012 SASE 6lowpan

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

Page 10: 4 - 2012 SASE 6lowpan

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

last /8 threshold.

Page 11: 4 - 2012 SASE 6lowpan

IP next generationIPv6

Features:Address space: 128 bits (2128)

3.4×1038 = 340282366920938463463374607431768211456 addr.

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

Page 12: 4 - 2012 SASE 6lowpan

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

Page 13: 4 - 2012 SASE 6lowpan

Introduction to 6LoWPAN

Page 14: 4 - 2012 SASE 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)

Page 15: 4 - 2012 SASE 6lowpan

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.

Page 16: 4 - 2012 SASE 6lowpan

• 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

Page 17: 4 - 2012 SASE 6lowpan

Protocol Stack

Page 18: 4 - 2012 SASE 6lowpan

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

• Fragmentation– 1280 byte IPv6 MTU -> 127 byte 802.15.4 frames

• Support for IP routing (e.g. IETF RPL)

• Support for use of link-layer mesh (e.g. 802.15.5)

Page 19: 4 - 2012 SASE 6lowpan

The 6LoWPAN Format

Page 20: 4 - 2012 SASE 6lowpan

Architecture

Page 21: 4 - 2012 SASE 6lowpan

Architecture

• LoWPANs are stub networks• Simple LoWPAN

– Single Edge Router• Extended LoWPAN

– Multiple Edge Routers with common backbone link• Ad-hoc LoWPAN

– No route outside the LoWPAN• Internet Integration issues

– Maximum transmission unit– Application protocols– IPv4 interconnectivity (transition)– Firewalls and NATs– Security

IPv6-LoWPAN Router Edge Stack

Page 22: 4 - 2012 SASE 6lowpan

The 6LoWPAN Format

• 6LoWPAN is an adaptation header format– Enables the use of IPv6 over low-power wireless links – IPv6 header compression

– UDP header compression

• Format initially defined in RFC4944

• Updated by draft-ietf-6lowpan-hc (work in progress)

Page 23: 4 - 2012 SASE 6lowpan

The 6LoWPAN Format

• 6LoWPAN makes use of IPv6 address compression• RFC4944 Features:

– Basic LoWPAN header format– HC1 (IPv6 header) and HC2 (UDP header) compression formats– Stateless compression mechanism– Fragmentation & reassembly– Mesh header feature (depreciation planned)– Multicast mapping to 16-bit address space

• 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

Page 24: 4 - 2012 SASE 6lowpan

IPv4 and IPv6 Format

Page 25: 4 - 2012 SASE 6lowpan

Link-LocalSite-LocalGlobal

Unicast Address Scope

Local-link : fe80::/64Local-Site : fec0::/64Global : 2000::/3

IPv6 Addresses

Page 26: 4 - 2012 SASE 6lowpan

IPv6 Addressing• Stateless Address Autoconfiguration (SAA)

• Prefix (64 bits) + Subfix (64bits)

• Prefix: (Scope of an address)• Local link (prefix fe80::)• Global Link (prefix: Router Advertisement – Router Solicitation)

• Subfix:• EUI64 64-bit (Global Identifier - IEEE)

• examplewlan0 Link encap:Ethernet HWaddr 00:25:d3:67:79:ad

inet6 addr: 2001:1291:200:829e:225:d3ff:fe67:79ad/64 Scope:Globalinet6 addr: fe80::225:d3ff:fe67:79ad/64 Scope:LinkUP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1RX packets:10732 errors:0 dropped:0 overruns:0 frame:0TX packets:9573 errors:0 dropped:0 overruns:0 carrier:0 RX bytes:7807052 (7.8 MB) TX bytes:1175527 (1.1 MB)

Page 27: 4 - 2012 SASE 6lowpan

DispatchFirst byte of the Payload

Bit Pattern Header Type Reference

00 xxxxxx NALP - Not a LoWPAN frame [RFC4944]

01 000000 Reserved as a replacement value for ESC [RFC6282]01 000001 IPv6 - uncompressed IPv6 Addresses [RFC4944]01 000010 LOWPAN_HC1 - compressed IPv6 [RFC4944]01 000011 to 01001111 reserved for future use01 010000 LOWPAN_BC0 - broadcast [RFC4944]01 010001 to 01011111 reserved for future use01 1xxxxx LOWPAN_IPHC [RFC6282]

10 xxxxxx MESH - Mesh header [RFC4944]

11 000xxx FRAG1 -- Fragmentation Header (first) [RFC4944]11 001000 to 11011111 reserved for future use11 100xxx FRAGN -- Fragmentation Header (subseq) [RFC4944]11 101000 to 11111111 reserved for future use

(http://www.iana.org/assignments/6lowpan-parameters/)

Page 28: 4 - 2012 SASE 6lowpan

IPv6/UDP HeadersWithout compression

0 1 2 3

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

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|1 0 0 0 0 0 0 1|Version| Traffic Class | Flow Label |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|Flow Label cont| Payload Length | Next Header |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Hop Limit | |

+-+-+-+-+-+-+-+-+ +

| |

+ +

| Source Address |

+ +

| |

+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| | |

+-+-+-+-+-+-+-+-+ +

| |

+ +

| Destination Address |

+ +

| |

+ +

| |

+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| | Source Port | Destination P.|

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Dest. P. cont| Length | Checksum |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Checksum cont | UDP Payload ...

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

IPv6

UDP

Payload

Page 29: 4 - 2012 SASE 6lowpan

IP Header Compression (HC1 and HC2)No gzip techniquesNo end to end technique – IP addr is needed in every routeStateless compression

0 1 2 30 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 0 0 0 0 1 0|SAE|DAE|C|NH |0 | Non-Compressed fields...+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

\__dispatch __/ \_ HC1 header_/

0 1 2 30 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 0 0 0 0 1 0|SAE|DAE|C|NH |1 |S|D|L|__________| N.-C. fields...+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

\__ dispatch__/ \_ HC1 header_/ \_ HC2 header_/

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

Page 30: 4 - 2012 SASE 6lowpan

LoWPAN UDP/IPv6 Headers

0 1 2 3

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

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Dispatch with LOWPAN_IPHC | LOWPAN_NHC | Src | Dst |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| UDP Checksum | UDP Payload ...

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

IPv6 UDP

Payload

6 Bytes!

LoWPAN

draft-ietf-6lowpan-hc

Page 31: 4 - 2012 SASE 6lowpan

IP Header Compression (IPHC)

Most of the time is used Global Routeable Ipv6 Addresses.

Base Header

+-------------------------------------+------------------------

| Dispatch + LOWPAN_IPHC (2-3 octets) | Compressed IPv6 Header

+-------------------------------------+------------------------

LOWPAN_IPHC Encoding

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5

+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

| 0 | 1 | 1 | TF |NH | HLIM |CID|SAC| SAM | M |DAC| DAM |

+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

TF = Traffic Class, Flow Label

NH = Next Header Flag

HLIM = Hop Limit

CID = Context Identifier Extension

SAC = Source Address Compression

SAM = Source Address Mode

M = Multicast Compression

DAC = Destination Address Compression

DAM = Destination Address Mode draft-ietf-6lowpan-hc

Page 32: 4 - 2012 SASE 6lowpan

S/SAM Inlline

0 00 128 inline (address fully inline, no compression)0 01 64 FE80:0:0:0:inline (link-local + 64-bit Interface ID)0 10 16 FE80:0:0:0:0:0:0:inline (link-local + 16-bit short address)0 11 0 FE80:0:0:0:link-layer (link-local + link-layer source address)1 00 – reserved1 01 64 context[0..63]:inline (context + 64-bit Interface ID)1 10 16 context[0..111]:inline (context + 16-bit short address)1 11 0 context[0..127] (context)

IP Header Compression (IPHC)Cont.

Page 33: 4 - 2012 SASE 6lowpan

Next-header Compression (NHC)

NHC Format

+----------------+---------------------------

| var-len NHC ID | compressed next header...

+----------------+---------------------------

UDP NHC Encoding

0 1 2 3 4 5 6 7

+---+---+---+---+---+---+---+---+

| 1 | 1 | 1 | 1 | 0 | C | P |

+---+---+---+---+---+---+---+---+

C = Checksum Compression

P = UDP Port Compression

draft-ietf-6lowpan-hc

Page 34: 4 - 2012 SASE 6lowpan

6LoWPAN Headers

• Orthogonal header format for efficiency

• Stateless header compression

Page 35: 4 - 2012 SASE 6lowpan

Fragmentation

• 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

Page 36: 4 - 2012 SASE 6lowpan

Fragmentation

Initial Fragment

0 1 2 3

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

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|1 1 0 0 0| datagram_size | datagram_tag |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Following Fragments

0 1 2 3

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

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|1 1 1 0 0| datagram_size | datagram_tag |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|datagram_offset|

+-+-+-+-+-+-+-+-+

Page 37: 4 - 2012 SASE 6lowpan

Neighbor Discovery

Page 38: 4 - 2012 SASE 6lowpan

ICMPv6

Ethernet

ARP

IPv4

ICMP IGMP

Broadcast

Multicast

Ethernet

IPv6

NDNeighbor Discovery

MLDMulticast Listener Discovery

Multicast

ICMPv6

Page 39: 4 - 2012 SASE 6lowpan

IPv6 Neighbor Discovery

• IPv6 is the format - ND is the brains– “One-hop routing protocol” defined in RFC4861

• Finding Neighbors– Neighbor Solicitation / Neighbor Advertisement

• Finding Routers– Router Solicitation / Router Advertisement

• Stateless Address Autoconfiguration using NS/NA

– Detecting Addresses Duplication (DAD) using NS/NA

• Neighbor Unreachability Detection (NUD) using NS/NA

• DHCPv6 may be used in conjunction with ND

• Requirements:

– Link-layer Multicast

– Transitive relation between Neighbor

Page 40: 4 - 2012 SASE 6lowpan

Multicast Address:All nodes : ff02::1/128 All routers : ff02::2/128

IPv6 Neighbor Discovery

Page 41: 4 - 2012 SASE 6lowpan

0 1 2 30 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

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| 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

Page 42: 4 - 2012 SASE 6lowpan

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

Page 43: 4 - 2012 SASE 6lowpan

Addressing Example

Page 44: 4 - 2012 SASE 6lowpan

Duplicated Address Detection in 6loWPAN

• The Router Edge mantains a table (whiteboard)

– Nodes must register in the whiteboard

New ICMP type: Node Registration

New ICMP type: Node Confirmation

• Node registration exchange enables– Host/router unreachability detection

– Address resolution (a priori)

– Duplicate address detection

Registrations are soft bindings– Periodically refreshed with a new NR message

Page 45: 4 - 2012 SASE 6lowpan

Typical 6LoWPAN-ND Exchange

Page 46: 4 - 2012 SASE 6lowpan

NR/NC Format

0 1 2 3

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

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Type (NR)/(NC)| Code | Checksum |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| TID | Status |P|_____________________________|

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Binding Lifetime | Advertising Interval |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| |

+ Owner Interface Identifier +

| |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Owner Nonce |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Registration option(s)...

+-+-+-+-+-+-+-+-+-+-+-+-+-+

Page 47: 4 - 2012 SASE 6lowpan

The Whiteboard

• The whiteboard is used in the LoWPAN for:– Duplicate address detection for the LoWPAN (= prefix)– Dealing with mobility (Extended LoWPANs)

– Locating nodes

Page 48: 4 - 2012 SASE 6lowpan

Routing

Page 49: 4 - 2012 SASE 6lowpan

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)

Page 50: 4 - 2012 SASE 6lowpan

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

Page 51: 4 - 2012 SASE 6lowpan

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

Page 52: 4 - 2012 SASE 6lowpan

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

Page 53: 4 - 2012 SASE 6lowpan

Application Formats and Protocols

Page 54: 4 - 2012 SASE 6lowpan

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

Page 55: 4 - 2012 SASE 6lowpan

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)

Page 56: 4 - 2012 SASE 6lowpan

End-to-end Paradigm

Page 57: 4 - 2012 SASE 6lowpan

Application Formats and Protocols

Page 58: 4 - 2012 SASE 6lowpan

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

Page 59: 4 - 2012 SASE 6lowpan

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

Page 60: 4 - 2012 SASE 6lowpan

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

Page 61: 4 - 2012 SASE 6lowpan

Implementation

Page 62: 4 - 2012 SASE 6lowpan

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.

Page 63: 4 - 2012 SASE 6lowpan

Protocols Stacks

• Contiki– Low-Power uIPv6/RPL Network

• Tiny OS– BLIP, the Berkeley Low-power IP stack

– IPv6 Ready

• Nano Stack (Sensinode)

– Nano Stack, Nano Router, Nano Service

– Nano Sensor

• Jennic 6LoWPAN (Jennic)

– JN5139 Wireless Microcontroller

– Jenie API, SNAP, JenNet

Page 64: 4 - 2012 SASE 6lowpan

SIPIA NetWireless Sensor Network for

Agronomical Research

SIPIA NetPropietary STACK (gridTiCS)

SIPIA6 Net6loWPAN STACK

Page 65: 4 - 2012 SASE 6lowpan

PREGUNTAS

Gracias por su asistencia

Carlos TaffernaberryUTN - Mendoza - Argentina

[email protected]

Page 66: 4 - 2012 SASE 6lowpan

SPARE SLIDES

Page 67: 4 - 2012 SASE 6lowpan

Mobility & Routing

Page 68: 4 - 2012 SASE 6lowpan

Types of Mobility

• Mobility involves two processes– Roaming - moving from one network to another– Handover - changing point of attachment (and data flows)

• Mobility can be categorized as– Micro-mobility - within a network domain– Macro-mobility - between network domains (IP address change)

• Consider also Node vs. Network mobility

• What causes mobility?– Physical movement

– Radio channel

– Network performance– Sleep schedules

– Node failure

Page 69: 4 - 2012 SASE 6lowpan

Node Mobility

Page 70: 4 - 2012 SASE 6lowpan

Network Mobility

Page 71: 4 - 2012 SASE 6lowpan

Dealing with Mobility

• Micro-mobility– Do nothing (restart)– Link-layer techniques (e.g. GPRS, WiFi)

– 6LoWPAN-ND extended LoWPANs

– Routing also plays a role

• Macro-mobility– Do nothing (restart)

– Application layer (SIP, UUID, DNS)– Mobile IPv6 [RFC3775]

– Proxy Home Agent

• Network mobility– Do nothing (restart all nodes)

– NEMO [RFC3963]

Page 72: 4 - 2012 SASE 6lowpan

IPv4 Interconnectivity

Page 73: 4 - 2012 SASE 6lowpan

IPv4 – IPv6 Transition

• Redes separadas • Protocolos no compatibles entre si .Disruptivo

– Working group at the IETF• Transition Mechanisms [RFC 4213]

• Dual Stack• Tunnel

– Manual– Automatic– 6to4– Tunnel Broker

• Traslation– Application Layer Gateway– NAT64/DNS64

Page 74: 4 - 2012 SASE 6lowpan

IP Protocol Stack

Page 75: 4 - 2012 SASE 6lowpan

Internet Architecture

Image source: (Wikipeida) GFDL