Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250...

23
14-Dec-17 Johan J. Lukkien, [email protected] TU/e Informatica, System Architecture and Networking 1 6LoWPAN (based on: The Wireless Embedded Internet, Shelby, Bormann) Johan Lukkien Richard Verhoeven Internet of Things 2017/2018 John Carpenter, 1982

Transcript of Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250...

Page 1: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

1

6LoWPAN

(based on: The Wireless Embedded Internet, Shelby, Bormann)

Johan LukkienRichard Verhoeven

Internet of Things2017/2018

John Carpenter, 1982

Page 2: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Framework for discussing protocols• Purpose of the protocol

– the problems it solves– the context it operates in, the place in the stack

• Parties that use it• Functionality, typical behavior• Packet format• Carriers• Binding to carriers• Utility for IoT

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

2

protocol

carrier

binding

Page 3: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Guiding questions• How to map IPv6 onto a constrained network, in particular, onto

IEEE 802.15.4• In particular, how does 6LoWPAN do this?

• goals– an appreciation of the problems involved– an understanding of the extreme dependence on details– understand some of the technical tricks and tools

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

3

Page 4: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Things like this must be solved

• We will address two IETF protocols in particular– CoAP– 6LoWPAN

• and one OMA protocol– LWM2M on top of CoAP

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

4

IP protocol, MTU = 1280

IEEE 802.15.4 carrier, MTU = 127

binding

Page 5: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Overview

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

6

Picture from ‘6LoWPAN demystified, ti.com

Page 6: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

6LoWPAN context: place in the stack• Usually referred to as an adaptation layer

– more or less a sub-protocolto deliver IPv6 packets to low capacity devices

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

7

Page 7: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Parties that use it• IP endpoints

– including low capacity devices– use of 6LoWPAN should be transparent to endpoints

• Neighboring layers in the stack

• Special role for edge devices– technology

bridges– re-packetizing

according to the bindingsdefined for6LoWPAN

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

8

Page 8: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Which problems need to be solved?• Essentially

– define a binding of IPv6 to IEEE 802.15.4– this entails both the packet as well as the IPv6 particular behavior

• In the binding solve problems of – too large headers: IPv6, UDP, TCP – too large packets

• MTU of 1280 (IPv6) versus 127 (IEEE 802.15.4)

• Map IPv6 requirements / behavior to IEEE 802.15.4– auto-configuration

• address assignment, neighbor discovery & sollicitation, router discovery

• Support layer 2 forwarding to establish a connected broadcast domain– “mesh under routing” rather than routing at IPv6 layer

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

9

Page 9: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

IPv6 in one slide• 128 bit addresses– 64 bit network address

• divided into subnets again: (routing prefix + subnet id)• should be variable to avoid tracking

– 64 bit interface address • derived from MAC address,

should be variable (privacy)

• mobility support: redirection• integrated security - IPSEC• multicasting support using

multicast group addresses• stateless auto-configuration

– determine interface address– duplicate address detection

• neighbor discovery vianeighbors solicitation / advertisement (resolve IP address to MAC address)

• (router, subnet) discovery / adv via router solicitation (to all-routers multicast) • no fragmentation: responsibility of sender (routers won’t do it)

– require maximum transport unit (MTU) of at least 1280 over a link– perform MTU discovery

• options (e.g. choices of the above) through extension headers, in payload

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

10

Page 10: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

IEEE 802.15.4 in one slide• 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets

– 72-116b effective payload• designed towards very low

manufacturing cost• CSMA/CA + slot reservation• 4 types of frames:

– data, ack– beacon– MAC command

• Full-function devices– coordinators: can route

messages; can control a PAN(Personal Area Network) via beacons

– at least one per network

• Reduced-function devices– no forwarding

• Device address:– 64 bit IEEE EUI-64 address– 16 bit short identifiers (within a 16 bit PAN)

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

11

Presenter
Presentation Notes
JL> Where is the PAN used and where is it assigned? “SSID from 15.4” 16 bits address: random, or PAN coord. Packet formats are determined by the frame control field (filling in the options) (PAN: y/n for dest/src, packet type) What are the roles of beacon and MAC command – what are sequence diagrams? beacon: broadcast to synchronize (star) by PAN coordinator PAN coordinator definition? PAN identifier definition? – flash / negotiation?
Page 11: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Which problems need to be solved?• Essentially

