28
Communication and Networking in the IoT Alper Sinan Akyurek 1 System Energy Efficiency Lab seelab.ucsd.edu

Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Communication  and  Networking  in  the  IoT  

Alper  Sinan  Akyurek  

1  

System  Energy  Efficiency  Lab  

seelab.ucsd.edu  

Page 2: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Internet  of  Things  

l  Networking  l  link  (machines,  

especially  computers)  to  operate  interactively  

l  Communication  l  the  imparting  or  

exchanging  of  information  or  news  

2  

Internet  of  Things  

Page 3: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

OSI  Layers  

3  

Applica8on  

Presenta8on  

Session  

Transport  

Network  

Link  

Physical  

Applica8on  -­‐  Facebook  

Presenta8on  -­‐  HTML  

Session  -­‐  HTTP  

Transport  -­‐  TCP  

Network  -­‐IP  

Link  –  802.11  

Physical  –  802.11  

Page 4: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Communication  Stack  

Payload  

Headers  

TX RX

Next Layer’s Payload

Upper Layer

Lower Layer

Payload  

Headers  

Next Layer’s Payload

Page 5: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

The  connection  problem  in  IoT  

5  

Many  different  protocols  are  deployed  in  WSNs    They  cannot  understand  each  other    and  this  is  NOT  a  software  related  issue!      

Common solution: gateways connecting WSNs to internet

Page 6: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Current  internet  is  not  enough  

6  

Sensinode 2013 – Zach Shelby

Page 7: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Application  Layer  

l  Commonly  designed  with  Presentation  and  Session  

l  Common  data  representation  and  data  retrieval  

l  Lighting  automation,  home  automation,  distributed  control,  Skype,  Facebook,  Hangouts  

l  Mostly  unaware  of  underlying  infrastructure  7  

Page 8: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Application  Layer  in  IoT  l  WSNs  with  embedded  devices  are  

memory,  CPU,  energy  constrained  

l  CoAP:  Constrained  Application  Protocol  l  Easily  convertible  to  HTTP  l  Supports  multicast  l  Very  low  overhead  (4-­‐byte  header  +  

TLVs)  l  Data  needs  to  be  polled  (Put/Get)  

8  

Coap.technology RFC 7252

Page 9: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Application  Layer  in  IoT  l  MQTT  

l  Publisher  –  Subscriber  model  l  Light  weight,  minimizes  code  on  remote  end  l  Data  is  published  once  available  l  Good  for  M2M  Networks,  distributed  control  apps  

9  

Mqtt.org

Page 10: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Open  Problems  

l  Unification/Standardization:  l  Unified  data  representation  l  Unified  and  seamless  data  translation  

l  Very  small  code  space  and  memory  requirements  l  Where  to  store/cache  data  

10  

Page 11: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Transport  Layer  l  Segmentation  and  reassembly  l  End-­‐to-­‐end  communication  reliability  l  Congestion  control  l  Reordering  l  Security  is  added  through  Transport  Layer  Security    

11  

Seg.  &  Reass.   End2End  Reliability   Cong.  Control   Reordering  

TCP   YES   YES   YES   YES  

UDP   NO   NO   NO   NO  

DCCP   NO   NO   YES   NO  

SCTP   NO   YES   YES   YES  (opt)  

Page 12: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Open  Problems  l  TCP  is  $$$$$:  

l  High  memory  usage  

l  End  to  end  communication  resource  usage  

l  High  loss  links  

l  UDP  is:  

l  Not  reliable  

l  Assumes  ordered  delivery  

12  

Page 13: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Network  Layer  l  Management  of  multiple  nodes  l  Addressing  &  Routing  &  Security  (IPSec)  l  Internet  Protocol  (IP)  is  the  dominant  solution  l  There  are  also  other  protocols  within  “suite”  

solutions  

13  

RFC 6550

Page 14: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Network  Layer  in  IoT  l  Routing  Protocol  for  Low-­‐Power  and  Lossy  

Networks  (RPL):  l  Dominant  routing  protocol  for  IPv6  on  WSNs  l  Creates  directed  trees  l  Flexible  architecture  for  energy,  delay,  link  quality  based  

routing  selections  

l  IP  is  very  inefficient  by  itself  l  6LowPAN  is  used  for  improvement  (cross-­‐layer  

compressing)  

14  

Page 15: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

RPL  l  Creates  destination  oriented  directed  acyclic  graphs  l  Optimized  for  upward  (sink  destined)  traffic  l  Supports  mobility  (treated  as  lossy  link)  l  Supports  multiple  DODAGs  (sinks)  l  Supports  different  routing  modes  (non/storing  

mode)  

15  

Page 16: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

