ad hoc on-demand distance vector (aodv) routing protocol

31
Ad hoc On-demand Ad hoc On-demand Distance Vector Distance Vector (AODV) Routing (AODV) Routing Protocol Protocol ECE 695 ECE 695 Spring 2006 Spring 2006

Upload: craig-howe

Post on 30-Dec-2015

113 views

Category:

Documents


9 download

DESCRIPTION

Ad hoc On-demand Distance Vector (AODV) Routing Protocol. ECE 695 Spring 2006. AODV Overview. AODV is a packet routing protocol designed for use in mobile ad hoc networks (MANET) Intended for networks that may contain thousands of nodes One of a class of demand-driven protocols - PowerPoint PPT Presentation

TRANSCRIPT

Ad hoc On-demand Ad hoc On-demand Distance Vector (AODV) Distance Vector (AODV)

Routing ProtocolRouting Protocol

ECE 695 ECE 695

Spring 2006Spring 2006

AODV OverviewAODV Overview AODV is a packet routing protocol designed for AODV is a packet routing protocol designed for

use in mobile ad hoc networks (MANET)use in mobile ad hoc networks (MANET) Intended for networks that may contain Intended for networks that may contain

thousands of nodesthousands of nodes One of a class of One of a class of demand-drivendemand-driven protocols protocols

• The The route discoveryroute discovery mechanism is invoked only if a mechanism is invoked only if a route to a destination is not knownroute to a destination is not known

UDPUDP is the transport layer protocol is the transport layer protocol Source, destination Source, destination andand next hop next hop are addressed are addressed

using using IP addressingIP addressing Each node maintains a Each node maintains a routing tablerouting table that contains that contains

information about reaching destination nodes.information about reaching destination nodes.• Each entry is keyed to a destination node.Each entry is keyed to a destination node.

Routing Table FieldsRouting Table Fields

Destination IP addressDestination IP address Destination Sequence NumberDestination Sequence Number Valid Destination Sequence Number FlagValid Destination Sequence Number Flag Other state and routing flagsOther state and routing flags Network InterfaceNetwork Interface Hop Count (needed to reach destination)Hop Count (needed to reach destination) Next HopNext Hop Precursor ListPrecursor List Lifetime (route expiration or deletion time)Lifetime (route expiration or deletion time)

Overview (continued)Overview (continued) Routing table size is minimized by only including Routing table size is minimized by only including

next hop information, not the entire route to a next hop information, not the entire route to a destination node.destination node.

Sequence numbers for both destination and Sequence numbers for both destination and source are used.source are used.

Managing the sequence number is the key to Managing the sequence number is the key to efficient routing and route maintenanceefficient routing and route maintenance• Sequence numbers are used to indicate the relative Sequence numbers are used to indicate the relative

freshnessfreshness of routing information of routing information• Updated by an originating node, e.g., at initiation of Updated by an originating node, e.g., at initiation of

route discovery or a route reply.route discovery or a route reply.• Observed by other nodes to determine freshness.Observed by other nodes to determine freshness.

Overview (continued)Overview (continued)

The basic message set consists of:The basic message set consists of:• RREQ – Route requestRREQ – Route request• RREP – Route replyRREP – Route reply• RERR – Route errorRERR – Route error• HELLO – For link status monitoringHELLO – For link status monitoring

AODV Operation – Message TypesAODV Operation – Message Types

RREQ MessagesRREQ Messages• While communication routes between nodes While communication routes between nodes

are valid, AODV does not play any role.are valid, AODV does not play any role.• A RREQ message is broadcasted when a node A RREQ message is broadcasted when a node

needs to discover a route to a destination.needs to discover a route to a destination.• As a RREQ propagates through the network, As a RREQ propagates through the network,

intermediate nodes use it to update their intermediate nodes use it to update their routing tables (in the direction of the source routing tables (in the direction of the source node).node).

• The RREQ also contains the most recent The RREQ also contains the most recent sequence number for the destination.sequence number for the destination.

• A valid destination route must have a A valid destination route must have a sequence number at least as great as that sequence number at least as great as that contained in the RREQ.contained in the RREQ.

