Unit3-Network Layer

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 91

Application

Transport
Network
Link
Physical

Computer Networks
Network Layer

Dr. Satish Anamalamudi,


Department of CSE
SRM University-AP
Overview
applicatio
n
transport
• Functions: network
data link
network
data link
physical network network
– Routing issues data link
physical
data link
physical physical
• determine “good” path network
data link
(sequence of routers) thru physical
network
data link
network from source to dest. physical

– Congestion (Not Contention!) network


network
data link
data link
• More packets enter an physical
physical
network
area than can be processed data link
physical
– Internetworking applicatio
n
• connecting different transport
network
network technologies together data link
physical

• Network layer protocols in every host, router


Network Layer Design Issues
• Services Provided to the Transport Layer
– The network layer should shield the transport layer from having to know
details of the underlying subnet

• Network Layer Services can:


– Connection-Oriented: Provides Virtual Circuit (VC) subnet,
• source-to-destination path behaves much like telephone circuit, Avoids
choosing a new route for each packet.
• A virtual circuit remembers how to send a packet from source to destination.

– Connection-less: Provides Datagram subnet,


• Each packet sent is routed independently of its predecessors
Connectionless: Datagram (1)
• No call setup at network layer
• Packets forwarded using destination host address
– packets between same source-dest. pair may take different paths
• Use in Internet

2. Receive Data applicatio


n
transport
network
data link
physical
applicatio 1. Send Data
n
transport
network
data link
physical
Connectionless: Datagram (2)
Store-and-Forward packet
Subnet

The table of router A is


changed because of some
Routing tables reasons!

Management and update


this tables for routing =
Routing algorithm
a) Routing within a diagram subnet:
Virtual Circuits (1)
• Call setup, do for each call before data can flow
• Each packet carries VC identifier
• Used in ATM, frame-relay, X.25

6. Receive data
3. Accept call applicatio
n
2. Incoming call transport
network
5. Data flow begins data link
4. Call connected physical
applicatio 1. Initiate call
n
transport
network
data link
physical
Comparison of Virtual-Circuit and Datagram
Internet ATM
Quality of Service: QoS
• Factors:
– Timing
• Connection Establishment Delay
• End-To-End Delay
– Connection Establishment Failure Probability
– Throughput or Bandwidth Guarantee
– Ordering Preservation
– Congestion Control
– Bit-Error rate or Packet-Loss Rate Control
– Protection
– Priority
– …
Routing (1)
• The network layer is responsible for routing packets from the source to
destination.
• The routing algorithm is the piece of software that decides where a
packet goes next (e.g., which output line, or which node on a broadcast
channel).

• For connectionless networks, the routing decision is made for each


datagram. For connection-oriented networks, the decision is made once,
at circuit setup time.

• The routing algorithm must deal with the following issues:


– Correctness, simplicity, stability, fairness and optimality
– Mimizing mean packet delay or maximizing total network throughput

• Routing is different from Forwarding!:


– Forwarding: Select the output path using routing table
– Routing: Management and updating the routing tables
Routing (2)
• There are two types:
– Static (Non-Adaptive)
• routes never update or update slowly over time
• Examples: Dijkstra, Flooding algorithm

– Dynamic (Adaptive)
• routes update more quickly use dynamic information of current topology such as load, delay, …
• Examples: Distance Vector, Link State Routing
Single-Source Shortest Path Problem
Dijkstra Algorithm
Single-Source Shortest Path Problem - The problem of
finding shortest paths from a source vertex v to all other vertices
in the graph.
Applications
- Maps (Map Quest, Google Maps)
- Routing Systems
Dijkstra's algorithm
Dijkstra's algorithm - is a solution to the single-source
shortest path problem in graph theory.

Works on both directed and undirected graphs. However,


all edges must have nonnegative weights.

Input: Weighted graph G={E,V} and source vertex v∈V,


such that all edge weights are nonnegative

Output: Lengths of shortest paths (or the shortest paths


themselves) from a given source vertex v∈V to all other
vertices
Approach
a) The algorithm computes for each vertex u the distance to u from the start vertex v, that is, the weight of a shortest path between v and u.
b) the algorithm keeps track of the set of vertices for which the distance has been computed.
c) Every vertex has a label D associated with it. For any vertex u, D[u] stores an approximation of the distance between v and u. The
algorithm will update a D[u] value when it finds a shorter path from v to u.
Dijkstra’s algorithm

