37
Network Kernel Architectures and Implementation (01204423) IPv6 over Low-Power Wireless Personal Area Networks (6LoWPAN) Chaiporn Jaikaeo [email protected] Department of Computer Engineering Kasetsart University

Chaiporn Jaikaeo [email protected] Department of Computer Engineering Kasetsart University

  • Upload
    holden

  • View
    65

  • Download
    0

Embed Size (px)

DESCRIPTION

Wireless Embedded Systems (0120442x) IPv6 over Low-Power Wireless Personal Area Networks (6LoWPAN). Chaiporn Jaikaeo [email protected] Department of Computer Engineering Kasetsart University. Outline. 6LoWPAN IPv6 overview Header compression tecniques Routing JenNet -IP - PowerPoint PPT Presentation

Citation preview

Page 1: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

Network Kernel Architectures

and Implementation(01204423)

IPv6 over Low-Power Wireless Personal Area

Networks(6LoWPAN)Chaiporn Jaikaeo

[email protected] of Computer Engineering

Kasetsart University

Page 2: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

2

Outline 6LoWPAN IPv6 overview Header compression tecniques Routing JenNet-IP The 6lo Working Group

Page 3: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

3

6LoWPAN IPv6 over Low-power Wireless

Personal Area Networks Nodes communicate using IPv6

packets An IPv6 packet is carried in the

payload of IEEE 802.15.4 data frames

Page 4: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

4

Example 6LoWPAN Systems

Page 5: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

5

IPv6 Overview Larger address space compared to

IPv6 232 vs. 2128

Autoconfiguration Supporting both stateful (DHCPv6) and

stateless operations Simplified headers

Fixed header with optional daisy-chained headers

Mandatory security

Page 6: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

6

IPv6 Header Minimum header size = 40 bytes

Header compression mechanism is needed

VerBit 0 4 8 12 16 20 24 280 Traffic Class Flow Label

Payload Length Next Header Hop Limit

Source Address

Destination Address

32

64

96

128

160

192

224

256

288

Page 7: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

7

IPv6 Extended Headers More flexible than IPv4’s option fields Example 1: no extended header

Example 2: with a routing header

Next header = 6 (TCP) TCP hdr + payload

Next header = 43 (routing) TCP hdr + payloadNext header = 6 (TCP)

Page 8: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

8

IPv6 Addressing Global unicast addresses

Start with 001

Host ID usually incorporates MAC address

Prefix provided byservice provider Subnet ID

48 16

Host ID001

64

Page 9: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

9

IPv6 Address Scopes Global addresses

Globally routable Link-local addresses

Only used within directly attached network

Belonging to FE80::/10 block0 Interface ID

1111 1110 10

10 bits

96 db c9 FF FE 00 16 fe

94 db c9 00 16 feU = 0: not uniqueU = 1: unique

xxxxxxUx

For Ethernet addresses: U=0 Global, U=1: LocalSee http://upload.wikimedia.org/wikipedia/commons/9/94/MAC-48_Address.svg

Page 10: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

10

IEEE 802.15.4 Revisited Allows 127 bytes MTU

Good for buffering cost and low packet error rate

Supports both 16-bit and 64-bit addresses

Supports both star and mesh topologies

Usually operates in an ad hoc fashion with unreliable links

IEEE 802.15.4 networks are considered Low-power and Lossy Networks (LLN)

Page 11: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

11

6LoWPAN Adaptation Layer Needs to make IEEE 802.15.4

comply with IPv6’s MTU size of 1280 bytes IEEE 802.15.4’s MTU is 127 bytes MAC header: ≤ 25 bytes Optional security header: ≤ 21 bytes

Provides three main services Packet fragmentation and reassembly Header compression Link-layer forwarding

Page 12: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

12

6LowPAN Header Stack

Page 13: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

13

Header Dispatch Byte

Page 14: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

14

Mesh Address Header (1) Used with mesh-under routing

approach Only performed by FFDs

Page 15: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

15

Mesh Address Header (2) Hop left field is decremented by one every

hop Frame is discarded when hop left is 0

Address fields are unchanged

A B COriginator Final

802.15.4Header

MeshHeader

BOrig FinalDst Src

A A D Data

D

802.15.4Header

MeshHeader

DOrig FinalDst Src

C A D Data

Page 16: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

16

