Distance Vector Routing

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

RouterDestinationNext HopHop Count
A192.168.1.0Direct0
B192.168.2.0Direct0
C192.168.3.0Direct0

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:

DestinationNext HopHop Count
192.168.1.0Direct0
192.168.2.0B1
192.168.3.0B2

Distance Vector Routing Protocols

ProtocolMetric UsedHop LimitUpdates FrequencyConvergence Speed
RIP (Routing Information Protocol)Hop Count15 HopsEvery 30 secSlow
IGRP (Interior Gateway Routing Protocol – Cisco)Bandwidth, Delay255 HopsEvery 90 secFaster than RIP
EIGRP (Enhanced IGRP – Cisco)Composite Metric (Bandwidth, Delay, Load)255 HopsTriggeredFast

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

FeatureDistance VectorLink-State
AlgorithmBellman-FordDijkstra’s SPF
Network ViewOnly knows about neighborsFull network topology
Metric UsedHop countBandwidth, cost
Update MethodPeriodic updatesEvent-driven updates
Best ForSmall networksLarge networks
Example ProtocolsRIP, IGRPOSPF, 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.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *