Chapter 5 - Routing
Chapter 5 - Routing
Routing
MSc. Nguyen Khanh Loi
[email protected]
2/2021
MSc Nguyen Khanh Loi
Content
v Multi-hop communication
v Link characteristics
v Collection Tree Protocol/DCP
2 Routing in WSNs
MSc Nguyen Khanh Loi
Wireless Ad-hoc Networks
3 Routing in WSNs
MSc Nguyen Khanh Loi
Classification of ad-hoc networks
v Single hop – nodes are in their v Multi hop – some nodes are far
reach area and can and cannot communicate directly.
communicate directly The traffic has to be forwarded by
other intermediate nodes.
4 Routing in WSNs
MSc Nguyen Khanh Loi
Multi-hop network
5 Routing in WSNs
MSc Nguyen Khanh Loi
Characteristics of an mobile ad-hoc network
(MANET)
6 Routing in WSNs
MSc Nguyen Khanh Loi
MANET vs WSNs
7 Routing in WSNs
MSc Nguyen Khanh Loi
Classical View of Routing
8 Routing in WSNs
MSc Nguyen Khanh Loi
Topology Formation
9 Routing in WSNs
MSc Nguyen Khanh Loi
Classification of the Routing Protocols
v Link state
ü Nodes shout (send) and listen (receive) to determine neighbor connectivity.
ü Each floods this information throughout (Link State Advertisement) so
every node has a map (Link state data base) of the network.
ü Any node can determine the path or the next hop.
ü management protocol deals with changes in connectivity
ü Classic Example: OSPF
v Distance vector
ü Nodes maintain routing information about “distance” and “direction” to
destinations
ü Choose next hop by comparing the cost of routing through neighbors
ü Cost(dest D, neighbor b) = linkCost(b) + pathCost(b,D)
ü Management propagates routing information
ü Sequence numbers, etc.
ü Classic Example: RIP
10 Routing in WSNs
MSc Nguyen Khanh Loi
Classification of the Routing Protocols
11 Routing in WSNs
MSc Nguyen Khanh Loi
Classification of the Routing Protocols
12 Routing in WSNs
MSc Nguyen Khanh Loi
Classification of the Routing Protocols
Other classification
vProactive protocols:
ü DSDV, STAR, WRP, ...
vReactive protocols:
ü AODV, DSR, TORA, ...
vHierarchical/Clustering protocols:
ü CGSR, ZRP, CBR, FSR, LANMAR, ...
vPosition aware protocols:
ü GPSR, LAR, GRA, ABR, ...
13 Routing in WSNs
MSc Nguyen Khanh Loi
Dynamic Source Routing
14 Routing in WSNs
MSc Nguyen Khanh Loi
Dynamic Source Routing
Route discovery
v The source sends a broadcast packet
which contains source address,
destination address, request id and
path.
v If the host receiving this packet,
saw this packet before, discards it.
v Otherwise, it looks up its route
caches to look for a route to
destination. If a route is not found,
it appends its address into the
packet and rebroadcasts it.
v If the route is found, it sends a reply
packet to the source node.
v The route will be eventually found
when the request packet reaches the
destination
15 Routing in WSNs
MSc Nguyen Khanh Loi
Dynamic Source Routing
16 Routing in WSNs
MSc Nguyen Khanh Loi
Dynamic Source Routing
v Route maintenance
ü Whenever a node transmits a data packet, a route reply or a route error,
it must verify that the next hop correctly receives the packet.
ü If not, the node must send a route error to the node responsible for
generating this route header.
ü The source restarts the route discovery
v Route caching
ü When S finds route [S,E,F,J,D] to D, S also learns route [S,E,F] to F
ü When K receives Route Request [S,C,G] destined for some node D, K
learns route [K,G,C,S] to S if links are bi-directional
ü F forwards Route Reply RREP [S,E,F,J,D], F learns route [F,J,D] to
D
ü When E forwards Data [S,E,F,J,D] it learns route [E,F,J,D] to D
17 Routing in WSNs
MSc Nguyen Khanh Loi
Can Speed up Route Discovery
[S,E,F,J,D]
[E,F,J,D]
S E [F,J,D],[F,E,S]
F
B [J,F,E,S]
C [G,C,S] M L
J
A [C,S] G
H D
[K,G,C,S] K
I RREP N
RREQ
Z
18 Routing in WSNs
MSc Nguyen Khanh Loi
Can Speed up Route Discovery
When K receives Route Request [S,C,G] destined for some node D, K learns
route [K,G,C,S] to S if links are bi-directional
[S,E,F,J,D]
[E,F,J,D]
S E [F,J,D],[F,E,S]
F
B [J,F,E,S]
C [G,C,S] M L
J
A [C,S] G
H D
[K,G,C,S] K
I RREP N
RREQ
Z
19 Routing in WSNs
MSc Nguyen Khanh Loi
Can Speed up Route Discovery
When node Z sends a route request for node C, node K sends back a route
reply [Z,K,G,C] to node Z using a locally cached route
[S,E,F,J,D]
[E,F,J,D]
S E [F,J,D],[F,E,S]
F
B [J,F,E,S]
C [G,C,S] M L
J
A [C,S] G
H D
[K,G,C,S] K
I RREP N
RREQ
Z
20 Routing in WSNs
MSc Nguyen Khanh Loi
Reduce Propagation of Route Requests
[S,E,F,J,D]
[E,F,J,D]
S E [F,J,D],[F,E,S]
F
B [J,F,E,S]
C [G,C,S] M L
J
A [C,S] G
H D [D,K,G,,C]
[K,G,C,S] K
I RREP N
RREQ
Z
21 Routing in WSNs
MSc Nguyen Khanh Loi
Reduce Propagation of Route Requests
v Advantages
ü Routes are discovered only they are needed
ü Reduces overhead of route maintenance
ü Route caching reduce the cost of route discovery
ü A single route discovery may yield many routes to the destination, due to
intermediate nodes may reply route request from local caches
ü Does not require symmetric links
v Disadvantages
ü Packet header size grows with route length due to source routing: Inefficiency
ü Route request packet may potentially reach all nodes in the network: RREQ
flooding
ü Route requests may collide at the targeted node: Pay so much but get nothing
ü Every node needs to turn on its receiver all the time: No energy saving
ü Increased contention if too many route replies come back: Route Reply Storm
ü An intermediate node may send Route Reply using a stale cached route, thus
polluting other nodes’ caches: Mess up routing and forwarding
22 Routing in WSNs
MSc Nguyen Khanh Loi
Proactive - Neighbor Communication - Flooding
1 Beacons
1
24 Routing in WSNs
MSc Nguyen Khanh Loi
Proactive - Data Collection in concept
2
2
2
2
1
2 1
25 Routing in WSNs
MSc Nguyen Khanh Loi
The Problems
26 Routing in WSNs
MSc Nguyen Khanh Loi
CTP: Collection Tree Protocol
27 Routing in WSNs
MSc Nguyen Khanh Loi
CTP: Routing metric
28 Routing in WSNs
MSc Nguyen Khanh Loi
Parent Selection
3
2 1
d
a sink
4
3
2 2 2
e: EXT(e) = 1
f: EXT(f) = 2 3 f
c
d: 2 + EXT(e) < 2 + ETX(f)
b: 10 + EXT(e)
c: 3 + EXT(f)
a: 4 + EXT(d) < 3+ EXT(b) and 2 + EXT(c)
29 Routing in WSNs
MSc Nguyen Khanh Loi
Challenges for data collection
v Link dynamics
ü Links can be highly dynamic, particularly in the 2.4 GHz
frequency space
ü Wireless links can change in the order of a few hundred
milliseconds
v Routing inconsistencies
ü Rapid topology change can cause routing inconsistencies and
route loops, cause packet loss in the data plane
30 Routing in WSNs
MSc Nguyen Khanh Loi
Routing Inconsistency
v Routing Consistency
ü Next hop should be closer to the destination
X
ü Maintain this consistency criteria on a path
C 3.2
8.1
ni ni+1 nk
D A
6.3
5.8
31 Routing in WSNs
MSc Nguyen Khanh Loi
Datapath validation
6.3
5.8 < 8.1?
5.8 D A
5.8 6.3 32
32 Routing in WSNs
MSc Nguyen Khanh Loi
CTP Data Frame
v P (Routing Pull)
ü Allows nodes to request routing information
ü If P is set the node should transmit a routing frame
v C (Congestion notification)
ü If a node drops a CTP data frame it must set the C bit field on the next data
frame
v THL (Time Has Lived )
ü If a node generates a CTP data frame, it must set THL to 0
ü If a node receives a CTP data frame must increment the THL
34 Routing in WSNs
MSc Nguyen Khanh Loi
CTP Data Frame
35 Routing in WSNs
MSc Nguyen Khanh Loi
CTP Routing frame
36 Routing in WSNs
MSc Nguyen Khanh Loi
CTP: Architecture
37 Routing in WSNs
MSc Nguyen Khanh Loi
CTP: Adaptive Beaconing
38 Routing in WSNs
MSc Nguyen Khanh Loi
CTP: Adaptive Beaconing
v In CTP:
ü Start with lowest intervals of 64ms
ü When interval expires double it up to 1 hour
ü Reset to lowest interval when inconsistent
v Reset the interval on three events
ü Receive packet ETX <= self ETX
ü Its routing cost decreases Significantly
ü It receives a packet with P bit set
39 Routing in WSNs
MSc Nguyen Khanh Loi
CTP: Adaptive Beaconing
40 Routing in WSNs
MSc Nguyen Khanh Loi