RREQ MessageRREQ Message

BB??

BB?? BB

??BB

??

BB??

BB??

BB??

BB

AA

AODV Operation – Message TypesAODV Operation – Message Types

RREP MessagesRREP Messages• When a RREQ reaches a destination node, the When a RREQ reaches a destination node, the

destination route is made available by destination route is made available by unicasting a RREP back to the source route.unicasting a RREP back to the source route.

• A node generates a RREP if:A node generates a RREP if: It is itself the destination.It is itself the destination. It has an active route to the destination. Ex: an It has an active route to the destination. Ex: an

intermediate node may also respond with an RREP if intermediate node may also respond with an RREP if it has a “fresh enough” route to the destination.it has a “fresh enough” route to the destination.

• As the RREP propagates back to the source As the RREP propagates back to the source node, intermediate nodes update their routing node, intermediate nodes update their routing tables (in the direction of the destination tables (in the direction of the destination node).node).

RREP MessageRREP Message

BB

AA

AA

AA

AA

AA

AA

AA

AODV Operation – Message TypesAODV Operation – Message Types

RERR MessagesRERR Messages• This message is broadcast for broken This message is broadcast for broken

linkslinks

• Generated directly by a node or passed Generated directly by a node or passed on when received from another nodeon when received from another node

AODV Operation – Message TypesAODV Operation – Message Types

Hello MessagesHello Messages• Hello Message = RREP with TTL = 1Hello Message = RREP with TTL = 1• This message is used for broadcasting This message is used for broadcasting

connectivity information. connectivity information. Ex: If a neighbor node does not receive any packets Ex: If a neighbor node does not receive any packets

(Hello messages or otherwise) for more than (Hello messages or otherwise) for more than ALLOWED_HELLO_LOSS * HELLO_INTERVAL ALLOWED_HELLO_LOSS * HELLO_INTERVAL mseconds, the node will assume that the link to this mseconds, the node will assume that the link to this neighbor is currently lost.neighbor is currently lost.

• A node should use Hello messages only if it is A node should use Hello messages only if it is part of an active route. part of an active route.

Message routingMessage routing

A

B D

FC

G

E

RREQ

RREQ

RREQ

RREQ

RREQ

RREQRREQ

RREQ

RREQ

RREP

RREP

RREP

Source

Destination

Congestion HandlingCongestion Handling

One method that AODV handle congestion One method that AODV handle congestion is:is:• If the source node receives no RREP from the If the source node receives no RREP from the

destination, it may broadcast another RREQ, destination, it may broadcast another RREQ, up to a maximum of RREQ_RETRIES.up to a maximum of RREQ_RETRIES.

• For each additional attempt that a source node tried to For each additional attempt that a source node tried to broadcast RREQ, the waiting time for the RREP is broadcast RREQ, the waiting time for the RREP is multiplied by 2.multiplied by 2.

DSR is not capable of handling congestion.DSR is not capable of handling congestion.

Congestion HandlingCongestion Handling

Other possible methods to improve AODV Other possible methods to improve AODV congestion handling:congestion handling:• A route may predict when congestion is about A route may predict when congestion is about

to occur and try to avoid it by reduce the to occur and try to avoid it by reduce the transmission rate.transmission rate.

• Schedule the requests so that it will not Schedule the requests so that it will not overload the network.overload the network.

AODV RoutingAODV Routing There are two phasesThere are two phases

• Route Discovery.Route Discovery.• Route Maintenance.Route Maintenance.

Each node maintains a routing table with knowledge about Each node maintains a routing table with knowledge about the network.the network.

AODV deals with route table management.AODV deals with route table management. Route information maintained even for short lived routes – Route information maintained even for short lived routes –

reverse pointers.reverse pointers.

Entries in Routing TableEntries in Routing Table Destination IP Address Destination IP Address Destination Sequence Number Destination Sequence Number Valid Destination Sequence Number flagValid Destination Sequence Number flag Other state and routing flags (e.g., valid, invalid, repairable, Other state and routing flags (e.g., valid, invalid, repairable,

being repaired) being repaired) Network InterfaceNetwork Interface Hop Count (number of hops needed to reach destination)Hop Count (number of hops needed to reach destination) Next Hop Next Hop List of Precursors List of Precursors Lifetime (expiration or deletion time of the route) Lifetime (expiration or deletion time of the route)