– define a binding of IPv6 to IEEE 802.15.4– this entails both the packet as well as the IPv6 particular behavior

• In the binding solve problems of – too large headers, IPv6, UDP, TCP – header compression, in two ways – too large packets – fragmentation

• Map IPv6 requirements / behavior to IEEE 802.15.4– auto-configuration – several proposals for address assignment

• address assignment, resolution (neighbor discovery, & sollicitation) and router discovery

• Address / support layer 2 forwarding to establish a connected broadcast domain– “mesh under routing” – mesh routing header

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

12

Presenter
Presentation Notes
The problem is to explain how a IP packet is transported via 15.4. Normally: mac dst = router; IP packet = payload In-network: direct neighbor: mac dst = f(IP dst); IP dst = f-1(mac dst); same for src routing, multihop: over (IP based): need to know IP of next hop towards IP dst mac dst: macnxt; IP dst: global IP in payload, can compress if IP is within PAN mac src: mac current hop; IP src: global IP in payload; ERC filled in by border router under (mac based): use mac forwarding to reach an indicated mac address. Need to store IP addresses of src and dst. under: no need to reconstruct IP packet versus over Header compression works in this way only if the communication is with a neighbor. resolution and neighbor (router) discovery: check IETF RPL: over routing no spec for details of mesh under routing interop issue
Page 12: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

The mapping problem

13

Source address 128 bits Destination address 128 bits

Version (6) 4 bitsTraffic class 8 bits

Flow label 20 bitsPayload length 16 bits

Next header 8 bitsHop limit 8 bits

40 Bytes PayloadFrame control 2 bytes

Sequence number 1 byteDestination PAN 0/2 bytes

Destination address 0/2/8 bytesSource PAN 0/2 bytes

Source address 0/2/8 bytesAux. Security 0/5/6/10/14 bytes

9-37 bytes 72-116 bytes

CRC

2

MessageIntegrity

Code

0/4/8/16

IPv6 packet layoutMTU ≥ 1280

IEEE 802.15.4 packet layoutMTU = 127

14-Dec-17TU/e Informatica, System Architecture and Networking

Johan J. Lukkien, [email protected]

PHYLEN

Presenter
Presentation Notes
In the IPv6 packet, the payload will contain the next header, which is usually TCP or UDP, but might include a chain of optional headers, like fragmentation, routing or hop-by-hop. The IPv6 header does not include a header checksum or a payload checksum and relies on layer 2 CRC checks to detect errors. The 802.15.4 packet contains many optional fields in the header, indicated with the x/y/z notation to indicate how many bytes different fields might require. The options are selected based on the bits in the frame control field. A common selection of options for data packets is indicated with the underlined values: the destination PAN is selected to ensure that different 802.15.4 deployments don’t interfere with each other, the 16-bit addresses are used, no inter-PAN communication and no security or integrity. That combination of options results in data packets with an overhead of 9+2 bytes. The minimal packet of 5 bytes (no payload) is a layer 2 acknowledgment.
Page 13: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Compression and mapping techniques• Reduce length by a focus on the common case:

– limited number of common cases: give these their own code • hence, compressed representation

– rare cases: ‘follows in-line’• hence, uncompressed

• Use knowledge– the way IPv6 addresses are formed– can reduce – sometimes – to 16 bit short address

• Use superfluous (re-occurring) information– length, occurs in several layers– addresses at MAC and IP levels

• Use context– something known by all nodes, e.g. edge router or common destination– makes the compression statefull

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

14

Page 14: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Min/max

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

15

(from presentation by prof. Gunes)

Page 15: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Address Assignment

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

16

Page 16: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

6LoWPAN: addresses

17

IPv6 Network802.15.4Network

Edge router

• Address auto-configuration basics– Any IEEE 802.15.4 network is a single IPv6 subnet (64 bits addressing)– Derive IPv6 address from IEEE 802.15.4 address

• this reduces traffic for address assignment (‘DHCP’)• this reduces state to be stored in the edge router

