# How Routing Algorithms Work

DV Algorithms
A typical network graph and routing table for router J
HowStuffWorks.com

DV algorithms are also known as Bellman-Ford routing algorithms and Ford-Fulkerson routing algorithms. In these algorithms, every router has a routing table that shows it the best route for any destination. A typical graph and routing table for router J is shown at the top of the page.

As the table shows, if router J wants to get packets to router D, it should send them to router H. When packets arrive at router H, it checks its own table and decides how to send the packets to D.

In DV algorithms, each router has to follow these steps:

1. It counts the weight of the links directly connected to it and saves the information to its table.
2. In a specific period of time, it send its table to its neighbor routers (not to all routers) and receive the routing table of each of its neighbors.
3. Based on the information in its neighbors' routing tables, it updates its own.

One of the most important problems with DV algorithms is called "count to infinity." Let's examine this problem with an example:

Imagine a network with a graph as shown below. As you see in this graph, there is only one link between A and the other parts of the network. Here you can see the graph and routing table of all nodes:

Network graph and routing tables
HowStuffWorks.com

This process loops until all nodes find out that the weight of link to A is infinity. This situation is shown in the table below. In this way, experts say DV algorithms have a slow convergence rate.

The "count to infinity" problem
HowStuffWorks.com

One way to solve this problem is for routers to send information only to the neighbors that are not exclusive links to the destination. For example, in this case, C shouldn't send any information to B about A, because B is the only way to A.