0% found this document useful (0 votes)
5 views5 pages

Distance Vector Routing

Distance-vector routing is a dynamic protocol where routers maintain tables of distances and next hops to destinations, sharing this information with neighbors to iteratively update their tables using the Bellman-Ford algorithm. Key characteristics include local knowledge, periodic updates, and reliance on hop count as a distance metric. While it is simple and low overhead, it suffers from slow convergence, routing loops, and limited scalability compared to link-state routing.

Uploaded by

Jithin S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Distance Vector Routing

Distance-vector routing is a dynamic protocol where routers maintain tables of distances and next hops to destinations, sharing this information with neighbors to iteratively update their tables using the Bellman-Ford algorithm. Key characteristics include local knowledge, periodic updates, and reliance on hop count as a distance metric. While it is simple and low overhead, it suffers from slow convergence, routing loops, and limited scalability compared to link-state routing.

Uploaded by

Jithin S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Distance-Vector Routing

Definition

• Distance-vector routing is a dynamic routing protocol mechanism where each router


maintains a routing table that lists the distance (typically hop count or a cost metric) and the
direction (next hop) to every known destination in the network, periodically sharing this
information with its directly connected neighbors, allowing them to update their own tables
iteratively using a distributed algorithm like the Bellman-Ford algorithm.

Core Concept

• In distance-vector routing, routers do not maintain a complete topology map of the network
(unlike link-state routing); instead, they rely on information provided by their neighbors
about the "distance" to destinations and the "vector" (direction or next hop) to reach them,
building their routing tables through this iterative exchange process.

Key Characteristics

• Local Knowledge Only: Each router knows only about its directly connected neighbors and
relies on them to provide distance information to other destinations, lacking a global view of
the network.

• Periodic Updates: Routers broadcast their entire routing tables to neighbors at fixed intervals
(e.g., every 30 seconds in RIP), regardless of changes, ensuring all routers eventually
converge on a consistent set of routes.

• Distance Metric: Typically uses hop count (number of routers traversed) as the metric,
though some protocols (e.g., EIGRP) use composite metrics like bandwidth and delay.

• Distributed Computation: The Bellman-Ford algorithm enables routers to calculate the


shortest path to each destination based on the cumulative distance reported by neighbors.

Components of Distance-Vector Routing

• Routing Table:

o Contains entries for each destination, including the total distance (e.g., hop count)
and the next hop router.

o Example: Destination 192.168.2.0, Distance 2 hops, Next Hop Router B.

• Update Messages:

o Packets sent periodically to neighbors, containing the router’s full routing table or
changes (in enhanced versions like EIGRP).

• Neighbors:

o Directly connected routers with which a router exchanges routing information.

• Bellman-Ford Algorithm:

o The underlying algorithm that computes the shortest path by comparing distances
and selecting the lowest-cost route through a neighbor.

Detailed Operation of Distance-Vector Routing


• Step 1: Initialization:

o Each router starts with a routing table containing only its directly connected
networks, assigning a distance of 0 to itself and 1 to immediate neighbors, with all
other destinations initially set to infinity (unreachable).

o Example: Router A, connected to B (1 hop) and network 10.0.0.0/8 (0 hops),


initializes its table: 10.0.0.0 → 0 (self), B → 1 (direct).

• Step 2: Periodic Table Exchange:

o At regular intervals, each router sends its entire routing table to its neighbors,
including destination networks, distances, and sometimes next hops (depending on
the protocol).

o Example: Router A sends to Router B: “10.0.0.0, distance 0”; Router B sends to A:


“192.168.1.0, distance 0.”

• Step 3: Distance Calculation and Update:

o Upon receiving a neighbor’s table, the router adds its own distance to the neighbor
(typically 1 hop) to the reported distances, compares the total with its current entry,
and updates its table if a shorter path is found (Bellman-Ford principle: Distance via
neighbor = Distance to neighbor + Neighbor’s distance to destination).

o Example: Router A gets from B: “192.168.1.0, distance 0”; adds 1 (A to B) → total 1;


updates table: 192.168.1.0 → 1 via B.

• Step 4: Convergence:

o This process repeats across all routers, with tables updated iteratively until no
further improvements are found, meaning all routers have consistent, shortest-path
information (assuming no network changes).

o Example: After several exchanges, Router A learns 172.16.0.0 is 2 hops away via B,
which learned it from C.

• Step 5: Packet Forwarding:

o When forwarding a packet, the router looks up the destination in its routing table
and sends it to the listed next hop, repeating this hop-by-hop until the packet
reaches its destination.

o Example: Packet to 192.168.1.10 → Router A sends to B (next hop), B delivers to


192.168.1.0 network.

• Step 6: Handling Changes:

o If a link fails or a new network is added, the affected router updates its table and
shares the change in the next periodic update, triggering recalculation across the
network; however, this can lead to slow convergence or issues like count-to-infinity.

o Example: If B-C link fails, B updates its distance to 172.16.0.0 as infinity and informs
A.

Bellman-Ford Algorithm (Simplified Explanation)


• Purpose: Computes the shortest path to each destination based on neighbor-provided
distances.

• Steps:

1. Initialize distances: 0 for self, 1 for direct neighbors, infinity for others.

2. For each neighbor’s update, calculate new distance: D(new) = D(to neighbor) +
D(neighbor to destination).

3. Update table if new distance is less than current distance, setting the neighbor as the
next hop.

4. Repeat until no changes occur.

• Example:

o A-B (1), B-C (1), C-D (1).

o A’s table after updates: B (1 via B), C (2 via B), D (3 via B).

Example Scenario

• Network: Four routers (A, B, C, D).

o Links: A-B (1 hop), B-C (1 hop), C-D (1 hop), A-D (4 hops).

• Process:

o Initial Table for A: A (0), B (1), D (4).

o A sends to B: “A: 0, D: 4”; B sends to A: “B: 0, C: 1”.

o A updates: C via B (1 + 1 = 2), keeps D via direct (4).

o B sends to C: “A: 1, C: 0, D: 4”; C sends to B: “C: 0, D: 1”.

o B updates: D via C (1 + 1 = 2); informs A.

o Final Table for A: B (1), C (2 via B), D (3 via B).

• Convergence: After several exchanges, all routers agree on shortest paths.

Diagram Descriptions

• Diagram 1: Network Topology:

o Four routers (A, B, C, D) as circles.

o Lines connecting: A-B (label: 1 hop), B-C (1), C-D (1), A-D (4).

o Arrows showing table exchanges (e.g., A ↔ B, B ↔ C).

• Diagram 2: Routing Table for Router A:

o Table:

▪ Destination | Distance | Next Hop

▪ A|0|-
▪ B|1|B

▪ C|2|B

▪ D|3|B

• Diagram 3: Update Propagation:

o Timeline showing A → B (Round 1), B → C (Round 2), C → D (Round 3), with


distances updating hop-by-hop.

Advantages of Distance-Vector Routing

• Simplicity: Easy to implement and understand, requiring minimal computation and memory
compared to link-state routing, making it suitable for small networks or resource-constrained
devices.

• Low Overhead Initially: Only shares routing tables with neighbors, not the entire topology,
reducing initial complexity.

• Distributed Nature: No single point of failure in computation; each router independently


updates its table based on neighbor data.

Disadvantages of Distance-Vector Routing

• Slow Convergence: Periodic updates and hop-by-hop propagation delay network stabilization
after changes, especially in large networks.

• Count-to-Infinity Problem: When a link fails, routers may incrementally increase distances to
infinity due to looping updates, slowing convergence (e.g., A thinks D is via B, B thinks via A).

• Routing Loops: Temporary loops can form during convergence, causing packet loss or delays
until resolved.

• Limited Scalability: Periodic broadcasts and table size grow with network size, overwhelming
bandwidth and router resources.

• Metric Simplicity: Basic hop count ignores factors like bandwidth or latency, leading to
suboptimal paths (e.g., a 1-hop slow link vs. a 2-hop fast link).

Solutions to Common Issues

• Split Horizon: Prevents a router from advertising a route back to the neighbor it learned it
from, reducing loops.

o Example: B doesn’t tell A about C if B learned C via A.

• Route Poisoning: When a link fails, the router advertises an infinite distance (e.g., 16 in RIP)
to quickly invalidate the route.

o Example: B-C fails, B sets C to 16 and informs A.

• Hold-Down Timers: After a route is marked unreachable, the router ignores updates for a
period, allowing bad news to propagate fully.

• Triggered Updates: Send immediate updates on topology changes instead of waiting for the
next periodic cycle, speeding convergence.
Popular Distance-Vector Protocols

• RIP (Routing Information Protocol):

o Uses hop count (max 15), updates every 30 seconds, simple but limited by scale and
convergence speed.

• EIGRP (Enhanced Interior Gateway Routing Protocol):

o Cisco proprietary, uses composite metrics (bandwidth, delay, etc.), supports


triggered updates and partial table sharing, improving efficiency over RIP.

Comparison with Link-State Routing

• Distance-Vector:

o Local knowledge, periodic updates, Bellman-Ford, simpler, slower convergence,


prone to loops.

• Link-State:

o Global topology, event-driven updates, Dijkstra’s SPF, complex, faster convergence,


loop-free.

Relation to Packet Forwarding (Classful Context)

• In classful addressing (e.g., 10.0.0.0/8), distance-vector routing dynamically builds tables for
packet forwarding, using hop count to decide next hops within class boundaries, though it
adapts to classless addressing (CIDR) in modern implementations like EIGRP.

• Example: Packet from 10.1.2.3 to 192.168.1.10 → Router A’s table (from RIP) sends it to B (1
hop), then to destination network.

Additional Notes

• Hop Count Limit: RIP caps at 15 hops (16 = infinity), restricting network diameter.

• Convergence Example: After A-D (4) fails, A learns D via B-C (3 hops) but may loop until split
horizon or poisoning resolves it.

• Vector: Refers to direction (next hop), distinguishing it from scalar distance metrics.

You might also like