Download
slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
AODV in ns-2 PowerPoint Presentation
Download Presentation
AODV in ns-2

AODV in ns-2

320 Vues Download Presentation
Télécharger la présentation

AODV in ns-2

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

    1. AODV in ns-2 Fan Bai Computer Network Lab

    2. AODV On-demand protocol, similar to DSR Basic idea Integrate DSDV(hop by hop) and DSR (on demand) The routing table only maintains the routing information needed, instead of keeping the entire routing table (like DSR) The routing information is recorded into the routing table of the intermediate router along the path, so the data packet only contains the destination address (like DSDV) Two phases: Route Discovery & Route Maintenance

    3. Route Discovery Route discovery stage When the route is needed, the source sends the RREQ packet in a controlled flooding manner throughout the network Intermediate node checks its routing table If with the routing information, reply to destination with the RREP packet otherwise, the intermediate forwards RREQ packet to its neighbors Finally, the destination or some intermediate nodes will reply the routes to the source

    5. Route Maintenance Route Maintenance Stage The following schemes can detect the link breakage hop-by-hop MAC layer ACK Hello message After detecting the link breakage, the upstream node will notify the source with an RERROR packet source will initialize a new route discovery stage and flood the RREQ packet Optimization: in ns-2.1b8a, the upstream node can directly flood the RREQ packet as well as notify source to eliminate the invalid route entry

    7. Ns-2.1b8a /aodv Files: aodv.h: Key component aodv.cc: Key component aodv_packet.h Aodv_logs.cc

    8. Neighbor Management Link list to maintain the neighbor set void nb_insert(nsaddr_t id) Insert a node(id) into neighbor list Neighbor* nb_lookup(nsaddr_t id) Return the pointer to node(id) within neighbor list void nb_delete(nsaddr_t id) Delete the node(id) from the neighbor list void nb_purge() Periodically purge all neighbors expire

    9. Routing Table Management Link list to maintain the routing table Void rt_resolve(Packet *p) add/repair/purge rt, queue/forward packet Void rt_ll_failed(Packet *p) Call local_rt_repair() or rt_down() Void rt_down(rt_entry *rt) Send RERROR packet to src, delete node from neighbor list Void local_rt_repair(rt_entry *rt,Packet *p) Flood RREQ within network Void rt_purge(void)

    10. Receive Function void recvAODV(Packet* p) Classifier, only for control packet void recvRequest(Packet* p) Establish reverse path if new route or better route check whether node has route(cache or dest) then forward or reply void recvReply(Packet* p) Establish forward path if new route or better route Forward/discard the RREP and forward data packet void recvTriggeredReply(Packet* p) Bring down the link rt_down() void recvHello(Packet* p) Maintain the neighborhood

    11. Transmit Function void forward(rt_entry* rt, Packet* p, double delay) Set delay, check TTL, send it to neighbor void sendRequest(nsaddr_t dst) Form RREQ packet, ERS to flood it void sendReply() Form RREP packet, schedule and send it void sendTriggeredReply(nsaddr_t rpdst, u_int32_t rpseq) Form RERROR packet, schedule and send it void sendHello()