Recitation_AODV

Download Report

Transcript Recitation_AODV

Internet Networking
recitation #3
Mobile Ad-Hoc Networks
AODV Routing
Spring Semester 2009, Dept. of Computer Science, Technion
1
2
Mobile Ad-Hoc Networks (MANET)



Ad-hoc networks are useful for providing communication support where
no fixed infrastructure exists or the deployment of a fixed infrastructure is
not economically profitable.
Recently there has been a renewed interest in this field due to common
availability of low-cost laptops and palmtops with radio interfaces.
Ad-hoc networks consists of:




Mobile hosts, each with a wireless communication device
Non fixed communication infrastructure
No base station or any central entity which can follow the locations of the
nodes.
A transmission of a node s can be received by all nodes within its
transmission range -
r
d3
r
s d1
d2
Internet Networking
3
Mobile Ad-Hoc Networks (Cont.)

Mobile nodes form topology changing network without the aid of any
central management.





All the nodes are free to move around
Each node is a router
The network is characterized by multi-hop connectivity.

A broadcast of routing messages may block other participants.
Failures are frequent


Due to node movement
Due to battery depletion
The challenge for routing protocols:


Finding efficient routes between two communicating nodes
Keeping up with the high degree of node mobility that often changes the
network topology drastically and unpredictably.
p
Internet Networking
q
4
Demand-driven Routing Protocols



Creation of routes only when desired by the source node
Done by Route Discovery Process
Route Discovery Process is completed when:



a route is found
all possible routes have been examined
Maintenance of a Route


Until the destination becomes inaccessible along every path
from the source
Until the route is no longer desired
Internet Networking
5
Ad hoc On Demand Vector Routing (AODV) RFC 3561


On demand – Only nodes on an active paths maintain routing
information and exchange routing tables.
A node needs to discover and maintain a route to another node if :



AODV makes use of sequence numbers created by the destination:



the two nodes need to communicate.
it’s an intermediate forwarding station that maintains connectivity
between two other nodes.

To maintain the most recent information between nodes.
To prevent routing loops.
All routing packets carry these sequence numbers.
AODV maintains timer-based states in each node

a routing table entry is “expired” if not used recently.
Internet Networking
6
The protocol - “Route Request” (RREQ)



A source that needs a path to some destination
broadcasts RREQ message enclosed by



a monotonically increasing “broadcast ID” ,
a new “sequence number” of the sender and
a last known “sequence number” of the destination.
The RREQ is broadcast until it reaches a node that has a
route to the destination with “fresh” information.
A RREQ propagating through the network establishes the
next-hop information for the reverse route back to the
source.
Internet Networking
7
The protocol - “Route Response” (RREP)




A “Route Response” (RREP) is generated by the destination


propagates along the reverse route
establishes forward route information at the intermediate nodes.
Each node keeps the next hop for the destination.
Routing table information is restricted to the active nodes.
A neighbor is considered active if it originates or relays at least
one packet for the destination within the most recent active
timeout period.
Internet Networking
8
Maintenance


Failure of a link can be detected via hello messages or link layer
detection.
When link goes down, the upstream nodes are notified of the
failure


the destination is marked as unreachable in the routing tables of
these nodes.
Timers:



Route request expiration timer
Route caching timeout
Active timeout period
Internet Networking
9
Route Discovery Example
B
RREQ
S
A
C
D
Node S needs a route in order to send data packet to D
1. It creates a Route Request (RREQ) along with:
 D’s IP addr, last known D’s seq#.
 S’s IP addr, new S’s seq#.
 hopcount (=0).
2. It broadcasts RREQ to its neighbors
3. Node A receives RREQ
 Makes reverse route entry for S
dest = S, nexthop = S, hopcnt = 1
 It has no route to D, so it continue to broadcast the RREQ
Internet Networking
10
Route Discovery Example (Cont.)
B
RREQ
S
A
C


D
The RREQ is broadcast to nodes B and C
Node C receives RREQ
Makes reverse route entry for S
dest = S, nexthop = A, hopcnt = 2
It has a route to D whereas the seq# of this route is >= seq# in the
RREQ, and it’s life-time counter > 0



Thus – it’s internal table holds a newer information
Internet Networking
11
Route Discovery Example (Cont.)
n
Node C creates a Route Reply (RREP) with:
D’s IP addr
 D’s Sequence #
 S’s Sequence #
 S’s IP addr
 hopcount to D (=1)
 Lifetime
Send the RREP to A



B
RREP
S
A
C
Node A receives the RREP
Makes forward route entry to D
dest = D, nexthop = C, hopcount = 2, Lifetime
 Unicasts RREP to S
Node S receives RREP



RREP
Makes forward route entry to D
dest = D, nexthop = A, hopcount = 3, Lifetime
Internet Networking
D
12
Route Discovery with Multiple Routes Loop preventing
RREPSeq# = x
E
RREPSeq# = x
B
RREPSeq# = x
S
A
RREPSeq# = x
RREPSeq# = x
RREPSeq# = x
RREPSeq# = x
RREPSeq# = x
C



F
G
D
Node C receives replies from D and from B.
The reply from D was received before and was sent to A.
The reply from B will be ignored (it has the same sequence number).
Internet Networking
13
Route Discovery Using Fresh Data




Sequence numbers are used as time stamps
Each message initiated by a node has its own Sequence number
The node that initiate the message increase the Sequence Number
A higher Sequence number means a newer route and allow nodes to
compare how “fresh” is the information
RREQ
D-Seq# =1
S2
B
RREQ
D-Seq# =2
RREQ
D-Seq# =1
S1
D
A
RREP
D-Seq# =2

RREQ with D-Seq#2 from S1 or S2 will cause route info to be sent till D.
Internet Networking
14
Maintenance

If a link breaks down the intermediate node tries to perform a
local repair to the needed destinations.

If it fails, a Route Error message is sent to upstream neighbors.



It lists all the destinations which are now unreachable.
A “DestCount” field is used to indicates the number of unreachable
destinations.
A Node that receives an RERR:




Checks whether the sender is its next hop towards the destination.
Deletes or invalidates the route towards the destination if needed.
Forwards the RERR upstream if needed
Rediscovers route if still needed
Internet Networking
15
Advantages of AODV Protocol






Highly Scalable
Need for broadcast is minimized
Quick response to link breakage in active routes
Loop free routes
Prevents network flooding during discovery
Repairs breaks in active routes locally instead of notifying
source.
Internet Networking