Module 1: Wireless Sensor Networks

Similar documents
Module 1: Wireless Sensor Networks

Outline. Introduction. The Internet Architecture and Protocols Link Layer Technologies Introduction to 6LoWPAN The 6LoWPAN Format Bootstrapping

Networked Embedded Systems: 6LoWPAN

Networked Embedded Systems: 6LoWPAN

Getting Started with IPv6 in Low-Power Wireless Personal Area Networks (6LoWPAN)

IPv6 Stack. 6LoWPAN makes this possible. IPv6 over Low-Power wireless Area Networks (IEEE )

Politecnico di Milano Advanced Network Technologies Laboratory. 6LowPAN

Politecnico di Milano Advanced Network Technologies Laboratory. 6LowPAN

L o g o. IPv6 in IoT. Network Information Center Institute of Network Technology BUPT. Website: niclab.bupt.edu.cn

ETSI Plugtests Guide V1.0.0 ( ) 6LoWPAN Plugtests; Berlin, Germany; July 2013

Mobile Communications

6LoWPAN (IPv6 based Low Power WPAN)

Implementation and Evaluation of the Enhanced Header Compression (IPHC) for 6LoWPAN

IP: (Internet Protocol) IP - 1

Evaluation of 6LoWPAN Implementations

IPv6 Protocols and Networks Hadassah College Spring 2018 Wireless Dr. Martin Land

Outlook on IEEE ZigBee Implications IP Requirements IPv6 over Low Power WPAN (IEEE ) Conclusions. KRnet /21

Wireless Sensor Networks Module 3: Application Protocol - CoAP

IPv6. IPv4 & IPv6 Header Comparison. Types of IPv6 Addresses. IPv6 Address Scope. IPv6 Header. IPv4 Header. Link-Local

Configuring IPv6. Information About IPv6. Send document comments to CHAPTER

Configuring IPv6 for Gigabit Ethernet Interfaces

IoT Roadmap in the IETF. Ines Robles

Wireless Sensor Networks Module 3: Application Protocol CoAP

TinyOS meets IP -- finally

Workshop on Scientific Applications for the Internet of Things (IoT) March

TCP/IP Protocol Suite

Computer Networking: A Top Down Approach Featuring the. Computer Networks with Internet Technology, William

Optimized Neighbor Discovery for 6LoWPANs: Implementation and Performance Evaluation

Wireless Embedded InterNetworking Foundations of Ubiquitous Sensor Networks 6LoWPAN David E. Culler University of California, Berkeley June 2008

The Netwok Layer IPv4 and IPv6 Part 2

IPv6 Protocol Architecture

Lesson 4 RPL and 6LoWPAN Protocols. Chapter-4 L04: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

Introduction to IPv6 - II

IPv6 Protocol & Structure. npnog Dec, 2017 Chitwan, NEPAL

IPv6 Concepts. Improve router performance Simplify IP header Align to 64 bits Address hierarchy with more levels Simplify routing tables

Planning for Information Network

Linux-based 6LoWPAN border router

Integration of Wireless Sensor Network Services into other Home and Industrial networks

IPv6 Neighbor Discovery

OSI Data Link & Network Layer

Proposed Node and Network Models for M2M Internet

White Paper. 6LoWPAN Fundamentals. Introduction into the Internet of Things. Author Enrico Lehmann dresden elektronik ingenieurtechnik gmbh

IPv6 Associated Protocols. Athanassios Liakopoulos 6DEPLOY IPv6 Training, Skopje, June 2011

draft-ietf-6lowpan-nd-07 Authors: Zach Shelby (ed.) Jonathan Hui Pascal Thubert Samita Chakrabarti Erik Nordmark Carsten Bormann

LSCHC: Layered Static Context Header Compression for LPWANs

TSIN02 - Internetworking

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

Design Considerations for Low Power Internet Protocols. Hudson Ayers Paul Crews, Hubert Teo, Conor McAvity, Amit Levy, Philip Levis

TD#RNG#2# B.Stévant#

Configuring IPv6 basics

Design Considerations for Low Power Internet Protocols

The Netwok Layer IPv4 and IPv6 Part 2

TCP /IP Fundamentals Mr. Cantu

A study on Need of Adaptation Layer in 6LoWPAN Protocol Stack