2
Start with G
3
5 F C K dv pv
10
A 7 3 A
8 4
18 B
4
B D
9 C
10
H D
2 9 25
3 E
G E
7 F
G T 0 
H
Dijkstra’s algorithm

2
Update unselected nodes
3
5 F C K dv pv
10
A 7 3 A
8 4
18 B
4
B D
9 C
10
H D 2 G
2 9 25
3 E
G E
7 F
G T 0 
H 3 G
Dijkstra’s algorithm

2
Select minimum distance
3
5 F C K dv pv
10
A 7 3 A
8 4
18 B
4
B D
9 C
10
H D T 2 G
2 9 25
3 E
G E
7 F
G T 0 
H 3 G
Dijkstra’s algorithm

2
Update unselected nodes
3
5 F C K dv pv
10
A 7 3 A
8 4
18 B
4
B D
9 C
10
H D T 2 G
2 9 25
3 E 27 D
G E
7 F 20 D
G T 0 
H 3 G
Dijkstra’s algorithm

2
Select minimum distance
3
5 F C K dv pv
10
A 7 3 A
8 4
18 B
4
B D
9 C
10
H D T 2 G
2 9 25
3 E 27 D
G E
7 F 20 D
G T 0 
H T 3 G
Dijkstra’s algorithm

2
Update unselected nodes
3
5 F C K dv pv
10
A 7 3 A 7 H
8 4
18 B 12 H
4
B D
9 C
10
H D T 2 G
2 9 25
3 E 27 D
G E
7 F 20 D
G T 0 
H T 3 G
Dijkstra’s algorithm

2
Select minimum distance
3
5 F C K dv pv
10
A 7 3 A T 7 H
8 4
18 B 12 H
4
B D
9 C
10
H D T 2 G
2 9 25
3 E 27 D
G E
7 F 20 D
G T 0 
H T 3 G
Dijkstra’s algorithm

2
Update unselected nodes
3
5 F C K dv pv
10
A 7 3 A T 7 H
8 4
18 B 12 H
4
B D
9 C
10
H D T 2 G
2 9 25
3 E 27 D
G E
7 F 17 A
G T 0 
H T 3 G
Dijkstra’s algorithm

2
Select minimum distance
3
5 F C K dv pv
10
A 7 3 A T 7 H
8 4
18 B T 12 H
4
B D
9 C
10
H D T 2 G
2 9 25
3 E 27 D
G E
7 F 17 A
G T 0 
H T 3 G
Dijkstra’s algorithm

2
Update unselected nodes
3
5 F C K dv pv
10
A 7 3 A T 7 H
8 4
18 B T 12 H
4
B D
9 C 16 B
10
H D T 2 G
2 9 25
3 E 22 B
G E
7 F 17 A
G T 0 
H T 3 G
Dijkstra’s algorithm

2
Select minimum distance
3
5 F C K dv pv
10
A 7 3 A T 7 H
8 4
18 B T 12 H
4
B D
9 C T 16 B
10
H D T 2 G
2 9 25
3 E 22 B
G E
7 F 17 A
G T 0 
H T 3 G
Dijkstra’s algorithm

2
Update unselected nodes
3
5 F C K dv pv
10
A 7 3 A T 7 H
8 4
18 B T 12 H
4
B D
9 C T 16 B
10
H D T 2 G
2 9 25
3 E 22 B
G E
7 F 17 A
G T 0 
H T 3 G
Dijkstra’s algorithm

2
Select minimum distance
3
5 F C K dv pv
10
A 7 3 A T 7 H
8 4
18 B T 12 H
4
B D
9 C T 16 B
10
H D T 2 G
2 9 25
3 E 22 B
G E
7 F T 17 A
G T 0 
H T 3 G
Dijkstra’s algorithm

2
Update unselected nodes
3
5 F C K dv pv
10
A 7 A T 7 H
8 4
18 B T 12 H
4
B D
9 C T 16 B
10
H D T 2 G
2 9 25
3 E 19 F
G E
7 F T 17 A
G T 0 
H T 3 G
Dijkstra’s algorithm

2
Select minimum distance
3
5 F C K dv pv
10
A 7 A T 7 H
8 4
18 B T 12 H
4
B D
9 C T 16 B
10
H D T 2 G
2 9 25
3 E T 19 F
G E
7 F T 17 A
G T 0 
H T 3 G

