12.07.2015 Views

Wireless Ad Hoc and Sensor Networks

Wireless Ad Hoc and Sensor Networks

Wireless Ad Hoc and Sensor Networks

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

370 <strong>Wireless</strong> <strong>Ad</strong> <strong>Hoc</strong> <strong>and</strong> <strong>Sensor</strong> <strong>Networks</strong>sum: Costs, last−hop+ Clast−hop , destination , <strong>and</strong> compare with thecost of the old route in the routing table, corresponding tothe same destination address.• If the new cost is less than the old cost, then erase theold entry in the RT()s , <strong>and</strong> record a new route entry inthe RT()s , with fields for the entry computed similar tostep a.According to the above algorithm, initially start with an empty routingtable for the source node step 1. In step 2, enter routing table entries forall the one-hop neighbors, present in the “neighbor table.” Next (step 3)iterate through the “topology table” to find the entries (destinations) thatare reachable in one hop from a node for which the route has been enteredin the previous iteration (this becomes the new route for the destination).Then check to see if the destination already has an entry in the routingtable. If a routing table entry does not exist for that destination (step 3a),enter the new route in the routing table. Otherwise, if a route alreadyexists to that destination (step 3b), calculate the cost of the new route <strong>and</strong>compare with the existing route. If the new cost is less than the old costto reach the destination, then replace the old routing table entry with thenew route. Repeat this process (step 3), until the optimal routes are foundto all the destinations in the network topology. An example is presentednext to illustrate the routing table calculation.Example 8.3.2: Routing Table Algorithm IllustrationTo illustrate the routing table calculation algorithm, consider the networktopology shown in Figure 8.1 <strong>and</strong> Figure 8.2. Figure 8.5 shows the resultof routing table calculations using the shortest hops method of the OLSRp 2p 15 45p 33 n 1n 2 25 6n 4p 85p 74 67s5n 3n 5 6p4p 5p 6FIGURE 8.5“Shortest hops path” using the OLSR protocol.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!