0% found this document useful (0 votes)
22 views45 pages

Chapter 6 - 6LoWPAN and Wireless Embedded Internet

The document discusses IPv6 and 6LoWPAN including IPv6 addressing methods, IPv6 and UDP headers, 6LoWPAN encapsulation and header compression. It describes IPv6 address types and formats, 6LoWPAN encapsulation stack, 6LoWPAN dispatch header, HC1 compressed IPv6 header, and HC1 and HC2 compressed UDP header.

Uploaded by

Viet Vu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views45 pages

Chapter 6 - 6LoWPAN and Wireless Embedded Internet

The document discusses IPv6 and 6LoWPAN including IPv6 addressing methods, IPv6 and UDP headers, 6LoWPAN encapsulation and header compression. It describes IPv6 address types and formats, 6LoWPAN encapsulation stack, 6LoWPAN dispatch header, HC1 compressed IPv6 header, and HC1 and HC2 compressed UDP header.

Uploaded by

Viet Vu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Chapter 6

6LoWPAN & Wireless Embedded


Internet
MSc. Nguyen Khanh Loi
[email protected]
2/2021
MSc Nguyen Khanh Loi
Content

v IPv6 and 6LoWPAN


v Routing Protocol for LLN (RPL)

2 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
Many Advantages of IP
v Extensive interoperability
ü Other wireless embedded 802.15.4 network devices
ü Devices on any other IP network link (WiFi, Ethernet, GPRS, Serial lines, …)
v Established security
ü Authentication, access control, and firewall mechanisms
v Established naming, addressing, translation, lookup, discovery
v Established proxy architectures for higher-level services
ü NAT, load balancing, caching, mobility
v Established application level data model and services
ü HTTP/HTML/XML/SOAP/REST, Application profiles
v Established network management tools
ü Ping, Traceroute, SNMP, … OpenView, NetManager, Ganglia, …
v Transport protocols
ü End-to-end reliability in addition to link reliability
v Most “industrial” (wired and wireless) standards support an IP option

3 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
IPv4 and IPv6 addressing

v 128-bit IPv6 address: each 16 bit values (four hex digits) separated by
colons, one sequence of all-zero 16-bit values can be replaced by a double
colon indicating a longer sequence of zeros.
v Unicast, Anycast, Multicast address
v Unicast address:
ü Global Unicast
ü Local Unicast addresses: involves IP adaptation

4 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
IPv6 Unicast

v Link local
ü Connected devices in local area
ü Prefix: FE80::/10

v Global Unicast
ü This address is similar to the Public IPv4 address, meaning that this address is
routed and used on the Internet.
001xxxxx

Identifies the zones –


Identifies the service providers –
Identify businesses, organizations –
Identifies the smaller network in the
enterprise or organization.

5 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
IPv6 Multicast

- First 8 bits are 1111 1111: Identifier of the


Multicast address
- Next 4 bits are Flags: the first 3 bits are not
normally used, the last bit. The 4th bit: 0 is the
value assigned by IANA and 1 is the temporary
address, for internal use.
- Next 4 bits are Scope: Specifies the range of
the Multicast address
- Remaining 112 bits: Identifies the group of
hosts/interfaces with the same Multicast
address.

6 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
IPv6 Global Unicast Addressing Method

- Manual Interface ID Assignment


Router1(config-if)# ipv6 address 2001:DB8:1111:2222::54/64
- EUI-64 Interface ID Assignment & stateless Auto-config: Base on MAC address

q IID: 00:1D:BA:FF:FE:06:37:64 - B.o MAC address


q Network Prefix: 2001:db8:1:2::/64
q Full IPv6 Address :
2001:db8:1:2:021D:BAFF:FE06:3764

- DHCPv6 (Stateful): DHCPv6 is a DHCPv4 update version to support IPv6

7 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
IPv6 Global Unicast Addressing Method

- Manual Interface ID Assignment


Router1(config-if)# ipv6 address 2001:DB8:1111:2222::54/64
- EUI-64 Interface ID Assignment & stateless Auto-config: Base on MAC address

q IID: 00:1D:BA:FF:FE:06:37:64 - B.o MAC address


q Network Prefix: 2001:db8:1:2::/64
q Full IPv6 Address :
2001:db8:1:2:021D:BAFF:FE06:3764

- DHCPv6 (Stateful): DHCPv6 is a DHCPv4 update version to support IPv6

8 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
IPv6 Global Unicast Addressing Method