Done
Dijkstra’s-Example

Distance(source) = 0 0 ∞ Distance (all vertices


A
2
B to source) = ∞

4 1 3 10

2 2
∞ C D E ∞

5 8 ∞ 4 6

1
F G

∞ ∞

Pick vertex in List with minimum distance.


Distance Vector Routing

Distance to Node
Info at
1
B C
node A B C D E
7
A 0 7   1
A B C 7
8 2 0 1  8
D  1 0 2 
1
E 2 D E   2 0 2
1 8  2 0
Distance Vector Routing
D sends vector to E
Iʼm 2 from C, 0
from D and 2 from
E
Distance to Node
Info at
1
B C
node A B C D E
7
A 0 7   1
A B
8 2 7 0 1  8
C  1 0 2 
1
E 2 D D   2 0 2
E 1 8 4 2 0
D is 2 away, 2+2< ,
so best path to C is 4
Distance Vector Routing
B sends vector to A
Iʼm 7 from A, 0
from B, 1 from C &
8 from E
Distance to Node
Info at
1
B C
node A B C D E
7
A 0 7 8  1
A B
8 2 7 0 1  8
C  1 0 2 
1
E 2 D D   2 0 2
E 1 8 4 2 0
B is 7 away, 1+7<  so
best path to C is 8
Distance Vector Routing
E sends vector to A
E is 1 away, 4+1<8
so C is 5 away, 1+2<
 so D is 3 away
Distance to Node
Info at
1
B C
node A B C D E
7
A 0 7 5 3 1
A B
8 2 7 0 1  8
C  1 0 2 
1
E 2 D D   2 0 2
E 1 8 4 2 0
Iʼm 1 from A, 8 from B, 4
from C, 2 from D & 0 from E
Distance Vector Routing
…until Convergence

Distance To Node
Info at
1
B C
node A B C D E
7
A 0 6 5 3 1
A B
8 2 6 0 1 3 5
C 5 1 0 2 4
1
E 2 D D 3 3 2 0 2
E 1 5 4 2 0
Distance Vector Routing

Node B’s distance vectors

Next hop
Dest A E
B 1 C
7
C
A 6
A 8 2 C 1
D 3
1
E 2 D E 5
Distance Vector Routing
Handling Link Failure
• A marks distance to E as  , and tells B
• E marks distance to A as  , and tells B and
D
• B and D recompute routes and tell C, E and E
• etc… until converge Info at Distance to Node
1 node
B C
A B C D E
7

A 8 2
A 0 7 8 10 12
B 7 0 1 3 5
1
E 2 D
C 8 1 0 2 4
D 10 3 2 0 2
E 12 5 4 2 0
Distance Vector Routing-Example

Distance(source) = 0 0 ∞ Distance (all vertices


A
2
B to source) = ∞

4 1 3 10

2 2
∞ C D E ∞

5 8 ∞ 4 6

1
F G

∞ ∞

Pick vertex in List with minimum distance.


Distance Vector Routing
Distance Vector Routing
– Each node knows the distance (=cost) to its directly connected neighbors
– A node sends a list to its neighbors with the current distances to all nodes
– Idea:
– Tell neighbors about learned distances to all destinations
– If all nodes update their distances, the routing tables eventually converge
Distance Vector vs. Link State Routing
• With distance vector routing, each node has information only about the next hop:
• Node A: to reach F go to B
• Node B: to reach F go to D
• Node D: to reach F go to E
• Node E: go directly to F

• Distance vector routing makes


poor routing decisions if
directions are not completely
correct
(e.g., because a node is down).

• If parts of the directions incorrect, the routing may be incorrect until the routing algorithms has re-converged.

AA BB CC

DD EE FF
Distance Vector vs. Link State Routing
• In link state routing, each node has a complete map of the topology (Link state information must be flooded to all nodes).

• If a node fails, each


node can calculate
the new route.
• Guaranteed to converge

• Difficulty: All nodes need to


have a consistent view of the
network

A B C A B C A B C

D E F D E F D E F

AA BB CC

DD EE FF
A B C
A B C A B C

D E F
D E F D E F
Link State Routing
• Each router creates a link state packet (LSP) which contains names (e.g. network addresses) and cost to each of its neighbours

– The LSP is transmitted to all other routers, who each update their own records.