Mesh-under vs. Route-over Routing

Application

Transport

Network (IPv6)

6LoWPAN Adaptation

802.15.4 MAC

802.15.4 PHY

Application

Transport

Network (IPv6)

6LoWPAN Adaptation

802.15.4 MAC

802.15.4 PHY

Mesh-under routing Route-over routing

Routing

Page 17: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

17

Fragment Header Fragmentation is required when IPv6

payload size exceeds that of IEEE 802.15.4 payload limit

All fragments are in units of 8 bytes

(in 8-byte units)

Page 18: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

18

IPv6 Header Compression Can be either stateless or stateful Independent of flows

Page 19: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

19

HC1 Compression (1) Optimized for link-local addresses

Based on the following observations Version is always 6 IPv6 address’s interface ID can be inferred

from MAC address Packet length can be inferred from frame

length TC and flow label are commonly 0 Next header is TCP, UDP, or ICMP

Ver Traffic Class Flow Label

Payload Length Next Header Hop Limit

Source Address

Destination Address

Page 20: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

20

HC1 Compression (2)

Page 21: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

21

HC2 Compression Compress UDP header Length field can be inferred from

frame length Source and destination ports are

shortened into 4 bits each Given that ports fall in the well-known

range of 61616 – 61631

Page 22: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

22

HC1 + HC2 Compression

Page 23: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

23

IPHC Compression (1) HC1 and HC2 are only optimized for

link-local addresses Globally routable addresses must be

carried non-compressed IPHC will be the main compression

technique for 6LoWPAN HC1 and HC2 will likely be deprecated

Page 24: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

24

IPHC Compression (2)

TF: Traffic class and flow label NH: Next header HLIM: Hop limit (0NC, 11,264,3255) CID: Context Identifier SAC/DAC: Src/Dst address (stateful or stateless) SAM/DAM: Src/Dst mode

Page 25: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

25

IPHC’s Context Identifier Can be used to derive source and

destination addresses Not specified how contexts are

stored or maintained

Page 26: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

RPL – Routing Protocol for Low-power and Lossy Networks

Page 27: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

27

Low-power and Lossy Networks Abbr. LLN Packet drops and

link failures are frequent

Routing protocol should not over-react to failures

Not only applied to wireless networks E.g., power-line

communication

Pack

et d

eliv

ery

ratio

Page 28: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

28

Routing Requirements IETF formed a working group in 2008,

called ROLL (Routing over Low-power and Lossy Networks) to make routing requirements

Major requirements include Unicast/multicast/anycast Adaptive routing Contraint-based routing Traffic characteristics Scalability Auto-configuration and management Security

Page 29: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

29

LLN Example

Page 30: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

30

Different Objective Functions

- Minimize low and fair quality links- Avoid non-encrypted links

- Minimize latency- Avoid poor quality links and battery-powered node

Page 31: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

31

RPL Protocol IPv6 Routing Protocol for Low-power

and Lossy Networks Designed to be highly modular for

flexibility Employing distance vector

mechanism

Page 32: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

32

DODAG (Destination Oriented Directed Acyclic Graph) is created Based on the objective function

RPL Operations

1

1211

23 24

13

21 22

3534333231

4241 4443 45 46

LBR1

1211

23 24

13

21 22

3534333231

4241 4443 45 46

LBR

Page 33: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

33

Multiple DODAGs (1) Provide alternate routes for different

requirements

Page 34: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

34

Multiple DODAGs (2)

- Low latency- High reliability (no battery-powered node)

Page 35: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

35

JenNet IP Jennic’s implementation of 6LoWPAN Supports tree topology Routing is performed over a tree

Page 36: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

36

The 6lo Working Group Works on IPv6 over networks of

constrained nodes, such as IEEE 802.15.4 ITU-T G.9959 Bluetooth LE

https://datatracker.ietf.org/wg/6lo/charter/

Page 37: Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University

37

References G. Montenegro, N. Kushalnagar, J. Hui, and

D. Culler. Transmission of IPv6 Packets over IEEE 802.15.4 Networks, RFC 4494, September 2007.

NXP Laboratories. JenNet-IP WPAN Stack User Guide (JN-UG-3080 v1.3). 2013.

Jean-Philippe Vasseur and Adam Dunkels. Interconnecting Smart Objects with IP: The Next Internet. Morgan Kaufmann. 2010.