CHAPTER 3. 6LoWPAN 3.1 INTRODUCTION

RF and network basics. Antonio Liñán Colina

Internet Protocol, Version 6

How to develop and validate a scalable mesh routing solution for IEEE sensor networks Altran Benelux

IPv6. (Internet Protocol version 6)

The Research of Long-Chain Wireless Sensor Network Based on 6LoWPAN

Intel Corp J. Hui D. Culler Arch Rock Corp September Transmission of IPv6 Packets over IEEE Networks

IPv6 Next generation IP

Rocky Mountain IPv6 Summit April 9, 2008

IPv6 over MS/TP Networks

ZigBee IP update IETF 87 Berlin. Robert Cragie

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6

Foreword xxiii Preface xxvii IPv6 Rationale and Features

CS-435 spring semester Network Technology & Programming Laboratory. Stefanos Papadakis & Manolis Spanakis

IPv6 over IEEE 구현시나리오

IPv6 Technical Challenges

Lithe: Lightweight Secure CoAP for the Internet of Things

Transitioning to IPv6

Table of Contents 1 IPv6 Configuration IPv6 Application Configuration 2-1

ISO 9001:2008. Pankaj Kumar Dir, TEC, DOT

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS

Introduction to IPv6

Table of Contents 1 IPv6 Configuration IPv6 Application Configuration 2-1

Linux-wpan: IEEE and 6LoWPAN in Linux

Operation Manual IPv6 H3C S3610&S5510 Series Ethernet Switches Table of Contents. Table of Contents

IPv6 : Internet Protocol Version 6

History. IPv6 : Internet Protocol Version 6. IPv4 Year-Wise Allocation (/8s)

Table of Contents 1 IPv6 Configuration IPv6 Application Configuration 2-1

Lecture Computer Networks

Extending IP to Low-Power, Wireless Personal Area Networks

Internet Control Message Protocol

An Industry view of IPv6 Advantages

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang

CSF645 Mobile Computing 行動計算. IPv6. (Internetworking With TCP/IP vol Part 31) 吳俊興國立高雄大學資訊工程學系

IPv6 Neighbor Discovery

IPv6 is Internet protocol version 6. Following are its distinctive features as compared to IPv4. Header format simplification Expanded routing and

Implementation of Gradient Routing in WSNs

IPv6 Neighbor Discovery

IPv4/v6 Considerations Ralph Droms Cisco Systems

Towards a Zero-Configuration Wireless Sensor Network Architecture for Smart Buildings

Setup. Grab a vncviewer like: Or

CSCI-1680 Network Layer:

Chapter 2 Advanced TCP/IP

Network protocol for Internet of Things based on 6LoWPAN

Guide to TCP/IP Fourth Edition. Chapter 6: Neighbor Discovery in IPv6

This tutorial will help you in understanding IPv4 and its associated terminologies along with appropriate references and examples.

Transcription:

Module 1: Wireless Sensor Networks Dr. Ing. KoojanaKuladinithi Kuladinithi, TZI, University of Bremen koo@comnets.uni bremen.de

Contents Module I Introduction to WSNs (Wireless Sensor Networks) IETF Standards for WSNs 6LOWPAN (IPv6 over Low power WPAN): IP Adaptation Layer ROLL (Routing Over Low power and Lossy networks): IP routing CORE/CoAP (Constrained RESTful Environments/Constrained Application Protocol): Application IPv6 Protocol 6LoWPAN Adaptation Layer Header compression Optimized neighbor discovery protocols Fragmentation 2

Sensor Node Introduction to WSN Limited in energy, computational power, storage capacity, transmission range & data rate Tl TelosB mote: TelosB MSP430 microcontroller with 10kB RAM 16-bit RISC with 48K Program Flash IEEE 802.15.4 compliant radio (< 250 kbps) 1MB external data flash Runs TinyOS 1.1.10 or higher Two AA batteries/usb 1.8 ma (active); 5.1uA (sleep) UC Berkeley: Smart Dust Temperature, humidity, pressure, light, orientation, vibration, gas, etc WSN: Wireless Sensor Networks A collection of embedded tiny devices (sensors) with networking capabilities 3