RPL  +  Memory  Problem  =  Nonstoring  Mode  l  A  routing  table  entity  contains  Node  ID  +  Next  Hop  =  

32  bytes  per  destination  l  RAM  is  a  luxury  in  small  devices  l  Nonstoring  mode  solves  the  memory  problem  by  

storing  the  routing  table  only  at  the  gateway  

16  

G  

1  

2  

3  

Go over 1-2-3 Go over 2-3 Go over 3

Page 17: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Link  Layer  l  Reliable  communication  within  a  single  transmission  range  

l  Contains  the  Media  Access  Control  (MAC)  sublayer  

l  Solves  the  interference  problem  

l  Mostly  contains  Automatic  Repeat  Request  (ARQ)  mechanisms  

l  Mostly  coupled  with  the  Physical  Layer  

17  

Page 18: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Link  Layer  in  IoT  l  Bluetooth:  

l  Popular,  low  energy,  low  cost,  two  different  types  for  speed  and  energy  (~2Mbps)  

l  WiFi  (IEEE  802.11):  l  Most  popular  option,  high  speed  (>Gbps),  

high  cost  

l  X10  (Power  Line):  l  Very  slow  (~kbps),  low  cost,  already  

deployed  infrastructure  

l  IEEE  802.15.4:  l  Emerging  choice  for  WSNs,  low  cost,  low  

speed  (<1Mbps)  18  

https://www.abiresearch.com/press/850-million-ieee-802154-chipsets-to-ship-in-2016-d/

Page 19: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Link  Layer  in  IoT  

19  

Page 20: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

IEEE  802.15.4  

20  

Beacon  1   Beacon  2  Slot  1   Slot  n  …  

•  Time Division is the best way to conserve energy •  Sleep until next action •  Conserve energy

•  Beacon frequency is adjustable •  Ability to change duty cycle •  Conserve energy

•  Operates on 2.4GHz (along with WiFi, BT, many others) •  Interference •  Uses frequency hopping

•  Supports multi-hop, requires hand-shaking •  How the slots are distributed is NOT defined (open to implementation, no

standard yet, open research question)

Page 21: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Physical  Layer  l  Actual  communication  over  a  physical  medium  l  Requires  hardware  implementation  (DSP)  l  Once  selected,  (almost)  impossible  to  change  

(Software  defined  radios  excluded)  l  Common  properties:  

l  Operating  Frequency  +  Bandwidth  l  Constellation  Mapping  +  Encoding  l  Forward  Error  Correction  Encoding  l  Signal  Shaping  l  Signal  Timing  +  Synchronization  

21  

Page 22: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Physical  Layer  

22  

0  (00)  

2  (10)  

1  (01)  

3  (11)  

Power

+Noise ??  

•  Shortest distance between two points is: Power x sqrt(2)

•  If noise is big enough to shift this distance, the receiver makes an error

Cost  

More  Power:  

Range   Error   #  of  Symbols   Speed  

MORE LESS MORE MORE MORE

Page 23: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

6LowPAN  l  IPV6  has  128  bit  address,  but  802.15.4  has  2^16  

address  space.  These  addresses  are  PAN  only.  l  Most  IPV6  traffic  is  static  (same  IP,  same  ports)  l  6LowPAN  compresses  the  header  from  40  bytes  to  2  

bytes  (without  state  information)  l  IP  on  WSNs  is  now  possible  

23  

RFC 4944, 6282, 6775, ”The 6LowPan Architecture, ACM”

Page 24: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Suite  Solutions  -­‐  ZigBee  l  802.15.4  as  PHY  and  MAC  l  Own  Network  Layer  &  Routing  (not  IP)  l  New  version  with  IP  as  Network  layer  is  also  out  

using  6LowPAN  l  Maintained  by  ZigBee  Alliance  

24  

Page 25: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Suite  Solutions:  ZWave  l  Smart  Home  communication  solution  

l  All  layers  are  defined  and  not  standard  

l  Uses  <GHz  frequencies  for  lower  interference  

l  Source  routing  &  master-­‐slave  coordination  

25  

Page 26: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

Suite  Solutions:  INSTEON  l  Uses  both  Power  Line  and  RF  l  Extension  of  X10  l  Used  for  Home  Automation  devices  

26  

Page 27: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

RF-­‐ID  

l  Only  Physical  and  Link  layer  is  defined  l  Currently  used  to  receive  128  bit  ID  codes  l  Link  Layer  is  a  Slotted  Aloha  

27  

Page 28: Communicationand* Networking*in*the*IoT*cseweb.ucsd.edu/classes/wi16/cse291-c/Week4... · 2016-01-27 · Communicationand* Networking*in*the*IoT* AlperSinan&Akyurek& 1 System’Energy’Efficiency’Lab

THANKS  Questions?  

28