DSR maintains additional table entries, causing a larger DSR maintains additional table entries, causing a larger memory overheadmemory overhead

DiscoveryDiscovery Broadcast RREQ messages.Broadcast RREQ messages. Intermediate nodes update their routing tableIntermediate nodes update their routing table Forward the RREQ if it is not the destination.Forward the RREQ if it is not the destination. Maintain back-pointer to the originator.Maintain back-pointer to the originator. Destination generates RREQ message.Destination generates RREQ message. RREQ sent back to source using the reverse RREQ sent back to source using the reverse

pointer set uppointer set upby the intermediate nodes.by the intermediate nodes.

RREQ reaches destination, communication starts.RREQ reaches destination, communication starts.

Algorithm for DiscoveryAlgorithm for Discovery

@Originator@Originator If a route to the destination is available, start sending data.If a route to the destination is available, start sending data. Else generate a RREQ packet. Increment the RREQID by Else generate a RREQ packet. Increment the RREQID by

1.Increment the sequence number by 1.Destination IP 1.Increment the sequence number by 1.Destination IP address ,currently available sequence number included.address ,currently available sequence number included.

@Intermediate Node@Intermediate Node Generate route reply, if a 'fresh enough' route is a valid Generate route reply, if a 'fresh enough' route is a valid

route entry for the destination whose associated sequence route entry for the destination whose associated sequence number is at least as great as that contained in the RREQ. number is at least as great as that contained in the RREQ. Change the sequence number of the destination node if Change the sequence number of the destination node if stale, increment the hop count by 1 and forward.stale, increment the hop count by 1 and forward.

@Destination 1.Increment sequence number of the @Destination 1.Increment sequence number of the destination. 2.Generate a RREQ message and sent back to destination. 2.Generate a RREQ message and sent back to Originator.Originator.

DiscoveryDiscovery

MaintenanceMaintenance Hello messages broadcast by Hello messages broadcast by active active nodes periodically nodes periodically

HELLO_INTERVAL.HELLO_INTERVAL. No hello message from a neighbor in DELETE_PERIOD,link No hello message from a neighbor in DELETE_PERIOD,link

failure identified.failure identified. A local route repair to that next hop initiated.A local route repair to that next hop initiated. After a timeout ,error propagated both to originator and After a timeout ,error propagated both to originator and

destination.destination. Entries based on the node invalidated.Entries based on the node invalidated.

Information “Freshness” Information “Freshness” AssuredAssured

Each originating node maintains a monotonically Each originating node maintains a monotonically increasing sequence number.increasing sequence number.

Used by other nodes to determine the freshness of Used by other nodes to determine the freshness of the information.the information.

Every nodes routing table contains the latest Every nodes routing table contains the latest information available about the sequence number information available about the sequence number for the IP address of the destination node for which for the IP address of the destination node for which the routing information is maintained.the routing information is maintained.• Updated whenever a node receives new information Updated whenever a node receives new information

about the sequence number from RREQ, RREP, or about the sequence number from RREQ, RREP, or RERR messages received related to that destination.RERR messages received related to that destination.

Information “Freshness” Information “Freshness” AssuredAssured

AODV depends on each node in the network to own AODV depends on each node in the network to own and maintain its destination sequence number.and maintain its destination sequence number.

A destination node increments its own sequence A destination node increments its own sequence number immediately before it originates a route number immediately before it originates a route discoverydiscovery

A destination node increments its own sequence A destination node increments its own sequence number immediately before it originates a RREP in number immediately before it originates a RREP in response to a RREQresponse to a RREQ

The node treats its sequence number as an The node treats its sequence number as an unsigned number when incrementing unsigned number when incrementing accomplishing sequence number rollover.accomplishing sequence number rollover.