WSNs / Wireless Embedded Internet Using the Internet in very low power devices Consists of embedded,low power devices connectedtoto the Internet (sensors, machines,rfi RFIDs, s,etc) Also called as embedded fringe Image Source: http://6lowpan.net/the book/ 4

WSN: Architecture 5

A Single Node vs Wireless Sensor Network Extended range of sensing: Cover a wider area Extended functionality: Sensor nodes can not only perform sensing functionality, but also provide forwarding service Rd Redundancy: d Multiple nodes close to each other increase fault tolerance 6

WSN Applications Home and building automation The use of sensors and control to improve the operations and efficiency of a building Industrial automation Real time environmental monitoring and forecasting Logistic Tracking Use of active tags on people, p equipment and supplies. Tracking results are used in asset management Smart metering The use of electricity, gas, water can be reduced and better controlled through more intelligent metering (use of intelligent lighting control, HVAC heating, ventilation and air conditioning control) 7

Evolution of Wireless Sensor Networks Price Scalability Cabling Proprietary ZigBee 6lowpan radio + network Internet Any vendor Z-Wave, prop. ISM etc. ZigBee and WHART 6lowpan ISA100 Cables Vendor lock-in Complex middleware Open development and portability 1980s 2000 2006 2008 -> Image Source: http://6lowpan.net/the book/ / h Increased Productivity 8

Relationship of Standards Image Source: http://6lowpan.net/the book/ IETF: Internet Engineering Task Force CORE: Constrained RESTful Environments ROLL: Routing Over Low power Lossy networks 6LOWPAN: IPv6 over Lower power Wireless PAN IPSO: IP for Smart Object OGC: Open Geospatial Consortium ETSI: European Telecommunications Standards Institute ISA: Industrial Standardisation for Automation 9

Why IP based? Allows the use of existing iti network kinfrastructure t IP based devices can be connected easily to other IP networks IP based technologies have existed for decades (very well known, have been proven to work and scale) IP technology is specified in an open and free way Tools for managing, commissioning and diagnosing already exist Issues Bandwidth and frame size (e.g. IPv6 frame size 1280 bytes, IEEE 802.15.4 frame size 127 bytes) Web services (HTTP, SOAP & XML) Power and duty cycle assumption of IP is that a device is always connected Reliability e.g. TCP is not able to differentiate between packets dropped because of congestion or a packets lost on wireless links) 10

Introduction ti to IPv6 11

IPv4 vs IPv6 Addressing 128-bit IPv6 address = 64-bit prefix + 64-bit Interface ID (IID) Image source: Indeterminant (Wikipeida) 128-bit IPv6 address : each 16 bit values (four hex digits) separated by colons, one sequence of all-zero 16- bit values can be replaced by a double colon indicating a longer sequence of zeros 12

IPv6 Address Configuration 64-bit network Prefix 64-bit Suffix / Interface Identifier (IID) Stateless Address Auto Configuration EUI 64-bit IEEE 15.4 short addresses Stateful Address Configuration DHCPv6 13

IPv6 Address: 64 bit IID 64-bit IEEE EUI-64 bit (Extended Unique Identifier) 24-bit OUI (Organizationally Unique Identifier) 40-bit of extension identifier decided by the manufacturer 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 OUI L M OUI (Cont.) Extension identifier Example: MAC address: 00:1D:BA:06:37:64 converts to 64-bit EUI address IID: 00:1D:BA:FF:FE:06:37:64 - Based on MAC address Network Prefix: 2001:db8:1:2::/64 Full IPv6 Address : 2001:db8:1:2:021D:BAFF:FE06:3764 Appendix A RFC 4291: IP Version 6 Addressing Architecture 14

IPv6 Address: 64 bit IID, Cont. 64-bit IID based on 15.4 short address 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 PAN ID 0 PAN ID (cont) 0 0 F F F E 0 0 16 bit short address 15

IPv6 Addresses in Hexadecimal Notation Long form Abbreviated form Explanation 2001:DB8:0.0:8:800:200C.417A0:8:800:200C 2001:DB8::8:800:200C:417A A unicast address FF01:0:0:0:0:0:0:101 FF01::101 A multicast address 0:0:0:0:0:0:0:1 ::1 Loopback address FE80:0:0:0: FE80:: A Link Local address 16

