Upload
others
View
14
Download
0
Embed Size (px)
Citation preview
6LoWPANIPv6 for Wireless Sensor Network
SASE 2012
Carlos TaffernaberryUTN - Mendoza - Argentina
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
last /8 threshold.
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
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
• 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)
The 6LoWPAN Format
Architecture
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
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)
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
IPv4 and IPv6 Format
Link-LocalSite-LocalGlobal
Unicast Address Scope
Local-link : fe80::/64Local-Site : fec0::/64Global : 2000::/3
IPv6 Addresses
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)
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/)
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
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
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
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
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.
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
6LoWPAN Headers
• Orthogonal header format for efficiency
• Stateless header compression
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
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|
+-+-+-+-+-+-+-+-+
Neighbor Discovery
ICMPv6
Ethernet
ARP
IPv4
ICMP IGMP
Broadcast
Multicast
Ethernet
IPv6
NDNeighbor Discovery
MLDMulticast Listener Discovery
Multicast
ICMPv6
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
Multicast Address:All nodes : ff02::1/128 All routers : ff02::2/128
IPv6 Neighbor Discovery
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
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
Addressing Example
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
Typical 6LoWPAN-ND Exchange
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)...
+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Whiteboard
• 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.
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
SIPIA NetWireless Sensor Network for
Agronomical Research
SIPIA NetPropietary STACK (gridTiCS)
SIPIA6 Net6loWPAN STACK
SPARE SLIDES
Mobility & Routing
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
Node Mobility
Network Mobility
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]
IPv4 Interconnectivity
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
IP Protocol Stack
Internet Architecture
Image source: (Wikipeida) GFDL