Destination information is assured by comparing Destination information is assured by comparing the sequence number of the incoming AODV the sequence number of the incoming AODV message with its sequence number for that message with its sequence number for that destination.destination.

RERR MessagesRERR Messages

• Message is broadcasted when:Message is broadcasted when:i.i. A node detects that a link with adjacent A node detects that a link with adjacent

neighbor is broken (destination no longer neighbor is broken (destination no longer reachable).reachable).

ii.ii. If it gets a data packet destined to a node If it gets a data packet destined to a node for which it does not have an active route for which it does not have an active route and is not repairing.and is not repairing.

iii.iii. If it receives a RERR from a neighbor for If it receives a RERR from a neighbor for one or more active routes.one or more active routes.

RERR Processing (for above RERR Processing (for above broadcasts)broadcasts)

• Build Affected Destination ListingBuild Affected Destination Listingi.i. List unreachable destinations containing List unreachable destinations containing

unreachable neighbor & destination using unreachable neighbor & destination using unreachable as next hopunreachable as next hop

ii.ii. Only one unreachable destination, which node Only one unreachable destination, which node already has.already has.

iii.iii. List of nodes where RERR is next hopList of nodes where RERR is next hop

• Update informationUpdate information

• Transmit RERR for each item listedTransmit RERR for each item listed

RERR – information updateRERR – information update

• Destination Sequence #Destination Sequence #- Update sequence # for case i and iiUpdate sequence # for case i and ii- Copy sequence # for case iiiCopy sequence # for case iii

• Invalidate route entryInvalidate route entry

• Update Lifetime field as (currtime + Update Lifetime field as (currtime + DELETE_PERIOD)DELETE_PERIOD)

• Only now may route entry be deletedOnly now may route entry be deleted

RERR message transmissionRERR message transmission

• UnicastUnicast- Send RERR to single recipientSend RERR to single recipient

• Unicast iteritiveUnicast iteritive- Send RERR to a number of recipients Send RERR to a number of recipients

individuallyindividually

• BroadcastBroadcast- Notify multiple recipients simultaniouslyNotify multiple recipients simultaniously- Broadcast via 255.255.255.255 TTL = 1Broadcast via 255.255.255.255 TTL = 1

RERR message transmissionRERR message transmission

• UnicastUnicast A A node detectsnode detects that a link with adjacent that a link with adjacent

neighbor is broken (destination no longer neighbor is broken (destination no longer reachable).reachable).

If it gets a data packet destined to a node If it gets a data packet destined to a node for which it does not have an active route for which it does not have an active route and is not repairing.and is not repairing.

If it receives a RERR from a neighbor for one If it receives a RERR from a neighbor for one or more active routes.or more active routes.

• Unicast iteritiveUnicast iteritive• BroadcastBroadcast

How Broken Links are HandledHow Broken Links are Handled

All nodes directly using the broken All nodes directly using the broken link get a RERR packet.link get a RERR packet.

Then those nodes sends the RERR Then those nodes sends the RERR packet to their predecessor nodes.packet to their predecessor nodes.

This is continued all the way to the This is continued all the way to the source nodes.source nodes.

How Broken Links are Handled How Broken Links are Handled (Cont)(Cont)

Upon completion of sending the Upon completion of sending the RERR packet through the source RERR packet through the source node will no longer use the link.node will no longer use the link.• AODV uses loop free-routes.AODV uses loop free-routes.• There are only a finite number of nodes There are only a finite number of nodes

in a ad-hoc network.in a ad-hoc network.

How Broken Links are Handled How Broken Links are Handled (Cont)(Cont)

DSR does not remove the path as DSR does not remove the path as well.well.• In DSR nodes in the network can still In DSR nodes in the network can still

think the broken link is still valid.think the broken link is still valid.• This can lead to having to search for This can lead to having to search for

new paths multiple times.new paths multiple times.

Reestablishing a LinkReestablishing a Link

The source node can restart the The source node can restart the discovery process if a path is still discovery process if a path is still needed.needed.

The source node or any node on the The source node or any node on the path can rebuild the route by sending path can rebuild the route by sending out a RREQ.out a RREQ.