– Edge router knows routing prefix and subnet id: Edge Router Context (ERC)• (together: network address)• can add this when the packet leaves the LoWPAN

Interface identifier64 bits

Subnet id≤16 bits

Routing prefix≥48 bits

14-Dec-17TU/e Informatica, System Architecture and Networking

Johan J. Lukkien, [email protected]

Presenter
Presentation Notes
Single (wired) route through the IPv6 network Wireless mesh networking in 802.15.4. Border router to connect both networks. JL> is this correct. What is the connection with next sldes? Explaining the second bullet? JL> mesh networking is independent from this? Can you still use ip routing?
Page 17: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

History: header compression• RFC 4944

– HC1 = IPv6 header compression– HC2 = UDP header compression

• RFC 6282 – update (improvement)– IPHC = IPv6 header compression– NHC = next header compression (more general than just UDP)

• In both cases: – address compression is important as the long addresses are a

major overhead

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

18

Page 18: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

IP addresses and MAC addresses• An IP packet has a source and a destination

– IP-S, IP-D– defining source and destination of a (multi-hop) transmission

• It is transported in a MAC packet with a source and a destination– M-S, M-D– defining source and destination of one hop, changing all the time

• These don’t have to be ‘the same’, because of routing– M-S ~ IP-S means: the IP source is the sender of the MAC packet– M-D ~ IP-D means: the IP destination is the receiver of the MAC packet– halfway a route, neither has to be the case

• Header compression is therefore hop-by-hop, not end-to-end

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

23

Page 19: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Routing packets• Three main possibilities for routing

– hop-by-hop based on IP forwarding (“route-over routing”)

• requires expensive IP packet reconstruction on every hop

• (FIB: forwarding information base)– hop-by-hop based on MAC/6LoWPAN

forwarding (“mesh-under routing”)• requires original source and

destination MAC addresses to be maintained in order to take routing decisions and reconstruct the IP packet. This is done in a mesh header define by 6LoWPAN

– hop-by-hop in the MAC (LLC) invisible for the 6LoWPAN layer

• ISA100

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

24

Page 20: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

6LoWPAN – Application notes• End-to-end IPv6 communication

– Severely limited due to packet fragmentation– Design for compact packet sizes– Use UDP instead of TCP

• Application-level reliability• TCP round-trip time, time-outs, windows, 3-way handshake

• Edge router required– Just forwards packets, no intelligence– Add a proxy to reduce 802.15.4 traffic

• Gaining momentum– Used by Thread Group for home automation

3814-Dec-17

TU/e Informatica, System Architecture and NetworkingJohan J. Lukkien, [email protected]

Page 21: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

6LoWPAN - References• RFC 4919 (Sep. 2007)

– IPv6 over Low-Power Wiress Personal Area Networks (6LoWPANs): Overview, Assumptions, Problem Statement, and Goals

• RFC 4944 (Sep. 2007)– Transmission of IPv6 packets over IEEE 802.15.4 Networks

• RFC 6282 (Sep. 2011)– Compression Format for IPv6 Datagrams over IEEE 802.15.4-Based

Networks• RCF 6775 (Nov. 2012)

– Neighbor Discovery Optimization for IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs)

• 6LoWPAN – The Wireless Embedded Internet– Zach Shelby & Carsten Bormann, Wiley, 2009

• Contiki OS – common platform for evaluating protocols– http://www.contiki-os.org/

• IEEE 802.15.4– http://standards.ieee.org/about/get/

3914-Dec-17

TU/e Informatica, System Architecture and NetworkingJohan J. Lukkien, [email protected]

Page 22: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Framework for discussing protocols• Purpose of the protocol

– the problems it solves– the context it operates in, the place in the stack

• Parties that use it• Functionality, typical behavior• Packet format• Carriers• Binding to carriers• Utility for IoT

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

40

protocol

carrier

binding

Page 23: Internet of Things 2017/2018 · IEEE 802.15.4 in one slide • 868+, 902+, 2400+ MHz, 10m, 250 kbits/sec, 127b packets – 72-116b effective payload • designed towards very low

Guiding questions• How to map IPv6 onto a constrained network, in particular, onto

IEEE 802.15.4• In particular, how does 6LoWPAN do this?

14-Dec-17

Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking

41