- Manual Interface ID Assignment


Router1(config-if)# ipv6 address 2001:DB8:1111:2222::54/64
- EUI-64 Interface ID Assignment & stateless Auto-config: Base on MAC address

q IID: 00:1D:BA:FF:FE:06:37:64 - B.o MAC address


q Network Prefix: 2001:db8:1:2::/64
q Full IPv6 Address :
2001:db8:1:2:021D:BAFF:FE06:3764

- DHCPv6 (Stateful): DHCPv6 is a DHCPv4 update version to support IPv6

9 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
IPv4 & IPv6 Header

10 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
IPv6 & UDP Header

The packet header in IPv6 is


simpler than that used in IPv4.
ü IPv6 routers do not perform
fragmentation
ü The IPv6 header is not

IPv6 - 40 Bytes
protected by a checksum.
ü IPv6 routers do not need to
recompute a checksum when
header fields (such as the hop
limit change)
ü The TTL field of IPv4 has been
renamed to Hop Limit
Source Port 16 bits Destination Port 16 bits
ü Length 40 Bytes UDP 8
Bytes Length 16 bits Checksum 16 bits

UDP header: 8 bytes

11 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
IEEE 802.15.4: Frame format

127 B

SFD: 10101011

12 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
6LoWPAN encapsulation header stack

Support 3 headers: Mesh, Fragmentation and IPv6 header

13 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
The first byte: 6LoWPAN Dispatch

The first byte is used to defined the next header. For example, if the first 2 bits are 11, the
next header is a fragmentation header

14 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
HC1 Compressed IPv6 Header

HC1 based on observations:


ü IP version is always 6. (IPv6)
ü Since HC1 is optimized for link-
local addresses, the IPv6 interface
ID can be inferred from the link
layer MAC address.

IPv6 - 40 Bytes
ü The packet length can be inferred
from the frame length field of the
IEEE 802.15.4 frame (or from the
datagram size field of the fragment
header when present).
ü Common value for the TC and
flow label is 0.

UDP 8 Bytes
Source Port 16 bits Destination Port 16 bits
ü Next header is UDP, TCP, or ICMP
(2 bits) Length 16 bits Checksum 16 bits

15 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
HC1 Compressed IPv6 Header

16 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
HC2 Compressed UDP Header
UDP port uses a short_value 4-bit field instead of the
original 16-bit field. The original 16-bit field is simply
obtained by the formula short_value + 61616 (0xF0B0).

17 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
HC1 without UDP header compression

v Need 11 bytes

18 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
HC1+HC2 with UDP header compression

v Need 7 bytes

19 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
ICMPv6

v Internet Control Message


Protocol v6
ü Modification from ICMP for
IPv4
v Neighbor Discovery (ND)
ü Replace ARP, ICMP
ü Reachability of Neighbors
ü Hosts use to discovery
routers, auto-configuration
of addresses
ü Duplicate Address Detection
(DAD)

20 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
Auto-configuration

21 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
IP Routing in WSNs

v Low power and Lossy Network (LLN) consists of an edge router (also
called as LLN Border Router LBR), Router(R) and Host(H):
ü H chooses only the default router
ü R forwards traffic
ü ROLL operates only within LoWPAN and terminates at LBR

22 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
Routing Protocol for LLN (RPL)

v Routing (ROLL – Routing over LLN)


ü Routing requirements are scenario-based. Mainly:
§ one-to-one (configuration, data reading)
§ many-to-one (data gathering)
§ one-to-many (data dissemination)
ü Traffic in LLN: Mainly for P2MP and MP2P traffic flows

23 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
DAG and DODAG

v DAG: Directed Acyclic Graph (Fig. B)


ü DAG root: a node within the DAG that has no outgoing edge
ü All paths terminated at a DAG root
ü All edges are oriented in such a way that no cycles exist (Fig. A is not
a åçDAG)
v DODAG: Destination Oriented DAG (Fig. C)
ü Defines a DAG that forms paths to a single logical root

24 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
DODAG - Upward and Downward Routes

v Upward: the direction from leaf nodes


towards the DODAG root
ü Data flow towards the DAG root ‐ MP2P
traffic flows
v Downward: the direction from the DODAG
root towards leaf nodes
ü Data flow away from the DAG root –
P2MP traffic flows
v Point-to-point data flow via up and down
route
v DODAG root: Low power border router
(LBR)

25 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
Rank vs OF