– When a routers receives LSPs from all routers, it can use (collectively) that information to make topology-level decisions
Link State Packets
• LSPs are generated and distributed when:
– A time period passes(proactive routing)
– New neighbours connect to the router
– The link cost of a neighbour has changed
– A link to a neighbour has failed (link failure)
– A neighbour has failed (node failure)

• Distribution of LSPs can be difficult


– Routers themselves are the means for delivering messages
– How do routers deliver their own messages, particularly when routers are in an inconsistent state
• e.g. During link failure, before each router has been notified of the problem
Link State Packets
• One method for LSP distribution: Flooding
– Each LSP received is transmitted to every direct neighbour (except the neighbour where the LSP came from)
– This creates an exponential number of packets on the network.
– It does, however, guarantee that the LSP will be received by every router
• Disadvantage of flooding:
• Possibility of count-to-infinity (Infinite Loops)
• Routers may receive the same LSP from multiple routers
Link State Packets
• An improvement to the flooding is as follows:
• When an LSP is received, it’s sequence number is
compared with the stored copy
– If it is identical to the stored copy, it is dropped
– If it is different, the stored LSP is overwritten with the new LSP
and the LSP is transmitted to every direct neighbour (except the
source of the LSP)
• This scheme works because if a given router has
already received a LSP from another neighbour, it will
have also already distributed the LSP to all of its
neighbours
Link State Routing Algorithm
• Ok, now that we know how to distribute LSPs, how are they used to determine routes?

– The algorithm used was developed by Dijkstra.

– Essentially, the algorithm runs at each router, computing each possible path to the destination, adding up each cost

• The path with the lowest cost is used


Operation of a Link State Routing protocol

Dijkstra’s
Received Link State Algorithm IP Routing
LSAs Database Table

LSAs are flooded


to other interfaces
Dijkstra’s LSR Algorithm
a) Consider the following network:

6 2
A B C 5
2 1 2 G
2 4
D E F 1

Link state database:


A B C D E F G
B 6 A 6 B 6 A 2 B 1 C 2 C 5
D 2 C 2 F 2 E 2 D 2 E 4 F 1
E 1 G 5 F 4 G 1
Dijkstra’s LSR Algorithm
a) Now, if we want to generate a PATH for C:
– First, we add (C,0,0) to PATH

C (0)
Dijkstra’s LSR Algorithm
a) Examine C’s LSP
– Add F, G, and B to TENT

C (0)

(2) F G (5) B (2)


Dijkstra’s LSR Algorithm
a) Place F in PATH (shown as solid line)
– Add G and E to TENT (adding costs)

C (0)

(2) F G (5) B (2)

(3) G (6)
E
Dijkstra’s LSR Algorithm
a) G exists in TENT twice, keep only the best
– The new G is a better path than the old (3 < 5)

C (0)

(2) F G (5) B (2)

(3) G (6)
E
Dijkstra’s LSR Algorithm
a) Put B into path (shown as solid line)
– Add A and E to TENT

C (0)

(2) F B (2)

(3) G (6) (3) A (8)


E E
Dijkstra’s LSR Algorithm
a) E exists in TENT twice, keep only the best
– The new E is better than the old (3 < 6)

C (0)

(2) F B (2)

(3) G (6) (3) A (8)


E E
Dijkstra’s LSR Algorithm
a) Place E in PATH (shown as solid line)
– Add D to TENT

C (0)

(2) F B (2)

(3) G (3) A (8)


E

(5)
D
Dijkstra’s LSR Algorithm
a) Place G in PATH (shown as solid line)
– All G’s LSP elements already exist in TENT

C (0)

(2) F B (2)

(3) G (3) A (8)


E

(5)
D
Dijkstra’s LSR Algorithm
a) Place D in PATH (shown as solid line)
– Add path to A since it is better than old A

C (0)

(2) F B (2)

(3) G (3) A (8)


E

(5)
D

A (7)
Dijkstra’s LSR Algorithm
a) Place A in PATH (shown as solid line)
– All A’s LSP elements already exist in PATH

C (0)

(2) F B (2)

(3) G (3)
E

(5)
D

A (7)
Dijkstra’s LSR Algorithm
a) We are done since all routes from TENT
were placed into PATH

C (0)

(2) F B (2)

(3) G (3)
E

(5)
D

A (7)
Dijkstra’s LSR Algorithm
• We can now create a forwarding database:

