Chapter - 4 Routing Protocols
Chapter - 4 Routing Protocols
1
Outline
• Routing protocols for wireless and mobile network
• Performance metrics
• Classification of Routing Protocols
• Reactive Routing Protocols
• Proactive Routing Protocols
• Hybrid routing protocols
• DSR, AODV protocol descriptions
• Comparison of Proactive and Reactive Routing Protocols
2
Routing Protocols for Wireless and
Mobile Networks
• An ample of routing protocols have been developed for
wireless and mobile networks, wireless sensor
networks...
• These protocols must deal with the typical limitations of
wireless and mobility characteristics, which include:
– High power consumption,
– Network scalability
– Low bandwidth
– High error rates, and
– Arbitrary movements of nodes,
5
Classification of Routing Protocols
The basic function of routing protocols in
wireless and mobile networks are:
• To find or acquire routes information and
• Maintain this information by mobile nodes.
6
Proactive Routing Protocols
7
Proactive routing protocols: drawbacks
10
Hybrid Routing protocols
11
Hybrid Routing protocols…
• Hybrid routing protocol is combination of both
proactive and reactive routing protocol.
• It uses:
– the route discovery mechanism of reactive protocol and
– the table maintenance mechanism of proactive protocol
– so as to avoid latency and overhead problems in the
network.
12
Routing protocols…
• Sensor specific protocols
– Flat
• Sensor Protocols for Information via Negotiation (SPIN)
• Directed Diffusion
– Hierarchical
• Low Energy Adaptive Clustering Hierarchy (LEACH)
– Location-based
• Geocast
• Minimum Energy Communication Network (MECN)
14
Flooding of Control Packets
16
Node Links maintained over Internet
17
Wireless and mobile network
18
Dynamic Source Routing Protocol (DSR)
• Is a source-initiated on-demand, reactive routing
protocol designed for wireless and mobile networks.
• The protocol is composed of two main operations;
“Route Discovery” and “Route Maintenance ”.
Route discovery
• Source initiates route discovery by broadcasting a
route request(RREQ) packet.
• RREQ packet includes:
– The address of the destination
– The source node’s address
– A unique identification number
19
DSR…
20
DSR - Route Discovery
Y
Z
S E
F
B
C M L
J
A G
H D
K
I N
RREQ transmission
[X,Y] Route to D stored into a RREQ packet
Represents a node that receives
22
packet P for
the first time
DSR - Route Discovery
Y
Z
S [S,E]
E
F
B
C M L
J
A [S,C] G
H D
K
I N
23
DSR - Route Discovery
Y
Z
S E
F [S,E,F]
B
C M L
J
A G
H D
[S,C,G] K
I N
24
DSR - Route Discovery
Y
Z
S E
F [S,E,F,J]
B
C M L
J
A G
H D
K
I [S,C,G,K] N
25
DSR - Route Discovery
Y
Z
S E
[S,E,F,J,M]
F
B
C M L
J
A G
H D
K
I N
26
Route Reply in DSR
• When D gets the first RREQ, it replies with a RREP
– It follows the route stored in RREQ from S to D
backwards
– It works for bidirectional links
Y
S RREP [S,E,F,J,D] Z
E
F
B
C M L
J
A G
H D
K
I N
27
Route Reply in DSR…
28
DSR – Data transmission
DATA [S,E,F,J,D] Z
S E
F
B
C M L
J
A G
H D
K
I N
29
DSR Optimization: Route Caching
• Each node caches a new route it learns by any
means
Examples
• When node S finds route [S,E,F,J,D] to node D, node S
also learns route [S,E,F] to node F
• When node K receives Route Request [S,C,G] destined
for node, node K learns route [K,G,C,S] to node S
• When node F forwards Route Reply RREP [S,E,F,J,D],
node F learns route [F,J,D] to node D
• When node E forwards Data [S,E,F,J,D] it learns route
[E,F,J,D] to node D
30
Use of Route Caching
31
Use of Route Caching
[S,E,F,J,D]
[E,F,J,D]
S E [F,J,D],[F,E,S]
F
B [J,F,E,S]
C M L
J
A [C,S] G
H D
[G,C,S] K
I N
[S,E,F,J,D] Y
[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
35
Route Error (RERR)
Y
RERR [J-D] Z
S E
F
B
C M L
J
A G
H D
K
I N
J sends a route error to S along route J-F-E-S when its attempt to forward the
data packet S (with route SEFJD) on J-D fails
Nodes hearing RERR update their route cache to remove link J-D
36
Dynamic Source Routing: Advantages
38
Ad Hoc On-Demand Distance Vector
(AODV) Routing
• Ad Hoc On-Demand Distance Vector Routing
– Charles Perkins 1999
39
AODV…
• Reactive or on Demand
• Descendant of DSDV
• Uses bi-directional links
• Route discovery cycle used for route finding
• Maintenance of active routes
• Sequence numbers used for
– as route freshness criteria
• Provides unicast and multicast communication
40
AODV routing…
It takes most of the advantageous concepts from
DSR and DSDV algorithms.
On-demand route discovery and route
maintenance from DSR.
Hop-by-hop routing and usage of node sequence
numbers from DSDV makes it suitable for wireless
and mobile networks.
AODV utilizes control packets such as:
– Route Request (RREQ),
– Route Reply (RREP), and
– Route Error (RERR)
to manage routes between communicating nodes.
41
AODV…
• A RREQ message includes:
– Source-address
– Source-sequence no. to maintain freshness
information about the route to the source.
– Destination-address
– Destination-sequence no. to specifies how fresh a
route to the destination must be before it is
accepted by the source.
– Node-count.
42
AODV route discovery
When a node wishes to send a packet to some
destination –
❍ It checks its routing table to determine if it has a
current route to the destination
• If Yes, forwards the packet to next hop node
• If No, it initiates a route discovery process
43
AODV route discovery…
Once an intermediate node receives a RREQ, the node sets
up a reverse route entry for the source node in its routing
table
❍ Reverse route entry consists of <Source IP address,
Source seq. number, number of hops to source node, IP
address of node from which RREQ was received>
❍ Using the reverse route a node can send a RREP (Route
Reply packet) to the source
• Reverse route entry also contains – life time field
❒ RREQ reaches destination -> In order to respond to RREQ a
node should have in its routing table:
1. Unexpired entry for the destination
2. Seq. number of destination at least as great as in
RREQ (for freshness of route)
44
AODV route discovery…
RREQ reaches destination (contd.)
❍ If both conditions are met & the IP address of the
destination matches with that in RREQ
the node responds to RREQ by sending a RREP back
using unicasting and not flooding to the source using
reverse path
❍ If conditions are not satisfied, then node
increments the hop count in RREQ and broadcasts to
its neighbors
❒ Ultimately the RREQ will make to the destination
45
Route Requests in AODV- Example
Y
Z
S E
F
B
C M L
J
A G
H D
K
I N
46
Route Requests in AODV
Y
Broadcast transmission
Z
S E
F
B
C M L
J
A G
H D
K
I N
47
Route Requests in AODV
Y
Z
S E
F
B
C M L
J
A G
H D
K
I N
48
Reverse Path Setup in AODV
Y
Z
S E
F
B
C M L
J
A G
H D
K
I N
49
Reverse Path Setup in AODV
Y
Z
S E
F
B
C M L
J
A G
H D
K
I N
50
Reverse Path Setup in AODV
Y
Z
S E
F
B
C M L
J
A G
H D
K
I N
51
Route Reply in AODV
Y
Z
S E
F
B
C M L
J
A G
H D
K
I N
S A
C D
54
AODV – route discovery example
B
S A
C D
55
AODV – route discovery example
B
RREQ
S A
C D
56
AODV – route discovery example
B
RREQ
S A
C D
57
AODV – route discovery example
B
RREQ
S A
C D
58
AODV – route discovery example
B
RREQ
S A
C D
59
Route Reply in AODV
• An intermediate node (not the destination) may
also send a Route Reply (RREP) provided that it
knows a more recent path than the one previously
known to sender S
S A
C D
61
AODV – route reply
B
RREP
S A
C D
62
AODV – forward path setup
B
RREP
RREP
S A
C D
63
AODV – forward path setup
When a node determines that it has a current route to
respond to RREQ i.e. has a path to destination – It
creates RREP (Route Reply)
❒ RREP contains <IP address of source and destination>
❍ If RREP is being sent by destination
• The RREP will also contain the <current sqn # of
destination, hop-count=0, life-time>
❍ If RREP is sent by an intermediate node
• RREP will contain its record of the <destination sequence
number, hop-count=its distance to destination, its value of
the life-time>
64
AODV – forward path setup
When an intermediate node receives the RREP, it sets
up a forward path entry to the destination in its route
table
❍ Forward path entry contains
<IP Address of destination, IP address of node from which the
entry arrived, hop-count to destination, life-time>
❍ To obtain its distance to destination i.e. hop-count,
a node increments its distance by 1
❍ If route is not used within the life time, it’s deleted
65
AODV – forward path setup
B
RREP
S A
C D
66
Receipt of Multiple RREP
A node may receive multiple RREP for a given
destination from more than one neighbor
❍ The node only forwards the first RREP it receives
❍ May forward another RREP if that has greater
destination sequence number or a smaller hop count
❍ The rest are discarded -> reduces the number of RREP
propagating towards the source
67
AODV – Data Delivery
B
DATA
S A
C D
68
Route Error
• When node X is unable to forward packet P (from
node S to node D) on link (X,Y), it generates a RERR
message
71
AODV – Route maintenance
B
RERR
S A
C D
72
Summary: AODV
73
DSR and AODV comparison
• Advantages of DSR
– DSR updates routing tables when a packet is forwarded because
all of them contain the route to the destination
• With a Request-Reply you inform many nodes
• AODV has to send many more packets to update its routes
– DSR can “aggressively” answer to RREQ
• Packets are sent for all possible paths and alternative routes
are learnt
• AODV only sends a packet by one path and a single route is
learnt
• Advantages of AODV
– AODV uses timers in routes and in this way it can avoid errors
produced by expired routes
• DSR can not do that
– AODV sends RERR packets to all destinations, DSR only to the
source and some nodes are not aware of expired routes
74
Comparison of Proactive and Reactive Routing
Protocols
Routing class Proactive(Table driven) Reactive(On-demand)
Availability of route Always available Determined when needed
Periodic update Yes, some may use Not required
conditional.
Control overhead High Low
Storage requirement High Usually lower than
proactive protocols
Band width requirement High Low
Power requirement High Low
Delay level Small since routes are Higher than proactive
predetermined
Scalability problem Up to 100 nodes more than 100 nodes
Quality of Service support Mainly shortest as the QoS Few can support QoS ,
metric though most support
shortest path
75
Trade-Off
76