v Rank: node's individual position relative to other


nodes with respect to a DODAG root
ü Increases in the Down direction and decreases in
the Up direction
ü Rank computed depends on the Objective
Function (OF) ‐ e.g. calculated as a simple
topological distance (hop counts) or may also be
calculated as a function of link metrics
v Objective Function (OF): Defines the optimization
objectives to compute the Rank
ü Optimization objectives : minimizing energy,
minimizing latency, or satisfying some
constraints, etc…
ü Dictates how routers (parents) inside the
DODAG are selected

26 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
DAG Construction

v Distance‐Vector
ü advertise path cost (routing metric)
ü choose a parent (default router/
next hop) that minimize path cost
ü Avoids loops & count‐to‐infinity
v Assign every node a rank
ü Node Rank: Relative position
within a DODAG
ü Rank strictly decreasing towards
the root
v Parents & Siblings
ü Parents –nodes with lower ranks
ü Siblings –nodes with same ranks

27 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
Data Path Validation & Loop Detection

v RPL packet information (Up/Down route) is


transported with a data packet
v On‐demand loop detection using data packets
v An inconsistency between the routing decision for
a packet (upward or downward) and the Rank
relationship between the two nodes indicates a
possible loop
ü E.g. if S3 receives a packet flagged as moving
in the upward direction, and if that packet
records that the transmitter (S2) is of a lower
Rank than the receiving node (S3)
ü S3 should initiate a local repair

28 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
Creation of Upward routes – DIO messages

v Nodes are configured to be DODAG roots


v DODAG roots advertise their presence (affiliation
with a DODAG, routing cost, and related metrics)
by sending link‐local multicast DIO messages to
all‐RPL‐nodes
v Nodes listen for DIOs
ü to join a new DODAG (thus selecting
DODAG parents),
ü or to maintain an existing DODAG, according
to the specified Objective Function
v Nodes update routing table entries, for the
destinations specified by the DIO message
ü Nodes can decide to join one or more
DODAG parents as the next‐hop for the
default route

29 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
Creation of Downward Routes: DAO Messages

v RPL uses Destination Advertisement


Object (DAO) messages to establish
downward routes
v DAO messages are an optional feature for
applications that require P2MP or P2P
traffic
v RPL supports two modes of downward
traffic
ü Storing (fully statefull)
ü Non‐storing (fully source routed)

30 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
Storing Mode vs Non-Storing mode
v Storing mode
ü Creation of routes
§ DAO propagates towards the root via
the routers
§ Each router maintains routes to each
router in WSNs
ü Data goes hop by hop (each router
forwards the packet to the right next hop)

v Non-storing mode
ü Only the root stores routes to the all
routers in WSNs
ü Calculates routes to all destination by
piecing together the info (address of the
routers) collected from DAO messages
ü Data forwards using source routing

31 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
Storing Mode vs Non-Storing mode

v Storing mode:
ü Requires more storage capacities and
memory on each router
ü Efficient communications
ü Extra mechanism to avoid loops (e.g. use
of RPL packet information)
v Non‐storing mode:
ü Does not require additional state on the
routers, but increases the message
overhead
ü Traffic through the root node increases
for internal traffic (e.g. P2P traffic within
a 6LoWPAN)

32 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
Route Construction and Forwarding

v Up routes towards nodes of decreasing rank


ü Via DAG parents (always forward to lower
rank when possible)
ü may forward to sibling if no lower rank
exists

v Down routes towards nodes of increasing rank


ü Nodes inform parents of their presence and
reachability
ü Forward hop by hop (storing mode) or using
source routing (non‐storing mode)

33 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
DAG Construction

v Objective Code Point for example


ü Metric: ETX LBR-1
ü Objective Function: Minimize 1 2
3
ETX
1 1
A B C
1
1 1

1 4
F D E
1
1 1 1

1
G H I

35 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
DAG Construction

v LBR-1 multicasts RA-DIO


v Nodes A, B, C receive and process LBR-1
RA-DIO 1 2
3
v Nodes A, B, C consider link metrics
to LBR-1 and the optimization 1 1
A B C
objective
1
v The optimization objective can be 1 1

satisfied by joining the DAG rooted 1 4


at LBR-1 F D E
v Nodes A, B, C add LBR-1 as a DAG 1
1 1 1
parent and join the DAG
1
G H I

36 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
DAG Construction

v Assume, the RA timer on Node C