Forwarding
Database
C (0)
Destinatio Port
(2) F n
B (2)
C C
(3) G (3) F F
E
G F
(5) B B
D
E B
D B
A (7)
A B
Wireless Networks
• Two types of wireless networks:
– infrastructured network:
• base stations are the bridges
• a mobile host will communicate with the nearest base station
• handoff is taken when a host roams from one base to another
– ad hoc network:
• infrastructureless: no fixed base stations
• without the assistance of base stations for communication
• Due to transmission range constraint,
– two MHs need multi-hop routing for communication
• quickly and unpredictably changing topology
MANET
• MANET = Mobile Ad Hoc Networks
– a set of mobile hosts, each with a transceiver
– no base stations; no fixed network infrastructure
– multi-hop communication
– needs a routing protocol which can handle changing topology
Applications of MANET
• battlefields

• nature disaster areas

• fleet in oceans

• historical cites

• festival ground
On-demand vs. Table-driven

 Table-Driven Routing Protocol:


proactive!!
continuously evaluate the routes
attempt to maintain consistent, up-to-date routing
information
 when a route is needed, one may be ready immediately
when the network topology changes
 the protocol responds by propagating updates throughout the
network to maintain a consistent view
• Source-Initiated On-Demand Routing Protocol:
– reactive!!
– on-demand style: create routes only when it is desired by the source node
• route discovery: invoke a route-determination procedure
• the procedure is terminated when
– a route has been found
– no route is found after all route permutations are examined
– longer delay: sometimes a route may not be ready for use immediately when data packets come
AODV Concepts
• Pure on-demand routing protocol
– A node does not perform route discovery or maintenance until it needs a route to another node or it offers its services as an intermediate node
– Nodes that are not on active paths do not maintain routing information and do not participate in routing table exchanges.
– Routes are based on dynamic table entries maintained at intermediate nodes
RREQ-Path discovery (1/5)
• Initiated, when node needs to communicate with
new node (no routing information in table)
• Route Request (RREQ) packet is broadcasted to
network
• An expanding ring search should be used
– TTL (Time to live) parameter in IP-header sets the lifetime
in hops for packets
– TTL is first small and is then increased, if a route is not
found until a limit is reached

64 bits
RREQ

ctrl_info hop_cnt broadcast_id (RREQ_id)


dest_addr dest_seq_num 192 bits
source_addr source_seq_num
Path discovery (2/5)

• Example: Node A
A
needs to communicate
RREQ
with F
RREQ B
• RREQ A->F is released
C
to network
D • Neighbors C and B
receive RREQ and
E F learn route to A
Path discovery (3/5)
• Intermediate nodes C
and B do not have route
to F
A • RREQ is broadcasted
forward with increased
B hop count only if hop
limit is not yet reached
C • A receives it’s own
D RREQ
– paths to B and C are formed
– RREQ is discarded
F • Intermediate node D
E receives multiple copies
of RREQ form A
– Direct routes to C and B are
formed
– The first arrived RREQ is
set used to form route to A
(e.g. B here)
Path discovery (4/5)
• D forwards RREQ
A • B and C discard
duplicate RREQ and
B learn route to D
C • Destination node F
D finally gets RREQ

F
E
RREP-Path discovery (5/5)
• Route reply packet (RREP) is
sent back to node A along
reverse route
A – In fact any node, which has a
RREP fresh route to destination can
B send RREP and therefore end
route search
C RREP • Active forward path from A to
F is created
D – Intermediate nodes also have
now active forward path to F
RREP • Route is ready for data
transmission
E F

64 bits
ctrl_info hop_cnt
RREP

dest_addr dest_seq_num 160 bits


source_addr lifetime
Routing tables
Dest Nex hop Num hops Exp time Seq num dest Active neighbors
B B 1 10 s
C C 1 3s
F B 3 20 s

A Dest Nex hop Num hops Exp time Seq num dest Active neighbors
A A 1 10 s
B D
F
D
D
1
2
3s
20 s

C Dest
C
Nex hop
C
Num hops Exp time Seq num dest
1 3s
Active neighbors

E E 1 3s
D A
B
B
B
2
1
10 s
10 s
F F 1 20 s

Dest Nex hop Num hops Exp time Seq num dest Active neighbors