IPv6 Neighbor Discovery RFC 4861 ND: How hosts and routers interact with each other on the same link IPv6 is the format ND is the brain One hop routing protocol defined in RFC4861 Finding Routers Router Solicitation / Router Advertisement Finding Neighbors Neighbor Solicitation / Neighbor Acknowledgement Detecting Duplicate Addresses using NS/NA Address resolution o using NS/NA Neighbor Unreachability Detection using NS/NA Image Source: http://6lowpan.net/the book/ ND: Neighbor Discovery NS: Neighbor Solicitation NA: Neighbor Advertisement DAD: Duplicate Address Detection 17

IPv6 Header 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 Version Traffic Class Flow Label Payload Length Next Header Hop Limit + + 6 bits: DSCP (Differentiated Services Control Point), group traffic to different classes + Source Address + 2 bits: Explicit Congestion Notification (ECN) RFC3168 + + + + The packet header in IPv6 is simpler than that used in IPv4. IPv6 routers do not perform fragmentation The IPv6 header is not protected by a checksum. IPv6 routers do not need to recompute a checksum when header fields (such as the hop limit change) The TTL field of IPv4 has been renamed to Hop Limit The extension header mechanism provides extensibility to support future services for security, mobility, and others, without t redesign of the basic protocol + Destination Address + + + 18

Introduction ti to 6LOWPAN 19

802.15.4 MAC Frame Num of bytes: 2 1 0/2 2/8 0/2 2/8 0/5/6/10/14 variable 2 FC DSN DSTPAN DST SRCPAN SRC Security MAC Payload FCS 127 bytes MAX 802.15.4 MAC frame with 64 bit addresses (without any security option) FC DSN DSTPAN DST SRC MAC Payload FCS 104 bytes 21 B 2 B 20

IP over 802.15.4 Header overhead Standard IPv6 header is 40 bytes [RFC 2460] Entire 802.15.4 MTU is 127 bytes Fragmentation IPv6 requires all links support 1280 byte packets [RFC 2460] A full IPv6 packet does not fit into 802.15.4 frame size Transport header Application payload 40 B + options IP header 1280 Bytes net payload MAC header 127 Bytes MAX? link payload FCS 21

What is 6LoWPAN? 6LoWPAN : IPv6 over Low power Wireless Personal Area Networks Defined by IETF standards (draft ietf 6lowpan hc) RFC 4944 RFC 6282 Header compression Stateless Context based Neighbor discovery draft ietf 6lowpan nd Minimal use of code and memory Direct end to end Internet integration IPv6 Image Source: http://6lowpan.net/the book/ 22

Protocol Stack Low power wireless technologies Image Source: http://6lowpan.net/the book/ 23

6LoWPAN Architecture LoWPANs are stub networks Nodes (Host/Router) Simple LoWPAN A collection of nodes which shares a common IPv6 address prefix Single Edge Router (handles compressions & ND, IPv4 interconnectivity) Extended LoWPAN Multiple Edge Routers with common backbone link Ad hoc LoWPAN Notconnected to the Internet Image Source: http://6lowpan.net/the book/ ND: Neighbor Discovery R: Routers, H: Host 24

WSNs: Addressing IPv6 addresses are typically formed using Network Prefix: Prefix of the LoWPAN IID: Link Layer address of the wireless interface (64bit EUI / 16 bit short address) Flat LL addressing for all the devices Support unique long addresses (EUI 64) Configurable short addresses (usually 8 16 bits in length) Also support broadcast (0xFFFF in IEEE 802.15.4), but do not support native multicast 25

Addressing : Example 6LoWPAN Assumption: LoWPAN uses IEEE 802.15.4 and IP routing Edge Router Configures IPv6 prefix to its 802.15.4 wireless interface (2001:300a:1::/48) Advertizes IPv6 prefix to nodes in the LoWPAN LoWPAN node IPv6 address with a 64 bit IID Receives generated IPv6 address with a 16 bit IID (HOST :: 1 > 2001:300a:1::1) 1 1) Routing Packets sent within LoWPAN do not require to haveipv6network prefix inline Packets destined outside LoWPAN > require to have IPv6 address inline Image Source: http://6lowpan.net/the book/ 26

