TinyOS Time to ROLL Routing over Low power and Lossy Networks - PowerPoint PPT Presentation

1 / 57
About This Presentation
Title:

TinyOS Time to ROLL Routing over Low power and Lossy Networks

Description:

Independent Applications at endpoints communicate pt-pt through routers. Well attended ... 'Sheer numbers of devices, and their unattended deployment, will preclude ... – PowerPoint PPT presentation

Number of Views:253
Avg rating:3.0/5.0
Slides: 58
Provided by: DavidE1
Category:
Tags: roll | tinyos | lossy | low | networks | over | power | routing | sheer | time

less

Transcript and Presenter's Notes

Title: TinyOS Time to ROLL Routing over Low power and Lossy Networks


1
TinyOS Time to ROLL(Routing over Low power and
Lossy Networks)
  • David E. Culler
  • 1st European TinyOS Technology Exchange
  • TTX VI
  • Feb 10, 2009

2
A decade ago
3
Traditional Systems
  • Well established layers of abstractions
  • Strict boundaries
  • Ample resources
  • Independent Applications at endpoints communicate
    pt-pt through routers
  • Well attended

Application
Application
User
System
Network Stack
Transport
Threads
Network
Address Space
Data Link
Files
Physical Layer
Drivers
Routers
4
by comparison, WSNs ...
  • Highly Constrained resources
  • processing, storage, bandwidth, power
  • Applications spread over many small nodes
  • self-organizing Collectives
  • highly integrated with changing environment and
    network
  • communication is fundamental
  • Concurrency intensive in bursts
  • streams of sensor data and network traffic
  • Robust
  • inaccessible, critical operation
  • Unclear where the boundaries belong
  • even HW/SW will move
  • gt Provide a framework for
  • Resource-constrained concurrency
  • Defining boundaries
  • Appln-specific processing and power management
  • allow abstractions to emerge

5
Internet Research Perspectivethen
  • 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.

6
And Now Complete IPv6 in TinyOS
Production implementation on TI msp430/cc2420
  • Footprint, power, packet size, bandwidth

7
and in Open Source
8
and Power and Reliability
Data Rate Sensitivity (Router)
Data Rate Sensitivity (Edge)
Deployment Duty Cycle
Deployment Reliability
9
Where Did We Go Wrong?
10
Internet Networks of Networks
vs
  • Networks
  • Ethernet
  • WiFi
  • Serial links
  • connect hosts and devices and other networks
    together
  • Horizontally integrated
  • Peripheral Interconnects
  • USB, Firewire
  • IDE / SCSI
  • RS232,RS485
  • IRDA
  • BlueTooth
  • connect one or more devices to a host computer
  • Vertically integrated
  • Physical link to application

11
Which are real sensors nets like?
Trending Monitoring
Data Analytics
Management
Ethernet
WiFi
RS232 RS485
GPRS
Controllers
Operations
Field Units
12
A Network Starts with a Router
13
Mote/TinyOS let chaos reign
WINS(UCLA/ROckwell)
Intel rene
SmartDust WeC
Rene
00
01
03
02
04
06
05
07
97
99
98
LWIM
Expedition
NEST
Cyber-Physical
SENSIT
NETS/ NOSS
CENS STC
DARPA
8 kB rom ½ kB ram
48 kB rom 10 kB ram 802.15.4
NSF
14
And rain it did
Application
Transport
Network
Link
15
A Low-Power Standard Link
  • Low Transmit power, Low SNR, modest BW, Little
    Frames
  • Reined in the Phy Chaos, allowed MAC chaos to
    Reign