E F D
A
D
D
1
3
10 s
10 s

 Route expiration times are updated when route is used


 Routes in AODV are in fact virtual routes!
o a single node do not know the complete route and therefore
“route control” is distributed
Path maintenance (original AODV)
a) Example: Link D<->F is
broken due to movement of
A F
RREP (lost node)
B b) A special RREP(Route
Error-RERR) is send
C RREP (lost node)
upstream in path
RREP (lost node)
D (now B->A)
RREP (lost node)
– hop_count to lost destination
lost link (now F) is set to ∞
E F c) From RREP node A sees a
broken link towards F
– New route is searched as in
initial route search (RREQ)
F if needed
Dynamic Source Routing (DSR) -
Introduction
• Reactive or On Demand Developed at CMU in 1996
• Route discovery cycle used for route finding – on
Demand
• Utilizes source routing (entire route is part of the
header)
• When node S wants to send a packet to node D, but
does not know a route to D, node S initiates a route
discovery
• Source node S floods Route Request (RREQ)
• Each RREQ, has sender’s address, destination’s
address, and a unique Request ID determined by the
sender
• Each node appends own identifier when forwarding
DSR – Route Discovery

B
RREQ:S
S A
C D

1. Node S needs a route to


D
2. Broadcasts RREQ packet
DSR – Route Discovery

B
RREQ:S
S A
C D

1. Node S needs a route to D


2. Broadcasts RREQ packet
3. Node A receives packet, has no route to D
Rebroadcasts packet after adding its address to
source route
Route Discovery – Node Actions

Upon receiving a RREQ, the node


takes the following actions:
1. if the node is the Target
(Destination) Returns a Route Reply
(RREP) message to the sender
Copies the accumulated route record from
RREQ into RREP
Sender upon receiving RREP, caches the
route in its route cache for subsequent
routing
DSR – Route Discovery

B
RREQ:S, A
S A
RRE C D
Q :S, A
1. Node S needs a route to D
2. Broadcasts RREQ packet
3. Node A receives packet, has no route to D
Rebroadcasts packet after adding its address to
source route
DSR – Route Discovery

B
RREQ: S, A

S A RREQ: S, A
C D

4. Node C receives RREQ, has no route to D


Rebroadcasts packet after adding its address to
source route
DSR – Route Discovery

RREQ: S, A, C
S A
C D

4. Node C receives RREQ, has no route to D


Rebroadcasts packet after adding its address to
source route
DSR – Route Discovery

RREQ: S, A, C
S A
C D

4. Node C receives RREQ, has no route to D


Rebroadcasts packet after adding its address to source
route
5. Node D receives RREQ, unicasts RREP to C
D puts entire route in RREP message
Route Discovery in DSR
Y

Z
S E
F
B
C M L
J
A G
H D
K
I N

Represents a node that has received RREQ for D


from S
Route Discovery in DSR
Y
Broadcast transmission

[S] Z
S E
F
B
C M L
J
A G
H D
K
I N

Represents transmission of
RREQ
[X,Y] Represents list of identifiers appended to
RREQ
Route Discovery in DSR
Y

Z
S [S,E]
E
F
B
C M L
J
A [S,C] G
H D
K
I N

Node H receives packet RREQ from two


neighbors: potential for collision
Route Discovery in DSR
Y

Z
S E
F [S,E,F]
B
C M L
J
A G
H D
[S,C,G] K
I N

Node C receives RREQ from G and H, but does not


forward it again, because node C has already
forwarded RREQ once
Route Discovery in DSR
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

Nodes J and K both broadcast RREQ to node D


Route Discovery in DSR
Y

Z
S E
[S,E,F,J,M]
F
B
C M L
J
A G
H D
K
I N

Node D does not forward RREQ, because


node D is the intended target of the route
discovery
Route Reply in DSR
Y

Z
S RREP [D,J,F, E,S]
E
F
B
C M L
J
A G
H D
K
I N

Represents RREP control


message
Dynamic Source Routing (DSR)
Node S on receiving RREP, caches the
route included in the RREP

When node S sends a data packet to D,


the entire route is included in the
packet header
hence the name source routing

Intermediate nodes use the source


route included in a packet to determine
to whom a packet should be forwarded
5-31
Data Delivery in DSR
Y

DATA [S,E,F,J,D] Z
S E
F
B
C M L
J
A G
H D
K
I N

 Packet header size grows with route


length

You might also like