Reuniting Wireless Sensor Networks with the IP Architecture SECON 2008 David E. Culler University of California, Berkeley Arch Rock Corp.
Download ReportTranscript Reuniting Wireless Sensor Networks with the IP Architecture SECON 2008 David E. Culler University of California, Berkeley Arch Rock Corp.
Reuniting Wireless Sensor Networks with the IP Architecture SECON 2008 David E. Culler University of California, Berkeley Arch Rock Corp. The Internet … a decade ago 2 l The Internet … that we envisioned Low resolution Sensor, Test4, Increasing frequency 1 Acceleration (g) 0.5 0 -0.5 -1 0 2 4 6 8 10 12 14 16 18 Time (sec) 3 l Why “Real” Information is so Important Save Resources Improve Productivity Enable New Knowledge Increase Comfort Enhance Safety & Security Preventing Failures High-Confidence Transport Improve Food & H20 Protect Health 4 l Enabling Technology Network Microcontroller Flash Storage Radio Communication IEEE 802.15.4 Sensors 5 l Internet Concepts: Layering… duh Diverse Object and Data Models (HTML, XML, …, BacNet, …) 7: app 4: xport Application (Telnet, FTP, SMTP, SNMP, HTTP) Transport (UDP/IP, TCP/IP) 3: net Network (IP) 2: link Link Serial X3T9.5 Modem FDDI ISDN Sonet DSL GPRS 1: phy 802.3 802.5 802.3a Token Ring Ethernet 802.3i Ethernet 802.3y Ethernet 10b2 802.3ab Ethernet 10bT 802.3an Ethernet 100bT Ethernet 1000bT 1G bT 802.11 802.11a WiFi 802.11b WiFi 802.11g WiFi 802.11n WiFi WiFi 802.15.4 ??? 6 l Leading Internet Research Perspective - a decade ago • “Resource constraints may cause us to give up the layered architecture.” • “Sheer numbers of devices, and their unattended deployment, will preclude reliance on broadcast communication or the configuration currently needed to deploy and operate networked devices.” • “There are significant robustness and scalability advantages to designing applications using localized algorithms.” • “Unlike traditional networks, a sensor node may not need an identity (e.g. address).” • “It is reasonable to assume that sensor networks can be tailored to the application at hand.” 7 l Preview … 24038 ROM (including runtime) 3598 RAM * Production implementation on TI msp430/cc2420 • Footprint, power, packet size, & bandwidth ROM RAM CC2420 Driver 3149 272 802.15.4 Encryption 1194 101 Media Access Control 330 9 Media Management Control 1348 20 6LoWPAN + IPv6 2550 0 Checksums 134 0 SLAAC 216 32 DHCPv6 Client 212 3 DHCPv6 Proxy 104 2 ICMPv6 522 0 Unicast Forwarder 1158 451 Multicast Forwarder 352 4 Message Buffers 0 2048 Router 2050 106 UDP 450 6 TCP 1674 50 8 l Confluence on three fronts 9 l Networking in the Physical World Application Requirements Networking Challenges •Variable communication Unknown obstacles Variable density and loss • Embedding in physical space • Large numbers of nodes • Low total cost of ownership •Constrained resources Limited routing state Limited throughput Limited buffering •Low power wireless Multihop Low SNR Small MTU 10 l Mote/TinyOS – basis for networking WINS (UCLA/ROckwell) Intel rene’ LWIM-III (UCLA) SmartDust WeC zeevo BT Intel/UCB dot Rene BTNodeEyes Intel cf-mica trio Mica Telos XBOW mica XBOW rene2 Intel MOTE2 Intel iMOTE XBOW cc-dot Bosch cc-mica XBOW mica2 XBOW micaZ digital sun rain-mica Dust Inc blue cc-TI 04 05 48 kB rom 10 kB ram 802.15.4 06 07 CyberPhysical 03 NETS/ NOSS 8 kB rom ½ kB ram 02 CENS STC 01 NSF 00 NEST Expedition 99 SENSIT LWIM DARPA 97 98 11 l A Low-Power Standard Link 802.15.4 802.15.1 802.15.3 802.11 802.3 Class WPAN WPAN WPAN WLAN LAN Lifetime (days) 100-1000+ 1-7 Powered 0.1-5 Powered Net Size 65535 7 243 30 1024 BW (kbps) 20-250 720 11,000+ 11,000+ 100,000+ Range (m) 1-75+ 1-10+ 10 1-100 185 (wired) Goals Low Power, Large Scale, Low Cost Cable Replacement Cable Replacement Throughput Throughput • Low Transmit power, Low SNR, modest BW, Little Frames 12 l Link 1999 2000 2001 2002 2003 2004 2005 X-MAC RMST SP S4 CTP BVR Deluge Drip Volcano Redwoods North Sea Drain GDI Dip Flush Golden Gate Bridge FPS MultihopLQI Fusion MintRoute CODA PSFQ GAF Transport SCP-MAC PEDAMACS WiseMAC B-MAC T-MAC S-MAC Aloha PS WooMAC Network SPIN Broadcast Storm TinyOS 0.6 Decade of Sensor Network Research - sans Architecture Application 2006 2007 2008 13 l 1999 2002 2003 – Radio power: transmit ≈ receive ≈ just listening – All the energy is consumed by listening for a packet to receive 2004 S4 S4 CTP CTP Dip Dip Volcano Volcano Flush Flush GoldenGate GateBridge Bridge Golden Drip Drip Redwoods Redwoods NorthSea Sea North Drain Drain BVR BVR FPS FPS SCP--MAC SCP SCP-MAC PEDAMACS PEDAMACS X-MAC X-MAC SP SP WiseMAC WiseMAC B-MAC B-MAC MintRoute MintRoute RMST RMST MultihopLQI MultihopLQI Fusion Fusion CODA CODA GDI GDI GAF GAF PSFQ PSFQ 2000 2001 T-MAC T-MAC Link Link S-MAC S-MAC AlohaPS PS Aloha • Idle listening WooMAC WooMAC Network Network Deluge Deluge Transport Transport SPIN SPIN BroadcastStorm Storm Broadcast TinyOS0.6 0.6 TinyOS Three Key Developments Application Application 2005 2006 2007 2008 • E = P*Time => Turn radio on only when there is something to hear • Reliable routing on Low-Power & Lossy Links – Power, Range, Obstructions => multi-hop – Always at edge of SNR => loss happens => monitoring, retransmission, and local rerouting • Trickle – don’t flood (tx rate < 1/density, and < info change) – Connectivity is determined by physical points of interest, not network designer. May have huge number of neighbors, so … – never naively respond to a broadcast – re-broadcast very very politely 14 l The “Idle Listening” Problem • The power consumption of “short range” (i.e., low-power) wireless communications devices is roughly the same whether the radio is transmitting, receiving, or simply ON, “listening” for potential reception – includes IEEE 802.15.4, Zwave, Bluetooth, and the many variants – WiFi too! – Circuit power dominated by core, rather than large amplifiers • Radio must be ON (listening) in order receive anything. – Transmission is infrequent. Reception α Transmit x Density – Listening (potentially) happens all the time Total energy consumption dominated by idle listening 15 l Communication Power Consumption Sleep ~10 uA Transmit ~20 mA x 1-5 ms [20 - 100 uAs] I Time I Time Listen Receive ~20 mA ~20 mA x 2-6 ms 16 l 3 Basic Solution Techniques • Listen during scheduled time slots – – – – Arrange a schedule of communication opportunities Maintain coordinated clocks and schedule Listen during specific “slots” Many variants: • Aloha, Token-Ring, TDMA, Beacons, Bluetooth piconets, … • S-MAC, T-MAC, PEDAMACS, TSMP, FPS, … • Sampled Listening – – – – Listen for very short intervals to detect eminent transmissions On detection, listen actively to receive DARPA packet radio, LPL, BMAC, XMAC, … Maintain “always on” illusion, Robust • Listen after send (with powered infrastructure) – Generally, device is not listening and will not receive. – After it transmits to a receptive device, it listens for a time window – Many variants: 802.11 AMAT, Key fobs, remote modems, … • Many hybrid optimizations possible 17 l Communication Power – Passive Vigilance Sleep Transmit ~10 uA ~20 mA x 1-5 ms [20 - 100 uAs] I Time I Time Listen Receive ~20 mA ~20 mA x 2-6 ms • Listen just when there is something to hear … 18 l Scheduled Listen Transmit during Listen interval P Tschedule Time P Tperiod Time Listen intervals no transmit Synchronization skew • Pave Psleep + Plisten Tlisten / Tschedule + Pxmit Txmit / Txmit-interval + Pclock-sync-ave + Pdiscover-ave • Communication to maintain synch. sets lower bound. • Full power listen to discover and join schedule. (!!!!!!) • Listen in slot, even when there is nothing to hear 19 • Partition limited bandwidth, add to large latency l Sampled Listen P Time Tperiod P Time • • • • • • Relatively frequent, Very short “Listen Samples” Transmit (infrequent) increased to cover Tperiod Pave Psleep+ PlistenTsample / Tperiod + PxmitTperiod / Txmit-interval No time synchronization required. Rapid join and at low power. Scheduled sleep, wake times, time synch, etc. built on top for further reductions in power 20 l Self-Organized Routing - nutshell Receiver diversity through dynamic rerouting 2 2 2 1 1 2 2 < 1/density Retrans. rate Neighbor table exceeds RAM Dissem. rate < change 0 21 l Key IPv6 Contributions • Large simple address – Network ID + Interface ID – Plenty of addresses, easy to allocate and manage • Autoconfiguration and Management – ICMPv6 • Integrated bootstrap and discovery – Neighbors, routers, DHCP • Protocol options framework 128 bits – Plan for extensibility Prefix IID • Simplify for speed – MTU discovery with min ICMPv6 • 6-to-4 translation for compatibility IPv6 Base HbH Opt Routing Fragment Dst Opt 22 l 6LoWPAN – IPv6 over 802.15.4 UDP datagram or TCP stream segment …, modbus, BacNET/IP, … , HTML, XML, …, ZCL transport header application payload Network packet 40 B + options cls flow len hops NH src IP 16 B Link frame ctrl len src UID dst UID dst IP 16 B net payload 1280 Bytes MIN link payload chk 128 Bytes MAX • Large IP Address & Header => 16 bit short address / 64 bit EUID • Minimum Transfer Unit => Fragmentation • Short range & Embedded => Multiple Hops 23 l 6LoWPAN adaptation Diverse Object and Data Models (HTML, XML, …, BacNet, …) 7: app 4: xport Application (Telnet, FTP, SMTP, SNMP, HTTP) Transport (UDP/IP, TCP/IP) 3: net Network (IP) 2: link Link Serial X3T9.5 Modem FDDI ISDN Sonet DSL GPRS 1: phy 802.3 802.5 802.3a Token Ring Ethernet 802.3i Ethernet 802.3y Ethernet 10b2 802.3ab Ethernet 10bT 802.3an Ethernet 100bT Ethernet 1000bT 1G bT 6LoWPAN 802.11 802.11a WiFi 802.11b WiFi 802.11g WiFi 802.11n WiFi WiFi 802.15.4 LoWPAN 24 l 6LoWPAN – IP Header Optimization Network packet 40 B cls flow len hops NH src IP Link frame dst IP net payload 3B ctrl len src UID dst UID hops chk 6LoWPAN adaptation header • Eliminate all fields in the IPv6 header that can be derived from the 802.15.4 header in the common case – – – – – Source address Destination address Length Traffic Class & Flow Label Next header : derived from link address : derived from link address : derived from link frame length : zero : UDP, TCP, or ICMP • Additional IPv6 options follow as options 25 l IPv6 Header Compression in HC byte v6 zero In 802.15.4 header derive from 802.15.4 header derive from 802.15.4 header • http://www.visi.com/~mjb/Drawings/IP_Header_v6.pdf uncompressed 26 l UDP/ICMP Header Compression P + [0..15] P + [0..15] from 15.4 header 27 l 6LoWPAN Fragmentation • IP interoperability over many links => users not limited by frame size • IP datagrams that are too large to fit in a 802.15.4 frame are fragmented into multiple frames – Self describing for reassembly Network packet IP header net payload Multiple Link frames 15.4 header Fn 15.4 header F2 IP 15.4 header F1 IP IP chk chk chk 28 l Multi-Hop Communication PAN • Short-range radios & Obstructions => Multi-hop Communication is often required – i.e. Routing and Forwarding – That is what IP does! • “Mesh-under”: multi-hop communication at the link layer – Still needs routing to other links or other PANs • “Route-over”: IP routing within the PAN • 6LoWPAN supports both 29 l Mesh Hop Fragmented * including Checksum Ports Checksum Ports NHC Destination Address Checksum Ports NHC Hop Limit IPHC Dispatch SRC DST DSTPAN DSN FCF 7 bytes NHC Destination Address Source Address Hop Limit IPHC Dispatch Source Address Hop Limit IPHC Dispatch SRC DST DSTPAN DSN FCF Length 802.15.4 Fragment Header SRC DST DSTPAN DSN FCF Mesh Hop Length Single Hop* Length Pay-as-you-go Adaptation Compressed IPv6 Compressed UDP 11 bytes 15 bytes Link addresses of originator and final each of multiple IP hops 30 l IP-Based Multi-Hop • IP has always done “multi-hop” – Routers connect sub-networks to one another – The sub-networks may be the same or different physical links • Routers utilize routing tables to determine which node represents the “next hop” toward the destination • Routing protocols establish and maintain proper routing tables – Routers exchange messages with neighboring routers – Different routing protocols are used in different situations – RIP, OSPF, IGP, BGP, AODV, OLSR, … • IP routing over 15.4 links does not require additional header information at 6LoWPAN layer • Vast body of tools to support IP routing – Diagnosis, visibility, tracing, management – These need to be reinvented for meshing • IP is widely used in isolated networks too – Broad suite of security and management tools 31 l Meshing vs Routing • Conventional IP link is a full broadcast domain – Routing connects links (i.e, networks) • Many IP links have evolved from a broadcast domain to a link layer “mesh” with emulated broadcast – ethernet => switched ethernet – 802.11 => 802.11s • Utilize high bandwidth on powered links to maintain the illusion of a broadcast domain • 802.15.4 networks are limited in bandwidth and power so the emulation is quite visible. • Routing at two different layers may be in conflict • On-going IETF work in ROLL working group – Routing Over Low-Power and Lossy networks 32 l Adaptation Summary Efficient Transmission of IPv6 Datagrams IPv6 Stacked Header Format IPv6 Base Hop-by-Hop Routing Fragment Destination Payload IPv6 Options 6LowPAN Stacked Adaptation Header Format 15.4 Header Payload 15.4 Header IPv6 HC 15.4 Header IPv6 HC 15.4 Header Fragmentation Payload NH HC IPv6 HC Dispatch Payload NH HC Payload Header http://tools.ietf.org/html/rfc4944 33 l Energy Profile of a Transmission Datasheet Analysis • Power up oscillator & radio (CC2420) • Configure radio • Clear Channel Assessment, Encrypt and Load TX buffer • Transmit packet • Switch to rcv mode, listen, receive ACK 20mA 10mA 5 ms 10 ms 34 l Low Impact of 6LoWPAN on Lifetime – Comparison to *Raw* 802.15.4 Frame Energy Cost of Packet Communication vs. Data Size * uAs per Packet Energy Δ for fixed payload * Max Payload RCV 6LoWPAN Local <= Global RCV 6LoWPAN Local <= Local RCV Raw 802.15.4 TX 6LoWPAN Local => Global TX 6LoWPAN Local => Local TX Raw 802.15.4 0 20 * fully compressed header * additional 16-byte IPv6 address 40 60 80 100 120 Bytes of Payload 35 l Beyond Adaptation … building out the IP stack Net Link Adaptation Tran Media Management Control Remote Media Data Ack Link Stats Local Media Neighbor Table Sample Period Addr Period Phase Pending RSSI PRR Sample Phase Phy 36 l Link Layer – Optimizations • Scheduling – Remove preamble cost for a subset of neighbors – Reduce overhearing • Packet pending – Efficiently transmit packet trains • Use 802.15.4 data frame as acknowledgement – Addressing, secure, synchronization information Basic LPL Phase-Synchronized LPL Packet Train 37 l Embedded IPv6 in Concept Structured Decomposition Retain strict modularity Some key cross-layer visibility IP Link ⇒ Always On Retain illusion even when always off IP Link ⇒ “Reliable” Retain best-effort reliability over unreliable links IP Link ⇒ Broadcast Domain IPv6 can support a semi-broadcast link with few changes 38 l Autoconfiguration Configuring Large Numbers of Interfaces RFC 4861 – Neighbor Discovery RFC 4862 – Stateless Addr Autoconf RFC 3315 – DHCPv6 New Options Existing Options ICMPv6 Hdr Router Adv Prefix Info MHop Info Cur Hop Limit Prefix Length Network ID Managed Addr Config Autonomous Config Sequence Number Other Config Valid Lifetime Router Lifetime Preferred Lifetime Reachable Time Prefix Router Hops Flags 39 l Autoconfiguration Configuring Large Numbers of Interfaces Stateless DHCPv6 RFC 4861 + 4862 RFC 3315 Response L2e 00-17-3B-00-39-12-58-28 L2e 00-17-3B-00-39-12-58-28 L2s 0x0001 L2s 0x0001 L3 2001:abcd::1 L3 2001:abcd::1 Request L2e 00-17-3B-00-57-17-58-39 L2e 00-17-3B-00-57-17-58-39 L2s 0x0023 L2s L3 2001:abcd::23 L3 0x0023 2001:abcd::23 Request L2e 00-17-3B-00-79-49-66-23 L2e L2s 0x0092 L2s L3 2001:abcd::92 L3 00-17-3B-00-79-49-66-23 0x0092 2001:abcd::92 40 l Autoconfiguration Configuring Large Numbers of Interfaces RFC 4861 – Neighbor Discovery RFC 4862 – Stateless Addr Autoconf RFC 3315 – DHCPv6 New Options Existing Options ICMPv6 Hdr Router Adv Prefix Info MHop Info Cur Hop Limit Prefix Length Network ID Managed Addr Config Autonomous Config Sequence Number Other Config Valid Lifetime Router Lifetime Preferred Lifetime Reachable Time Prefix Router Hops Flags Trickle 41 l Autoconfiguration Configuring Large Numbers of Interfaces App DHCPv6 Tran 6LoWPAN Adaptation Net Autoconf ICMPv 6 Stateless Autoconf Media Management Control Remote Media Link Data Ack Link Stats Local Media Neighbor Table Sample Period Addr Period Phase Pending RSSI PRR Sample Phase 42 l Routing & Forwarding Delivering datagrams over multiple hops with High reliability and Low Energy usage Forwarder Net Multicast Buffer Router Routing Protocol Unicast Queue Send Manager Send Manager Forwarding TableNext Prefix Routing Table Prefix Next ICMPv 6 Default Media Management Control Remote Media Link Data Link Stats Local Media Neighbor Table Ack Sample Period Addr Period Phase Pending RSSI PRR Sample Phase 43 l Example: Routing with IPv6 options Discovering Links ICMPv6 Hdr Router Adv MHop Info Building a Connectivity Graph Default Routes Routing Table Low Routing Cost Prefix Next High Routing Cost Selecting the Next Hop Routing Table Prefix Next Forwarding TableNext Prefix • Default route • Hop-by-hop retry • Reroute on loss Default 44 l Complete Embedded IPv6 Stack App HTTP Tran Telnet SNMP UDP 6LoWPAN Adaptation Multicast Buffer Router Queue Send Manager Send Manager Forwarding Table Prefix Autoconf Routing Protocol Unicast ICMPv 6 Routing Table Prefix Next Next Stateless Autoconf Default Media Management Control Remote Media Link DHCPv6 TCP Forwarder Net … DNS Data Ack Link Stats Local Media Neighbor Table Addr Period Phase Pending RSSI PRR Sample Period Sample Phase 45 l Adding up the pieces - footprint 24038 ROM (including runtime) 3598 RAM * Production implementation on TI msp430/cc2420 ROM RAM CC2420 Driver 3149 272 802.15.4 Encryption 1194 101 Media Access Control 330 9 Media Management Control 1348 20 6LoWPAN + IPv6 2550 0 Checksums 134 0 SLAAC 216 32 DHCPv6 Client 212 3 DHCPv6 Proxy 104 2 ICMPv6 522 0 Unicast Forwarder 1158 451 Multicast Forwarder 352 4 Message Buffers 0 2048 Router 2050 106 UDP 450 6 TCP 1674 50 46 l Power pieces … Link Layer Primitive Profiles Channel Sample Overhear Receive Receive (26 bytes) (127 bytes) Transmit Transmit Preamble + Transmit Preamble + Transmit (26 bytes) (127 bytes) (64 ms) (128 ms) 47 l Where the Power goes Link Power Model 48 l … and reliability Application Power Model Data Rate Sensitivity Data Rate Sensitivity (Router) (Edge) Deployment Duty Cycle Deployment Reliability 49 l … Internet Concepts • Networks vs • Peripheral Interconnects – Ethernet – WiFi – Serial links – – – – – • connect hosts and devices and other networks together • Horizontally integrated USB, Firewire IDE / SCSI RS232,RS485 IRDA BlueTooth • connect one or more devices to a host computer • Vertically integrated ethernet – Physical link to application wifi LoWPAN 50 l Which are sensors like? Trending Monitoring Data Analytics Management Ethernet WiFi Operations GPRS RS232 RS485 Controllers Field Units hartcomm.org 51 l Wireless Embedded InterNetworking • IEEE 802.15.4 enables low-power wireless networks – able to support true networking, not just peripheral interconnect • 6LoWPAN (IETF RFC4944) enables IP (v6) – Rest of the IP architecture moves over fairly naturally – Simple option extensions, on-going optimization • Research brought three key implementation techniques – Sampled listening, Integrated retransmission and rerouting, Trickle • Specialize the network organization to the application, – not the architecture • More work for IETF now that there is a new link and a new collection of application domains 52 l Let Chaos Reign, Rein in the Chaos • E.g., TinyOS was invented as a framework for defining key abstractions for intelligent wireless devices embedded in the physical world. – Allow the right abstractions to emerge from experience – Done (essentially) – Hardened abstractions, platforms, community • Advance on three fronts makes the internet architecture viable for this class of devices – Structures the problem into more manageable pieces – Permits greater impact of high quality solutions • New set of questions within this framework – LP MAC really, OS API, Cross layer visibility – In-network processing as overlays – Interplay of WAN, LAN and PAN, … • The Shift: Synthesis => Analysis 53 l Thanks 54 l