expires LBR-1
v Node C multicasts RA-DIO 1 2
3
v LBR-1 ignores RA-DIO from deeper
node 1 1
A B C
v Node B can add Node C as alternate
1
DAG Parent, remaining at ETX 3 1 1

v Node E joins the DAG at ETX 3 by 1 4


adding Node C as DAG Parent F D E
1
1 1 1

1
G H I

37 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
DAG Construction

v Assume, the RA timer on Node A


expires LBR-1
v Node A multicasts RA-DIO 1 2
3
v LBR-1 ignores RA-DIO from deeper
node 1 1
A B C
v Node B adds Node A
1
1 1
v Node B can improve to a more
optimum position in the DAG 1 4
F D E
v Node B removes LBR-1, Node C as
DAG Parents 1 1
1
1

1
G H I

38 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
DAG Construction

v DAG Construction continues…


v MP2P Traffic – via Upward Route LBR-1
1 2
3

1 1
A B C
1
1 1

1 4
F D E
1
1 1 1

1
G H I

39 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
P2MP Traffic – via Downward Route
v Destination Advertisements
LBR-1
ü LBR-1 triggers Destination
1
Advertisement mechanism in DIO
ü G emits NA to F with DAO
indicating reachability to destination 1
A B
prefix G::
ü F stores G:: via G 1
Dest Next
ü H emits NA to F for destination Hop
1
prefix H:: G:: G
F D
H:: H
ü F stores H:: via H
1 1

G H

Non-storing mode
Storing mode

40 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
P2MP Traffic – via Downward Route
v Suppose in this example F has a prefix
F*:: capable of aggregating {F::, G::, LBR-1
H::} 1

v The method to provision such a


prefix is beyond the scope of RPL 1
A B
v F emits NA to D with DAO indicating
reachability to destination prefix F*:: 1
Dest Next
Hop
G:: G
1
F D
H:: H

1 1

G H

Non-storing mode
Storing mode

41 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
P2MP Traffic – via Downward Route
v D adds F to the Reverse Route Stack in
the DAO, and passes DAO on to B for LBR-1
F*:: [F] 1

v D also emits a DAO indicating prefix D::


to B 1
A B

1
Dest Next
Hop
G:: G
1
F D
H:: H

1 1

G H

Non-storing mode
Storing mode

42 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
P2MP Traffic – via Downward Route
v B adds D to the Reverse Route Stack in
the DAO for F*::, and passes DAO F*::, LBR-1
Next
D on to A Dest
Hop 1
B:: B
v B adds D to the Reverse Route Stack in
D:: B, D
the DAO for D::, and passes DAO D:: 1
[D] on to A
F*:: B,D,F A B
v A stores D:: via B, with the piecewise 1
source route [D] Dest Next
Hop
v B also emits a DAO indicating prefix B:: G:: G
1
F D
to A H:: H

v A stores B:: via B 1 1

G H

Non-storing mode
Storing mode

43 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
P2MP Traffic – via Downward Route
v A emits DAOs to LBR-1 for destination Next
prefixes A::, B::, D::, and F* LBR-1 Dest
Hop
Next A:: A
Dest 1
v LBR-1 stores A:: via A, B:: via A, D:: via Hop
B:: A
B:: B
A, and F*:: via A D:: A
D:: B, D
1 F*:: A
F*:: B,D,F A B

1
Dest Next
Hop
G:: G
1
F D
H:: H

1 1

G H

Non-storing mode
Storing mode

44 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
P2MP Traffic – via Downward Route
v LBR-1 want to send data to G(F*::) Next
LBR-1 Dest
Hop
ü LBR-1 directs traffic for G (F*::) to Next A:: A
Dest 1
A Hop
B:: A
B:: B
ü A adds source routing directive, [D, D:: B, D
D:: A

F], and forwards to B 1 F*:: A


F*:: B,D,F A B
ü B uses source routing directive to
forward to D 1
Dest Next
ü D uses source routing directive to Hop
1
forward to F G:: G
F D
H:: H
ü F uses routing state to forward to G
1 1

G H

Non-storing mode
Storing mode

45 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi
P2P Traffic

v P2P traffic use Upward and


Downward. LBR-1
1 2
3

1 1
A B C
1
1 1

1 4
F D E
1
1 1 1

1
G H I

Non-storing mode
Storing mode

46 6LoWPAN & Wireless Embedded Internet


MSc Nguyen Khanh Loi

You might also like