Вы находитесь на странице: 1из 26

1

Dynamic Source Routing


Compiled By:[14PGIT08 TO 14PGIT014]

1/18/15

Content
2

Introduction
Mechanism
DSR optimization
Advantage & disadvantage
Summary of Aodv & dsr

Soft Computing

1/18/15

Introduction
3

When S sends a data packet to D, the entire route is included in the packet
header
Intermediate nodes use the source route embedded in the packets header to
determine to whom the packet should be forwarded
Different packets may have different routes, even they have the same source
and destination

Hence called as dynamic source routing


1/18/15

Basic Assumptions in DSR


4

All nodes are willing to forward packets for other nodes in the
network

The diameter of an ad-hoc network will not be too larger


Packet header will be bigger than payload if route is very longer

The nodes speed is moderate


Local route cache will become stale soon if nodes speed is high

All nodes are overhearing (promiscuous)


No energy saving
1/18/15

Mechanism of Dsr
5

Two basic mechanisms


Route Discovery
Route Request (RREQ)
Route Reply (RREP)

Route Maintenance
Route Error (RERR)

Academic Automation Tool

1/18/15

Route Discovery
6

When to perform a Route Discovery ?

Every route request packet (RREQ) contains


<target address, initiator address, route record, request ID>

Each node maintains a list of the < initiator address, request ID>

When a node Y receives a RREQ


Discards the route request packet

if < initiator address, request ID> is in its list

Return a route reply packet which contains a route from initiator to target
If
If

Y is target
Y has an entry in its route cache for a route to target

Append itself address to the route record in RREQ and re-broadcast RREQ

Route Discovery in DSR


7

Y
S

Z
F

G
H

Represents a node that has received RREQ for D from S

Route Discovery in DSR


8

Broadcast

Y
[S]
S

E
F

G
H

K
I

Represents transmission of RREQ


[X,Y]

Represents route record stored in RREQ

D
N

Route Discovery in DSR


9

Y
S
[S,B]

[S,E]

[S,C]
H

G
K

Node H receives packet RREQ from two neighbors:


potential for collision

D
N

Route Discovery in DSR


10

Y
S
[S,B,A]

[S,E,F]

A
H

[S,B,H]
I

E
L

G
[S,C,G]

C receives RREQ from G and H, but does not forward


it again, because C has already forwarded RREQ once

Route Discovery in DSR


11

Y
S

Z
[S,E,F,J]

A
H

[S,B,H,I]

G
K

J and K both broadcast RREQ to D


Their transmissions may collide at D

D
[S,C,G,K]

Route Discovery in DSR


12

Y
S

[S,E,F,J,M]

G
H

K
I

D does not forward RREQ, because D is the intended target

D
N

Route Reply in DSR


13

Y
S

RREP [S,E,F,J,D]

Z
F

G
H

K
I

Represents RREP control message

D
N

An Example of Route Maintenance


14

RERR [J-D]

Route Error Packet : RERR


S

G
H

K
I

D
N

J sends a route error to S along route J-F-E-S when it finds link [J-D] broken
Nodes hearing RERR update their route cache to remove all invalid routes related with
link J-D

DSR Optimization: Route Caching


15

Each node caches a new route it learns by any means

When S finds route [S,E,F,J,D] to

When K receives Route Request [S,C,G] destined for some node D, K


learns route [K,G,C,S] to

D, S also learns

route [S,E,F] to F

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

Use of Route Caching


Can Speed up Route Discovery
16

[S,E,F,J,D]

[E,F,J,D]

[F,J,D],[F,E,S]

[G,C,S]

[C,S]

A
H

[J,F,E,S]

G
[K,G,C,S] K

D
RREP

RREQ
Z

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

Use of Route Caching


Can Reduce Propagation of Route Requests
17

[S,E,F,J,D]

[E,F,J,D]

[F,J,D],[F,E,S]

[G,C,S]

[C,S]

A
H

[J,F,E,S]

G
[K,G,C,S] K

D
RREP

L
[D,K,G,,C]
N

RREQ
Z

Route Replies (RREP) from node K and D limit flooding of RREQ.

Route Caching: Beware!


18

With time passing and node moving, cached routes may become invalid

Stale caches can adversely affect on network performance

Stale or invalid information may be propagated to whole network

Other DSR Optimizations (1)


19

Avoid Route Reply Storm problem


When intermediate nodes reply Route Request by using local route cache
Pick a random number d=H*(h-1+r)

H= average per hop delay; h= length of the route; r = random num in [0,1]
Delay transmitting the route reply for a period of d
During this period, cancel the route reply if overhearing a packet contains a route
from the same initiator to the same target with length no longer than h

3
4

1
S

[S,1,2,A,8,11,12,D]
8
A
2
6

11
9

[S,6,7,B,9,D]

10

12

16

D
13

15

14

Other DSR Optimizations (2)


20

Expanding Ring (limits the propagation of RREQ


packets)
First, set TTL = 1 for first route request packet
If no route reply is received after some time period, set
TTL = maximum for next route request packet
[S,E,F,J,D]

[E,F,J,D]

S
B
A

E
C

[F,J,D],[F,E,S]

[J,F,E,S]

[G,C,S]

[C,S]

G
[K,G,C,S]

RREQ

D
RREP

Other DSR Optimizations (3)

Reflecting shorter route


D may find that route may be shortened by excluding the intermediate hop C, D then sends an unsolicited
route reply packet to A to inform the shorter route
RREP

Improved handling of errors due to network partitions


Limit the rate of route discovery packet transmission

Exponential backoff

21

Other DSR Optimizations (4)

Improved handling of route errors if links are unidirectional


S retransmits route error packet along the original route if links are unidirectional

Y
Z
S
B
A

E
F

C
G

H
I

RERR [J-D]

J
K

D
N

22

Dynamic Source Routing: Advantages


23

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

Dynamic Source Routing: Disadvantages

24

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

25

Comparison between aodv


and dsr

. DSR has less routing overhead than AODV.


2. AODV has less normalized MAC overhead than
DSR.
3. DSR is based on a source routing mechanism
whereas AODV uses a combination of
DSR and DSDV mechanisms.
4. AODV has better performance than DSR in
higher-mobility scenarios.
5. DSR has less frequent route discovery
processes than AODV.
Academic Automation Tool

1/18/15

26

Вам также может понравиться