6LoWPAN: IP Header Compression Network IP Packet V TC FL L NH HL 8 B Src IP Dest IP 16 B 16 B net payload Link Packet FC SN PAN net payload DST SRC HL FCS 3B 2 Bytes of 6LoWPAN adaptation headers ( dispatch + HC1) Eliminate all fields in the IPv6 header that can be derived from the 802.15.4 header Version (V) : always v6 and no need to be sent Traffic Class (TC) & Flow Label (FL) : zero Length (L) : derived from link frame length Next Header (NH) : UDP, TCP, or ICMP Source address (Src IP) : derived from link address Destination address (Dest IP) : derived from link address 27

Compressed IPv6 Header 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 v6 zeros Version Traffic Class Flow Label In 802.15.4 header Payload Length Next Header Hop Limit + + derive from 802.15.4 header + Source Address + + + derive from 802.15.4 header + + IPv6 address + Destination Address + Interface identifier generated from EUID64 or Pan ID & short address + + Hop Limit is the only incompressible IPv6 header field Uncompressed 28

LoWPAN Dispatch Header Dispatch : To understand what is coming 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 Typ Value type-specific header Dispatch 00 Not a LoWPAN headdr 01 LoWPAN IPv6 addressing header 10 LoWPAN Mesh header 11 LoWPAN Fragmentation Header How it is compressed: HC1, HC2 000001 IPv6 Uncompressed IPv6 Addresses 000010 - LOWPAN_HC1 - LOWPAN_HC1 compressed IPv6 ----- 010000 - LOWPAN_BC0 - LOWPAN_BC0 broadcast ------- 29

HC1 : Stateless Header Compression LOWPAN_HC1 compressed IPv6 Source Address Encoding Destination Address Encoding 00 Prefix sent in-line, IID sent in-line 01 Prefix sent in-line, IID derived from L2 10 Prefix = link local, IID sent in-line 11 Prefix = link local, IID derived from L2 01000010 SAE DAE SAE C NH 0 7 15 HC1 Traffic and Flow Label zero (compressed) Next Header Field 00 uncompressed, 01 UDP, 10 TCP, 11 ICMP Additional HC2 compression header follows C NH Zero or more uncompressed fields follow in order 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 Typ Value type-specific header Dispatch 30

HC2: Stateless Header 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 Source Port Destination Port Length Checksum UDP Payload... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ UDP Port numbers : 61616 6 6 6163163 UDP: HC2 8 bytes header is compressed to 3 bytes source port = P + 4 bits, where p = 61616 (0xF0B0) destination port = P + 4 bits Length = (Payload of IPv6 header length of any extension headers present between the IPv6 header and the UDP header) 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 S_Port D_Port Checksum 31

HC2 : Stateless Header Compression Source Port is compressed Destination Port is compressed Length is compressed 01000010 DAE C NH uncompressed fields follow in order SAE S D L 0 7 15 Dispatch (LowPAN IPv6 HC1) HC1 HC2 3 bytes of 6LoWPAN Adaptation Headers 32

6LoWPAN Headers Full IPv6 Packet over 802.15.4 with 64bit addressing 21 B 1 B 40 B 8 B 55 B 2 B FC DSN DSTPAN DST SRC Dispatch IPv6 UDP net Payload FCS Compressed IPv6 Packet over 802.15.4 with 64bit addressing 21 B 3 B 97 B 2 B FC DSN DST TPAN DST SRC Dis spatch HC1 HC2 IP Pv6 UDP net Pay yload FCS 1B 3B 7 B 33

Best case HC1/HC2 compressed IPv6 Packet Dispatch HC1 header HC2 header LOWPAN_HC1 SAE DAE C NH 1 S D L --------- Non Compre. data 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 0 1 0 0 0 0 1 0 1 1 1 1 1 0 1 1 1 1 1 --------- Hop Limit S_Port D_Port Checksum UDP Data. 34

Is Stateless Header Compression Enough? Stateless header compression for IPv6 packets (LOWPAN_HC1 & LOWPAN_HC2) > reduce relatively large IPv6 and UDP headers down to few bytes Most effective for link local unicast communication Limitations of HC1 & HC2 Link local communications are mainly used for local protocols (neigbor discovery, DHCPv6, etc) within a LoWPAN network. Application layer protocols use global IPv6 addresses HC1 should carry 64 bit prefix when using global addresses HC1 should carry 128 bits address when using multicast communication IPv6 next headers cannot be encoded efficiently 35

