Distance Vector Routing Algorithm
Distance Vector Routing is a dynamic routing algorithm that determines the best path to a destination based on hop count (the number of routers a packet must pass through). Each router shares its routing table with its directly connected neighbors, updating information periodically.
- Uses the Bellman-Ford Algorithm to compute shortest paths.
- Each router maintains a routing table with:
- Destination network
- Next-hop router
- Metric (hop count or cost)
How Distance Vector Routing Works
1. Initial Routing Table
- Each router knows only its directly connected networks.
- The routing table initially contains only directly connected routes.
2. Exchange of Routing Information
- Routers exchange entire routing tables with their immediate neighbors.
- Each neighbor updates its own table based on received information.
3. Route Selection (Best Path Calculation)
- Each router selects the route with the lowest metric (hop count).
- If multiple paths exist, the shortest hop count is preferred.
4. Route Updates (Periodic and Triggered Updates)
- Periodic Updates: Routers broadcast routing tables at regular intervals.
- Triggered Updates: Routers send updates immediately if a network change occurs.
Example of Distance Vector Routing
Step 1: Initial Network Setup
Consider a small network with three routers:

- Router A is directly connected to Network 1 (192.168.1.0/24).
- Router C is directly connected to Network 3 (192.168.3.0/24).
- Router B connects A and C.
Step 2: Initial Routing Tables
| Router | Destination | Next Hop | Hop Count |
|---|---|---|---|
| A | 192.168.1.0 | Direct | 0 |
| B | 192.168.2.0 | Direct | 0 |
| C | 192.168.3.0 | Direct | 0 |
Step 3: Routing Table Exchange
- Router A learns about 192.168.3.0 via Router B (hop count = 2).
- Router C learns about 192.168.1.0 via Router B (hop count = 2).
Updated Routing Table for Router A:
| Destination | Next Hop | Hop Count |
|---|---|---|
| 192.168.1.0 | Direct | 0 |
| 192.168.2.0 | B | 1 |
| 192.168.3.0 | B | 2 |
Distance Vector Routing Protocols
| Protocol | Metric Used | Hop Limit | Updates Frequency | Convergence Speed |
|---|---|---|---|---|
| RIP (Routing Information Protocol) | Hop Count | 15 Hops | Every 30 sec | Slow |
| IGRP (Interior Gateway Routing Protocol – Cisco) | Bandwidth, Delay | 255 Hops | Every 90 sec | Faster than RIP |
| EIGRP (Enhanced IGRP – Cisco) | Composite Metric (Bandwidth, Delay, Load) | 255 Hops | Triggered | Fast |
Problems in Distance Vector Routing & Solutions
1. Slow Convergence (Takes Time to Adapt to Changes)
โ Solution: Triggered updates help routers learn about failures faster.
2. Routing Loops (Packets Circulating Indefinitely)
โ Solution:
- Split Horizon: Prevents routers from sending routing updates back to the router from which they learned them.
- Route Poisoning: Failed routes are marked with an infinite metric (16 in RIP).
- Hold-Down Timers: Delays accepting new route updates for a failed network.
Advantages of Distance Vector Routing
โ Simple to implement โ Minimal configuration required.
โ Works well for small networks โ Efficient in small-scale environments.
โ Automated routing updates โ No manual updates needed.
Disadvantages of Distance Vector Routing
โ Slow convergence โ Takes longer to detect network failures.
โ Limited scalability โ RIP only supports up to 15 hops.
โ Routing loops โ Needs additional mechanisms to prevent loops.
Comparison: Distance Vector vs Link-State Routing
| Feature | Distance Vector | Link-State |
|---|---|---|
| Algorithm | Bellman-Ford | Dijkstra’s SPF |
| Network View | Only knows about neighbors | Full network topology |
| Metric Used | Hop count | Bandwidth, cost |
| Update Method | Periodic updates | Event-driven updates |
| Best For | Small networks | Large networks |
| Example Protocols | RIP, IGRP | OSPF, IS-IS |
Conclusion
Distance Vector Routing is an easy-to-use routing method ideal for small networks. However, its slow convergence and risk of routing loops make it unsuitable for large-scale environments. Advanced protocols like OSPF and BGP are preferred for complex networks.
