# Distance-Vector Routing **A [[routing]] protocol type which uses a modified [[Bellman-Ford algorithm]] to find the cheapest route through which data is routed.** **Distance-vector routing** is a type of [[routing]] protocol in which a cost, such as number of hops or [[network delay]], is assigned to every link and data is routed through the *cheapest path* from the source to the destination, typically found using a modified version of the *[[Bellman-Ford algorithm]]*. In distance-vector routing protocols, there is *no global knowledge* of the topology of the network and each node only knows of and the cost to their *immediate neighbours*. Each node calculates and advertises its own **distance value** or **DV** based on the costs to its immediate neighbours. Distance values are updated only when any costs to their immediate neighbours change. ## Count-to-infinity problem As the Bellman-Ford algorithm does not check whether a [[cycle]] occurs, it can create a *routing loop* whose cost appears to count towards infinity. A routing loop in a distance-vector routing protocol can occur primarily due to nodes being unable to determine if a path it is advertised *contains itself*. Another cause is nodes becoming *unreachable* such as by a failing link. There are several solutions to the count-to-infinity problem: - **split horizon** - nodes *do not* advertise a route back to the neighbour it learnt it from - **poison reverse** - nodes that learnt a route from a neighbour advertise the route back to the neighbour with a *cost of infinity* - **route poisoning** - nodes that find unreachable nodes or invalid routes *immediately* advertise all routes to the node or invalid routes as having a cost of infinity - **maximum cost limit** - a *finite maximum* possible cost limit is imposed on all routes