Context based Header Compression Enhancements to HC1 & HC2 Hop limit (either 1 or 64) Compression of IPv6nextheader fields (LOWPAN_NHC), NHC) e.g. IPv6 in IPv6 tunneling Compression of UDP checksum Compression Format for IPv6 Datagrams in Low Power and Lossy Networks(6LoWPAN) RFC6282 Enables compression of global addresses Adds an additional context, t when joining i the LoWPAN. Context tshould ldbe synchronized between compressor and decompressor 36

6LoWPAN IPHC Base Encoding 0 1 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 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ IPHC base header TF: Traffic Class, Flow Label: 00: ECN + DSCP + 4 bit Pad + Flow Label (4 bytes) 01: ECN + 2 bit Pad + Flow Label (3 bytes), DSCP is elided 10: ECN + DSCP (1 byte), Flow Label is elided 11: Traffic Class and Flow Label are elided. CID: Context Identifier Extension: 0: No additional 8 bit Context Identifier Extension is used. If context based compression is specified in either SAC or DAC, context 0 is used. 1: An additional 8 bit Context Identifier Extension field immediately follows the DAM field. NH: Next theader: SAC: Source Address Compression 0: Full 8 bits for Next Header are carried in line. 0: Source address compression uses stateless 1: The Next Header field is compressed and the next compression. header is encoded using LOWPAN_NHC 1: Source address compression uses stateful, context HLIM: Hop Limit: i based compression. 00: The Hop Limit field is carried in line. 01: The Hop Limit field is compressed and the hop limit is 1. 10: The Hop Limit field is compressed and the hop limit is 64. 11: The Hop Limit field is compressed and the hop limit is 255. 37

6LoWPAN IPHC Base Encoding : TF Field TF = 00 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 ECN DSCP - 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 ECN Flow Label +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ TF = 10 TF = 11 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ TF: Traffic Class, Flow Label: ECN DSCP 00: ECN + DSCP + 4 bit Pad + Flow Label (4 bytes) +-+-+-+-+-+-+-+-+ 01: ECN + 2 bit Pad + Flow Label (3 bytes), DSCP is elided No bits 10: ECN + DSCP (1 byte), Flow Label is elided 11: Traffic Class and Flow Label are elided. 38

SAC SAM SAC/SAM values in 6LoWPAN IPHC SAC: Source Address Compression, SAM: Source Address Mode: Inline bits 0 00 128 Full address (inline), no compression 0 01 64 First 64 bit is elided (FE80:0:0:0:xxxx:xxxx:xxxx:xxxx) 0 10 16 First 112 bit are elided (FE80:0:0:0:0000:00FF:FE00:XXXX) 0 11 0 128 bit are elided (LL address is derived from MAC header) 1 00 - Unspecified address 1 01 64 64 bit network prefix from the context + 64bit IID sent inline 1 10 16 112 bit from the context + 16 bit short address sent inline 1 11 0 128 bit address from the context DAC (Destination Address Compression) and DAM (Destination Address Mode) operations also similar: 39

Exchanage of Context Information 6LoWPAN Context Option (6CO) defined in draft ietf 6lowpan nd 17 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 Length Context Length Res C CID Reserved Valid Lifetime... Context Prefix... 6LoWPAN Context Identifier Option (CID) defined in draft ietf 6lowpan hc 15 IPHC base header 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 0 1 1 TF N HL C S SAM M D DAM SCI DCI..net. headers CID Extension 40

Introduction to Neighbor Discovery used in 6LOWPAN 41

IPv6 Neighbor Discovery Standard ND for IPv6 (RFC 4861 ND) assumes: A single link for an IPv6 subnet prefix Nodes are always on Heavy use of multicast traffic Image Source: http://6lowpan.net/the book/ ND: Neighbor Discovery NS: Neighbor Solicitation NA: Neighbor Advertisement DAD: Duplicate Address Detection 42

IPv6 vs 6LoWPAN Neighbor Discovery IPv6 ND (RFC 4861) Mulicast 6LoWPAN ND (draft ietf 6lowpan nd 18) Unicast ND: Neighbor Discovery NS: Neighbor Solicitation NA: Neighbor Advertisement DAD: Duplicate Address Detection SLLAO: Source Link Layer Address Option PIO: Prefix Information Option ARO: Address Registration Option 6CO: 6LoWPAN Context Option ABRO: Authorative Border Router Option 43

