Diffusing update algorithm


The diffusing update algorithm is the algorithm used by Cisco's EIGRP routing protocol to ensure that a given route is recalculated globally whenever it might cause a routing loop. It was developed by J.J. Garcia-Luna-Aceves at SRI International. The full name of the algorithm is DUAL finite-state machine. EIGRP is responsible for the routing within an autonomous system, and DUAL responds to changes in the routing topology and dynamically adjusts the routing tables of the router automatically.
EIGRP uses a feasibility condition to ensure that only loop-free routes are ever selected. The feasibility condition is conservative: when the condition is true, no loops can occur, but the condition might under some circumstances reject all routes to a destination although some are loop-free.
When no feasible route to a destination is available, the DUAL algorithm invokes a diffusing computation to ensure that all traces of the problematic route are eliminated from the network. At which point the normal Bellman–Ford algorithm is used to recover a new route.

Operation

DUAL uses three separate tables for the route calculation. These tables are created using information exchanged between the EIGRP routers. The information is different than that exchanged by link-state routing protocols. In EIGRP, the information exchanged includes the routes, the "metric" or cost of each route, and the information required to form a neighbor relationship. The three tables and their functions in detail are as follows:
DUAL evaluates the data received from other routers in the topology table and calculates the primary and secondary routes. The primary path is usually the path with the lowest metric to reach the destination, and the redundant path is the path with the second lowest cost. There may be multiple successors and multiple feasible successors. Both successors and feasible successors are maintained in the topology table, but only the successors are added to the routing table and used to route packets.
For a route to become a feasible successor, its RD must be smaller than the FD of the successor. If this feasibility condition is met, there is no way that adding this route to the routing table could cause a loop.
If all the successor routes to a destination fail, the feasible successor becomes the successor and is immediately added to the routing table. If there is no feasible successor in the topology table, a query process is initiated to look for a new route.

Example

Legend:
A B C
+ - - - - - + - - - - - +
| |
| |
| |
+ - - - - - +
D E
Now a client on router E wants to talk to a client on router A. That means a route between router A and router E must be available. This route is calculated as follows:
The immediate neighbours of router E are router C and router D. DUAL in router E asks for the reported distance from routers C and D respectively to router A. The following are the results:
The route via C is therefore in the lowest cost. In the next step, the distance from router E to the neighbours are added to the reported distance to get the feasible distance :
DUAL therefore finds that the route via D has the least total cost. Then the route via D will be marked as "successor", equipped with passive status and registered in the routing table. The route via C is kept as a "feasible successor", because its RD is less than the FD of the successor: