I'm trying to code Ad Hoc On Demand Distance Vector (AODV) Routing Protocol in Matlab. I'll briefly describe how the protocol works:
This protocol can be used for mobile ad hoc networks. The source initiates a route to the destination whose IP is known. The source node broadcasts a Route Request (RREQ) to it's first hop. If any node within the first hop (TTL), knows the the destination, or a route to the destination, a Route Reply (RRP) is forwarded to the source. In case, any route is found broken, a Route Error (RERR) message is generated to the destination. The source selects the shortest (least hop ) path to the destination to deliver the packets. If, the source doesn't get any RREP within a specified time, the TTL is increased and new RREQ is sent开发者_JS百科. The wiki link is here for detail description: [AODV_Wiki][1]
EDIT The coding is entirely dependent on the connection of nodes with each other as was stated in the hint. I'm finalizing the code. I think, Ill upload shortly.
Hint: Distance Vectors algorithms work by maintaining a vector of distances in each network node. The distane vector measures the distance from the current node to every other node in te network. The algorithm works by iteratively updating this vector.
Combining all of these distance vectors into a matrix, you get a matrix where element i,j measures the distance between node i and j.
So I would start with computing the connectivity matrix a[i,j]=1
if i
can directly communicate with j
, 0
otherwise -- and proceed from there.
精彩评论