6LoWPAN Neighbor Discovery Elimination of multicast based address resolution for hosts. A host address registration feature using a new option in unicast Neighbor Solicitation and Neighbor Advertisement messages Host initiated interactions to allow for sleeping hosts. It removes the need for periodic or unsolicited Router Advertisements from routers to hosts A new Neighbor Discovery option to distribute 6LoWPAN header compression context to hosts (6CO 6LoWPAN Context Option) No Duplicate Address Detection (DAD) is performed if EUI 64 based IPv6 addresses areused (as these addresses areassumedassumed tobeglobally unique). DAD is optional if DHCPv6 is used to assign addresses Optional multihop duplicate address detection which uses two new ICMPv6 message types (DAR and DAC messages) 44

6LoWPAN Duplicate Address Detection DAR: Duplicate Address Registration DAC: Duplicate Address Confirmation 45

Fragmentation in 6LoWPAN 46

6LoWPAN Fragmentation IP packets are too large to fit in a 802.15.4 frame are fragmented into multipleframes Network Packet V TC FL L NH HL 8 B Multiple Link Packets Src IP Dest IP 16 B 16 B net payload 15.4 MAC Fn IP FCS 15.4 MAC F2 IP FCS 15.4 MAC F1 IP FCS 47

Fragmentation All fragments of an IP packet carry the same tag Assigned sequentially at source of fragmentation Each specifies tag, size, and position Do not have to arrive in order Time limit for entire set of fragments First fragment Header Type = 11000 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 Subsequent fragments - Header Type = 11100 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 +-+-+-+-+-+-+-+-+ 48

Reassembly of Fragmented Packets The recipient of link fragments uses the following to rebuild whole packet sender's 802.15.4 source address the destination's 802.15.4 address datagram_size datagram_tag 49

Summary: 6LoWPAN Features Addressing: supports for e.g. 64 bit and 16 bit 802.15.4 addressing Efficient header compression IPv6 base and extension headers, UDP header Useful with low power link layers such as IEEE 802.15.4, narrowband ISM and power line communications Optimized neighbour discovery protocol 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) IPv6-LoWPAN Router Stack Image Source: http://6lowpan.net/the book/ 50

6LoWPAN Operations to Start Functioning In order for a 6LoWPAN network to start functioning: 1. Link layer connectivity between nodes (commissioning) Compatible physical and link layer settings (modulation, channel, addressing, security, etc..) 2. Network layer address configuration, discovery of neighbors, registrations (bootstrapping) 3. Routing algorithm sets up paths (route initialization) 4. Continuous maintenance of 1 3 51

Hardware and Simulation Tools used 52

Hardware Platforms TelosB/TmoteSky: TI MSP430 + CC2420 Mica family: Atmel AVR + CC1000 imote2: Intel Xscale + CC2420 SunSpot: ARM920T + CC2420 Sensinode Zolertia Meshnetics... More on: http://www.snm.ethz.ch/main/homepage [Image Source: The Sensor Network Museum] 53

Radio Chips TI/ChipCon CC2420 Atmel RF230 Ember Jennic... 54

Operating Systems for WSNs Well, more than just an OS: Applications Drivers for Chips, p, Sensors Development Environment, Compiler, Bootstrap Loader, Debugger Simulation Tools TinyOS http://www.tinyos.net/ nesc (Network Embedded Systems C) Atmel, MSP430,... Contiki http://www.sics.se/contiki/ C C64, Atari, Atmel, MSP430,... VM images available 55

Simulation Tools TOSSIM Shared Library of the OS & application, C/Python simulation scripts http://docs.tinyos.net/index.php/tossimtinyos net/index php/tossim Event based simulation Cooja/MSPsim Java with Contiki applications http://sourceforge.net/apps/mediawiki/contiki/index.php?title=cooja More: http://www.comnets.uni bremen.de/~mab/cruise/simulation toolcomparison matrix.html (Outdated) 56

Acknowledgement Some content and figures on these slides are taken from http://6lowpan.net/wp content/uploads/2009/12/6lowpan bookslides full 20091206.pdf, under the CreativeCommons 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/ 57