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

0100101010010101111001001010010010100010

1010110101010101010101010101010101010101
0101010101011001010011101001010101010101

Ad-hoc On-Demand
0101010101010101010101011010101010101010
1010101010101010101010101010101010101010

Distance Vector
101010101
010101
101010

101
(AODV)
11110011

100
Routing
1001

01010101010101010
100101111000100100
10101010101000001
1111100110101010
What Does AODV Mean?
• An ad hoc network is a network with no
existing infrastructure
– No routers or access points
– Instead each node acts as a router
• On Demand refers to the nature the
network routes information.
– it only creates and maintains routes b/w
nodes as and when they are necessary and
active
What Does AODV Mean?
(cont.)
• Distance Vector refers to the way in
which routes are implemented
• Routers using distance vector protocol
do not have knowledge of the full path
to the destination
• They have a routing table which
dictates the next node to forward the
information to and the distance to the
destination
What is AODV?
• It’s a routing protocol for wireless ad hoc
networks
• Provides a way for nodes to communicate w/one
another
• Can be directly from one node to another
• Needed when nodes need to talk to nodes they
are not in range with

Node 1 Node Node 3


2
How Does it Work?
• Each node has a routing table
• The table indicates routes to known
destinations
– It stores: destination address, nexthop address,
destination sequence number, and life time.
– Life time is updated each time the route is used
– If the route isn’t used in that time the info is
deleted from the table
• When a node wants to send a packet to another node it checks its
routing table to see if it has a route
– If it does, it forwards it to the next node
– If not, it sends out a Route Request (RREQ) packet
• RREQ contains: source node IP address, and current sequence
number, destination IP address and sequence number, a time to live
number, and a broadcast ID
– Broadcast ID and source IP address is unique to each RREQ
• The RREQ is sent to all nodes it can reach within a time limit
– Limits network congestion
How does it work?
• When an intermediate node receives a RREQ it
logs a reverse route entry in its table
– Includes the destination, the next hop (the next node in
line), the hop count (incremented 0 at the source to
i=number of hops since then)
• If a neighbor of the source doesn’t know a route to
the destination, it rebroadcasts the RREQ.
• If a neighbor does know a route to the destination,
it sends a route reply (RREP) back to the source.
Below, Node 1 is trying to talk to node 5.
RREP

RREQ RRE
RRE
Q Q
Node 3 Node Node 1 Node 4 Node 5
2
How does it work?
continued
• As seen in the last slide, node 4 had
a route to node 5
• Node 5 sends node 1 a RREP along
the route the RREQ came on
• Once node 1 receives the RREP, it
notes the route to node 5
RREP

and sends the packet on that


RRE
Q
Node 1 Node 4 route.
Node 5

Packet Packet
RRE
Q Now we can
Node see it all in
1
action!
Node
2

Node
3
RREP

Node
4

Node
Lets get more specific!
• Sequence Number: Each message contains a
sequence number, which is essentially the age
of the message. This allows nodes to know
how recent a message was sent, and it may
allow nodes to find new, quicker routes.
• Life Span: Each message only last the time
that is specified by its life span. If the
message dies before it reaches the
destination, the source will resend the
message with a longer life span.
And more specific…
• Hello Messages: These are simple
messages that nodes send at certain
time intervals to all its neighbors to
let them know that it is still there. If
a node stops receiving hello
messages from one of its neighbors,
it knows that any routes through that
node no longer exist.
It gets complicated!
• Things get much more complicated
with many nodes. This is because
nodes have many neighbors so RREQ
get rebroadcasted a lot! That’s why
sequence numbers and life spans

are so key.
Error Messages RERR
• RERR are used mainly when nodes get moved
around and connections are lost. If a node
receives a RERR, it deletes all routes
associated with the new error. Error
messages are sent either when a message
(not RREQ or RREP) is sent to a node that has
no route to the destination, or when a route
becomes invalid, or if it cannot communicate
with one of its neighbors.

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