Bellman Ford Distance Vector Algorithm
Tags: #◇CSNETWK #◇Computer Science #◇Computer Networks #◇Networking Protocols #◇Graph Theory Basics
◇Overview
Distance Vector routing is decentralized. Routers do not know the full topology. They only know:
◇Key Concepts
Target Router Nodes
◇Details / Theory
◇1. Concept Overview: Distance Vector (DV)
Definition
Distance Vector routing is decentralized. Routers do not know the full topology. They only know:
- Cost to direct neighbors.
- Distance vectors received from those neighbors.
The "Tell Your Neighbors" Rule
Each router periodically sends its own best-path estimates (vector) to its neighbors. If a neighbor finds a cheaper path using that information, it updates its own vector.
Bellman-Ford Equation:
: Cost from to . : Cost to neighbor . : Neighbor 's current known cost to .
◇2. The Network Topology
Scenario Data
!◇Pasted image 20251121093513.png
Target Router: V (Question 1) and X (Question 2) Nodes: u, v, w, x, y
◇3. Problem Analysis
Question 1
When the algorithm converges, what are the distance vectors from router 'V' to all routers? (u,v,w,x,y)
Analytical Breakdown:
We need to find the shortest path from V to everyone else by looking at the diagram globally (since "convergence" implies everyone knows the best paths).
- V to V: 0 (Self).
- V to U: Direct link is 6. No other path is faster. 6
- V to W: Direct link is 5. Path V-X-W is (worse). 5
- V to X: Direct link is 5. Path V-W-X is (worse). 5
- V to Y:
Path V-X-Y: Cost is .
Path V-W-X-Y: (worse).
Result: 6
Correct Answer: (6, 0, 5, 5, 6)
Question 2
What are the initial distance vectors for router 'X'? (u,v,w,x,y)
Analytical Breakdown:
"Initial" means the router only knows about its direct physical neighbors. It does not yet know about nodes that are two or more hops away.
- X to U: Not a neighbor. Unknown. (x)
- X to V: Direct neighbor. Cost 5.
- X to W: Direct neighbor. Cost 2.
- X to X: Self. Cost 0.
- X to Y: Direct neighbor. Cost 1.
Correct Answer: (x, 5, 2, 0, 1)
Question 3
...what is the name of the problem that can occur when link costs increase?
Analytical Breakdown:
In DV routing, "bad news travels slow."
If a link breaks or cost increases significantly, routers may form a routing loop where they bounce traffic back and forth, incrementing their cost counter endlessly because they rely on each other's outdated information. Example: A thinks best path is B; B thinks best path is A. They keep adding +1 to the cost until it hits a predefined "Infinity".
Correct Answer: Count to Infinity problem
◇Summary of Logic (Cheat Sheet)
| State | Knowledge Scope | Values for Non-Neighbors |
| Initial | Local (Direct Links only) | Infinity ( or 'x') |
| Converged | Global (Best Paths) | True Shortest Distance |
Key Phrase:
"Good news travels fast" (Cost decrease propagates quickly).
"Bad news travels slow" (Cost increase causes Count-to-Infinity).
◇Common Pitfalls
Confusing initial distance vectors (only direct neighbors known; rest ) with converged vectors (global shortest paths). Forgetting the Count-to-Infinity problem when link costs increase — "bad news travels slow." Applying the Bellman-Ford equation incorrectly: minimizes over neighbors , not all nodes.
◇Summary
TL;DR — Bellman-Ford is a decentralized distance-vector algorithm where each node shares its distance vector with neighbors and updates using . It converges to shortest paths but suffers from the Count-to-Infinity problem on cost increases.
◇Links
Related: - ◇Pasted image 20251121093513.png Source / Reference:
◇References & Navigation
- Previous Topic: ◇Dijkstra's Algorithm (Advanced)
- Next Topic: ◇Link Layer
- Related Notes: ◇Internetworking
ACTIVE RECALL VERIFICATION
Select an answer to verify conceptual comprehension and reveal the technical rationale.
Which equation states the Bellman-Ford equation used by Distance-Vector (DV) routing protocols to compute the least-cost path from router to destination ?
How does the information known by each router in a Distance-Vector protocol (like RIP) differ from that in a Link-State protocol (like OSPF)?
What triggers a router in the Distance-Vector algorithm to send an updated distance vector to its direct neighbors?
Why does the Count-to-Infinity ("Bad News Travels Slowly") problem occur in basic Distance-Vector routing when a link cost increases drastically or a link fails?
How does Poisoned Reverse (combined with Split Horizon) mitigate routing loops between two adjacent routers and ?