16
Key Developments
  • Event Driven Execution closely tied to storage
    mgmt
  • reliable concurrency, small footprint, and
    low-power usage
  • Idle listening
  • Radio power transmit receive just listening
  • All the energy is consumed by listening for a
    packet to receive
  • E PTime
  • gt Turn radio on only when there is something to
    hear
  • Reliable routing on Low-Power Lossy Links
  • Power, Range, Obstructions gt multi-hop
  • Always at edge of SNR gt loss happens
  • gt monitoring, retransmission, and local
    rerouting
  • Trickle dont flood (tx rate lt 1/density, and
    lt 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

17
Meanwhile 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
  • Plan for extensibility
  • Simplify for speed
  • MTU discovery with min
  • 6-to-4 translation for compatibility

18
IPv6 over 802.15.4 Not an obvious fit
UDP datagram or TCP stream segment
, modbus, BacNET/IP, , HTML, XML, , ZCL
transport header
application payload
Network packet
cls
flow
len
hops
src IP
dst IP
net payload
NH
16 B
16 B
?
Link frame
link payload
src UID
len
ctrl
chk
dst UID
19
6LoWPAN adaptation layer
Diverse Object and Data Models (HTML, XML, ,
BacNet, )
7 app
Application (Telnet, FTP, SMTP, SNMP, HTTP)
Transport (UDP/IP, TCP/IP)
4 xport
Network (IP)
3 net
6LoWPAN
Link
2 link
Serial Modem
X3T9.5 FDDI
802.3 Ethernet
802.5 Token Ring
802.11 WiFi
802.15.4 LoWPAN
802.11a WiFi
802.3a Ethernet 10b2
802.11b WiFi
802.3i Ethernet 10bT
802.11g WiFi
ISDN
Sonet
802.3y Ethernet 100bT
802.11n WiFi
DSL
802.3ab Ethernet 1000bT
GPRS
802.3an Ethernet 1G bT
1 phy
20
IPv6 Header Compression
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

21
6LoWPAN IP Header Optimization
Network packet
40 B
net payload
cls
flow
len
hops
src IP
dst IP
NH
Link frame
3 B
src UID
len
hops
ctrl
chk
dst UID
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 derived from link address
  • Destination address derived from link address
  • Length derived from link frame length
  • Traffic Class Flow Label zero
  • Next header UDP, TCP, or ICMP
  • Additional IPv6 options follow as options

22
Energy Consumption Analysis


Payload ?
Energy ? for fixed payload
23
Multi-Hop Communication gt Routing
PAN
  • Short-range radios Obstructions gt 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 gt ROLL

24
Embedded IPv6 in Concept
IP Link ? Always On
IP Link ? Reliable
25
AutoconfigurationConfiguring Large Numbers of
Interfaces
New Options
Existing Options
MHop Info
26
AutoconfigurationConfiguring Large Numbers of
Interfaces
Stateless RFC 4861 4862
DHCPv6 RFC 3315
Response
Response
Request
2001abcd23
Request
2001abcd92
27
Routing Forwarding
Delivering datagrams over multiple hops with High
reliability and Low Energy usage
Net
Router
ICMPv6
Forwarder
Routing Protocol
Multicast
Unicast
Buffer
Queue
Forwarding Table
Send Manager
Routing Table
Send Manager
28
Cross-Fertilization of WSN and IETF ideas
Discovering Links
ICMPv6 Hdr
Router Adv
MHop Info
Building a Connectivity Graph
Low Routing Cost
High Routing Cost
Selecting the Next Hop
  • Default route
  • Hop-by-hop retry
  • Reroute on loss

29
Complete Embedded IPv6 Stack
App
DHCPv6
HTTP
Telnet
SNMP
DNS

Tran
Net
Router
ICMPv6
Autoconf
Routing Protocol
Routing Table
Stateless Autoconf
6LoWPAN Adaptation
Link
Media Management Control
Data
Ack
Remote Media
Link Stats
Local Media
30
Adding up the pieces
Production implementation on TI msp430/cc2420
31
So whats Next?
32
Rein in the Chaos by layers
33
Y-A-MAC?
  • Yet-Another-MAC layer?
  • If it is REALLY going to be a standard
  • Interoperability within the PAN requires
    compatible MACs.
  • 802.15.4 left a big hole
  • Beaconing doesnt work
  • No low power defined for FFD
  • Perhaps the research community should stop
    differentiating and step forward to make one
    MAC stick
  • Frame formats are not up for debate
  • Visibility _at_ Link / Net Interface

34
Routing - really
  • At layer 3
  • Not 2, not 7, 3!
  • Implemented with routing table, forwarder, and
    well-defined protocols
  • Packets, States, Actions
  • ROLL working group in IETF
  • Application requirements
  • Excellent Protocol Survey
  • Entering actual work phase

35
ROLL Internet Drafts
  • draft-ietf-roll-protocols-survey -052009-01-26  
  • draft-ietf-roll-terminology -00 2008-10-27  
  • draft-ietf-roll-building-routing-reqs -05
    2009-02-04  
  • draft-ietf-roll-home-routing-reqs -062008-11-19  
  • draft-ietf-roll-indus-routing-reqs
    -042009-01-22  
  • draft-ietf-roll-urban-routing-reqs -032009-01-08 

36
The Heart of ROLL
37
Transport
  • Crazy not to support UDP and TCP
  • Do we enter a TCP for LLNs renaissance?
  • Do we define a new transport?
  • What is the embedded sockets API?

38
Issues in Communication Abstraction
  • Names
  • What are they?
  • What do they mean? What is their scope?
  • How are they allocated?
  • How are they translated into useful properties
  • Address? Physical Resource?
  • Storage
  • Transmit
  • When can it be reused? How do you know? What do
    you do when it is full?
  • Receive
  • When is it allocated? Reclaimed? By whom? What
    happens when it overflows?
  • Asynchronous event
  • How do you know that something has arrived?

39
Answers Naming
  • TinyOS Active Messages
  • TOS_local_addr, 16 bits, only within a network,
    allocated at program download time
  • Scope limited to TOS_group, within PAN, Channel,
    and physical extent.
  • The standards that try to do it all with IEEE
    802.15.4 16 bit short address are not much better
  • IP Architecture
  • Link name IEEE 802.15.4 gt EUID64 SA16
  • EUID64 globally unique, SA16 assigned to be
    unique over the PAN
  • Net name IP address
  • Prefix Interface Id
  • Must be unique within routability extent
  • Several IP address Link Local, Global,
    Multicast,
  • Service name Port
  • Hostname Translated to IP by DNS

40
Answers Storage
  • TinyOS Active Messages
  • Sender app allocates send buffer, OS owns it till
    sendDone event
  • OS provides App with recv buffer, app must return
    it or a replacement
  • BSD Sockets
  • Sender app allocate buffer, copied to kernel on
    send
  • Receiver allocates buffer and passes pointer to
    kernel, kernel copies
  • Additional sets of buffer managed within the
    kernel
  • TinyOS Sockets ???

41
Example UDP Interface
interface Udp command error_t bind( uint16_t
port ) command uint16_t getMaxPayloadLength(
const sockaddr_in6_t to ) command error_t
sendto( const void buf, uint16_t len,
const sockaddr_in6_t to )
event void recvfrom( void buf, uint16_t len,
sockaddr_in6_t from, link_metadata_t
metadata )
  • Wiring to a UDP interface is enough for sendto
    no allocate
  • Standard Unix sockaddr_in6_t
  • Bind associates the component that uses the
    interface with the port
  • Starts receiving whatever datagrams come in on it
  • Sendto sends a datagram from a buf to an IP
    destination
  • Neighbor, intra-PAN, inter-network (wherever it
    needs to go!)
  • Linklocal address is 1-hop neighbor
  • Pan-wide routable prefix
  • Error when not in network or overrun transmit
    resources
  • Recvfrom gets a buffer with a datagram and
    metadata about it
  • Able to fill the 15.4 frame without knowing
    details of header compression

42
Example UDP echo service
configuration EchoUdpC implementation
components KernelC components EchoUdpP as
EchoP EchoP.Boot -gt KernelC.Boot EchoP.Udp
-gt KernelC.Udp0
module EchoUdpP uses interface Boot,
Udp implementation event void
Boot.booted() call Udp.bind( ECHO_PORT )
/ bind to port 7 / event void
Udp.recvfrom( void buf, uint16_t len,
sockaddr_in6_t from,
link_metadata_t linkmsg ) call
Udp.sendto( buf, len, from ) / echo msg back
/
43
And what about TCP
  • UDP is a datagram transport
  • Essentially the same as AM
  • Fits naturally in event-driven model
  • Can use NesC platform independent data structure
    to have unambiguous packet formats without hton /
    ntoh error prone bit twiddling.
  • But TCP is a stream protocol

44
TCP Interface
interface Tcp command error_t
bind(uint16_t port, uint8_t buf, uint16_t
bufsize) event bool accept(
sockaddr_in6_t to ) command error_t connect(
const sockaddr_in6_t to, uint8_t buf,
uint16_t bufsize ) event void connected()
command error_t send( const void buf, uint16_t
len ) event void acked() event uint16_t
recv( void buf, uint16_t len ) command
error_t close( bool force ) event void
closed()
  • Transitions of the TCP protocol reflected as
    events
  • Recv per segment
  • Here, appln allocates send buffer but stack
    manages it.
  • Send is not split-phase (!!!)

45
TCP echo server
module EchoTcpP uses interface Boot,
Tcp implementation uint8_t m_buf
BUF_SIZE / Transmit
buffer / event void Boot.booted()
call Tcp.bind( ECHO_PORT, m_buf, sizeof(m_buf)
) event bool Tcp.accept( sockaddr_in6_t
to ) return TRUE event void
Tcp.connected() event void Tcp.acked()
event uint16_t Tcp.recv( void buf,
uint16_t len ) return ( call Tcp.send(
buf, len ) SUCCESS ) len ? 0 event
void Tcp.closed() / setup socket for new
connection / call Tcp.bind( ECHO_PORT,
m_buf, sizeof(m_buf) )
46
Event-Driven Execution of Services
Service request
Fire
recv
47
Split-Phase Data Acquisition
Sample
Read
48
Examples - Tasks
serviceReq
Sample
notify
fired
readDone
fired
49
HTTP
event bool HttpTcp.accept( sockaddr_in6_t to )
serverState LISTENING return TRUE
event void HttpTcp.connected()
serverState CONNECTED init_pump()
event uint16_t HttpTcp.recv( void inbuf,
uint16_t len ) if (httppump(inbuf,len))
switch (http_method) case HTTP_GET
signal Http.GETservice (url, uindex) break
case HTTP_POST signal Http.POSTservice(url,
uindex) break default call
HttpTcp.close( FALSE ) return
len command error_t Http.serviceDone()
call HttpTcp.close( FALSE ) return
SUCCESS command error_t Http.send( const
void buf, uint16_t len ) return call
HttpTcp.send( buf, len ) event void
HttpTcp.acked() event void
HttpTcp.closed()call HttpTcp.bind(port, resp,
respLen)
50
Resource Blueprint at the Top
configuration WebSense implementation
components KernelC components WebC as WebC
/ Web request service /
components HttpC as HttpC / TCP
HTTP (port 80) service / components new
TimerMilliC() as HttpTimer / Protocol deadman
/ components Msp430Adc12C /
Hardware ADC abstraction / components
Msp430PortsC / Hardware IO
Ports / WebC.Http -gt
HttpC.Http / Protocol interface / WebC.Boot
-gt KernelC.Boot WebC.IPv6Addresses
-gt KernelC.IPv6Addresses WebC.Time
-gt KernelC.GlobalTime HttpC.HttpTcp -gt
KernelC.Tcp0 HttpC.IPv6Addresses -gt
KernelC.IPv6Addresses HttpC.Timer -gt
HttpTimer / Digital inputs / components
new DigitalInC("Door") as Din0 WebC.Door -gt
Din0.DigitalIn Din0.Pin -gt
Msp430PortsC.Port12 Din0.PinInt -gt
Msp430PortsC.Port1Interrupt2 / Analog
inputs / components TempIntC WebC.Temp -gt
TempIntC.TempInt TempIntC.ADC -gt
Msp430Adc12C.Msp430Adc12INCH_10 / Internal
temp / components new AnalogInC(REFVCC, "Pot")
as TrimPot WebC.Pot -gt TrimPot.Sensor
TrimPot.ADC -gt Msp430Adc12C.Msp430Adc12INCH_4

51
or if you prefer Zigbee Profiles
  • http//www.ietf.org/internet-drafts/draft-tolle-ca
    p-00.txt
  • A UDP/IP Adaptation of the ZigBee Application
    Protocol

52
what it means for sensors
  • Low-Power Wireless Embedded devices can finally
    be connected using familiar networking
    technology,
  • like ethernet (but even where wiring is not
    viable)
  • and like WiFi (but even where power is not
    plentiful)
  • all of these can interoperate in real
    applications
  • Interoperate with traditional computing
    infrastructure
  • Utilize modern security techniques
  • Application Requirements and Capacity Plan
    dictate how the network is organized,
  • not artifacts of the underlying technology
  • Gateways and Proxies may or may not be at the
    media boundary

53
Making sensor nets make sense
  • LoWPAN 802.15.4
  • 1 of 802.11 power, easier to embed, as easy to
    use.
  • 8-16 bit MCUs with KBs, not MBs.
  • Off 99 of the time

Web Services
XML / RPC / REST / SOAP / OSGI
HTTP / FTP / SNMP
TCP / UDP
ROLL
IP
802.15.4,
802.11
Ethernet
Sonet
IETF 6lowpan
54
  • Thanks

55
Technology Transformation - Bottom Line
Network
Microcontroller
Flash Storage
Radio
  • Sensors have become physical information
    servers
  • Treat them as information servers

56
Industrial Interconnects
  • BACnet
  • RS-232 RS-485 gt IEEE 802.3 via BACnet/IP
  • LONworks
  • Twisted Pair Power Line gt LonTalk/IP
  • Common Industrial Protocol (CIP)
  • CAN ControlNet gt EtherNet/IP
  • SCADA
  • Prop. RS-485 Leased Line Prop. Radios gt
    ModBUS gt Ethernet gt TCP/IP
  • FieldBus
  • Modbus, Profibus, Ind. Ethernet, Foundation HSE,
    H1, SP100.11a?

In 2000, ODVA and CI introduced another member of
the CIP family EtherNet/IP, where IP stands
for Industrial Protocol. In this network
adaptation, CIP runs over TCP/IP and therefore
can be deployed over any TCP/IP supported data
link and physical layers, the most popular of
which is IEEE 802.311, commonly known as
Ethernet. The universal principles of CIP easily
lend themselves to possible future
implementations on new physical/ data link
layers. The Common Industrial Protocol (CIP) and
the Family of CIP Networks (Pub 123 )
57
A Decade Ago
Write a Comment
User Comments (0)
About PowerShow.com