📝 Distance Vector Routing algorithm Bellman Ford (29 MCQs)
Neighbor-Based Route Calculation with Bellman-Ford
Distance vector routing lets each router maintain a table of destination networks, estimated distances, and next hops. Rather than learning the complete topology, a router exchanges its distance information with neighboring routers. The Bellman-Ford principle updates a destination estimate by considering the local link cost plus the neighbor's advertised distance, selecting the lowest eligible result between directly connected neighboring routers.
Distance Vectors and the Bellman-Ford Equation
For router x and destination y, the update can be written D_x(y) = min_v {c(x,v) + D_v(y)}, where v represents a neighbor, c is the direct link cost, and D_v is the neighbor's advertised distance. The router stores the neighbor that provides the selected minimum as its next hop.
Periodic Updates and Route Recalculation
Routers send distance vectors to neighbors periodically and, in many implementations, after important route changes. A receiving router adds the cost of reaching the advertising neighbor, compares the new value with its current estimate, and updates its table when appropriate. Repeated exchanges allow route information to propagate across the network and eventually converge.
Bellman-Ford Calculation Across Two Neighbors
Router A reaches network N directly through neighbor B at cost 2. B advertises a distance of 4 to N, so A calculates 2 + 4 = 6. Neighbor C has a direct cost of 3 and advertises distance 2, giving 5. A selects C as the next hop because 5 is smaller than 6.
Routing Loops and Count-to-Infinity
Distance vector protocols can temporarily form loops when routers retain stale information after a failure. The count-to-infinity problem occurs when neighboring routers repeatedly increase an unreachable route's metric because each believes the other still has a valid path. Split horizon, route poisoning, triggered updates, and a bounded infinity value help reduce this instability.
Misconceptions About Distance Vector Operation
'A router stores the entire network map' is incorrect because distance vector routers primarily retain destination metrics and next hops. 'Every update immediately guarantees a correct route' is incorrect because convergence takes time. 'Bellman-Ford prevents all loops automatically' is incorrect because practical protocols need additional loop-control mechanisms in real implementations.
Tracing Bellman-Ford Tables in Examination Problems
Be able to apply the Bellman-Ford update for each neighbor, identify the minimum metric, and record the corresponding next hop. Trace table changes after a link failure and explain count-to-infinity, split horizon, and poisoned reverse. Distinguish the mathematical algorithm from specific protocol timers, packet formats, and safeguards used by RIP or other implementations.
Bellman Ford: Key Terms
- Distance vector - Neighbor-advertised destination costs.
- Bellman-Ford - Algorithm for minimum-cost path calculation.
- Next hop - Neighbor selected to reach a destination.
- Convergence - Stable agreement on route information.
- Split horizon - Suppresses routes advertised back toward their source.
- Route poisoning - Marks failed routes unreachable.
📝 All Distance Vector Routing algorithm Bellman Ford MCQs
Q1. What information does a distance‑vector routing protocol primarily exchange between neighboring routers?
📖 Explanation: Distance‑vector protocols share a vector that lists each destination and the associated cumulative cost. Routers use this information to update their own tables, selecting the lowest‑cost next hop. They do not transmit full topology, MAC tables, or cryptographic keys; instead, they rely on periodic updates.
Q2. Router X receives from neighbor N a distance vector that lists a cost of 5 to destination Y. If the link cost from X to N is 2, what cost will X record for Y via N?
📖 Explanation: The cost recorded by X for a destination via a neighbor is the sum of the link cost to that neighbor and the neighbor’s advertised cost. Adding the link cost of 2 to the advertised cost of 5 yields a total of 7, which becomes X’s new cost for Y.
Q3. In a consistent least‑cost tree, the path from node A to node F has total cost 9. Which statement must be true about the cost from F to A in F’s tree?
📖 Explanation: When a least‑cost tree is built using consistent criteria, the route from X to Y is the exact inverse of the route from Y to X, and the accumulated cost is identical in both directions. Therefore the cost from F back to A must also be 9.
Q4. If a link cost between B and C increases from 2 to 6, how does the distance vector at router A change for destination D, assuming the previous least‑cost path was A→B→C→D with total cost 7?
📖 Explanation: The original path cost was 2 (A‑B) + 2 (B‑C) + 3 (C‑D) = 7. After the B‑C cost rises to 6, the new path cost becomes 2 + 6 + 3 = 11, so A must update its distance vector for D to 11.
Q5. Which property states that the least‑cost route from X to Y in X’s tree is the inverse of the least‑cost route from Y to X in Y’s tree?
📖 Explanation: The symmetric cost property guarantees that the optimal route from X to Y is the reverse of the optimal route from Y to X, and both have the same cumulative cost. This symmetry underlies many distance‑vector correctness proofs.
Q6. Given a distance vector at router R: {A:4, B:2, C:6}. If the link cost to neighbor S is 3 and S advertises cost to A as 2, what new cost to A will R compute via S?
📖 Explanation: R adds the cost to reach neighbor S (3) to S’s advertised cost to A (2), resulting in a total of 5. Since 5 is lower than R’s existing cost of 4 for A, R will update its table to reflect the new lower cost.
Q7. Which event most likely triggers a distance‑vector router to send an immediate update to its neighbors?
📖 Explanation: Distance‑vector protocols employ triggered updates: when a link’s status changes (e.g., goes down or comes up), the router immediately informs its neighbors rather than waiting for the next periodic timer expiration.
Q8. In a simple three‑router network, a link failure can cause the distance to a destination to increase indefinitely. Which mechanism specifically prevents this count‑to‑infinity problem?
📖 Explanation: Poison reverse works by advertising an infinite metric back to the neighbor that originally supplied the route, thereby stopping the neighbor from using that path and preventing the cost from growing without bound.
Q9. If a network administrator changes the routing metric from hop count to delay, which of the following is a direct consequence for distance‑vector calculations?
📖 Explanation: When delay (often measured in milliseconds) replaces hop count, the resulting cost values can be fractional or non‑integer, requiring the distance‑vector algorithm to handle a broader numeric range while preserving its additive nature.
Q10. Assuming all routers start with infinite cost to destination Z, how many update cycles are required for the correct cost to propagate across a linear chain of 4 routers, if each router updates once per cycle?
📖 Explanation: The cost information travels one hop per cycle. Starting from the router adjacent to Z, the update must traverse three intermediate routers before reaching the farthest router, requiring four cycles for the final router to learn the correct cost.
Q11. Router P’s distance vector shows cost to Q as 8. After a link cost reduction between P and R from 5 to 2, the cost to Q via R becomes 7. Which inference about the previous path is correct?
📖 Explanation: Since the new cost via R (2 + cost_R‑Q) is lower than the original 8, the original cheapest path could not have used R; otherwise the cost would already have reflected the reduced link cost.
Q12. Which statement best differentiates split horizon from poison reverse in distance‑vector routing?
📖 Explanation: Split horizon simply stops a router from sending its own distance vector back to the neighbor from which it learned the route. Poison reverse goes further by advertising an infinite metric to that neighbor, actively discouraging its use of the route.
Q13. Given the distance vectors: Router X – {Y:3, Z:5}; Router Y – {Z:2}. If link cost X‑Y is 1, what cost will X assign to Z via Y?
📖 Explanation: X adds the link cost to Y (1) to Y’s advertised cost to Z (2), yielding a total of 3. Since this is lower than X’s existing cost of 5 for Z, X will update its entry to the new cost of 3.
Q14. A routing loop forms when a packet cycles between routers without reaching its destination. Which distance‑vector condition most directly creates such a loop?
📖 Explanation: When a router repeatedly advertises increasing costs without a mechanism like poison reverse or split horizon, other routers may keep selecting paths that lead back to the origin, causing the count‑to‑infinity phenomenon and resulting in a routing loop.
Q15. In a network where link costs are: A‑B=2, B‑C=3, C‑D=4. If router A receives a distance vector from D reporting cost 0 to itself, what cost will A compute for destination D?
📖 Explanation: The cost from A to D is the sum of the individual link costs: 2 (A‑B) + 3 (B‑C) + 4 (C‑D) = 9. The distance vector from D indicates zero additional cost beyond D, so the total cost remains 9.
Q16. If a network changes its routing metric from delay (ms) to bandwidth (Mbps) and all links have identical bandwidth, what impact does this have on the distance‑vector routing outcomes?
📖 Explanation: When every link shares the same bandwidth, the metric assigned to each link is identical, causing every possible path to have the same cumulative cost. Consequently, the distance‑vector algorithm cannot distinguish between paths, and all routes appear equally costly.
Q17. When a router detects a higher cost to a destination in a received vector, what is the most appropriate action according to distance‑vector rules?
📖 Explanation: Standard distance‑vector behavior dictates that when a route’s cost worsens, the router should poison‑reverse the entry (advertise an infinite metric) to its neighbor, ensuring the neighbor does not continue using the now‑suboptimal path.
Q18. How does enabling split horizon affect the convergence speed of a distance‑vector network after a link failure?
📖 Explanation: Split horizon stops a router from sending a route back to the neighbor that originally advertised it, which eliminates the possibility of that neighbor propagating an outdated or false route. This reduction in erroneous updates accelerates overall convergence after a failure.
Q19. Which characteristic distinguishes distance‑vector routing from link‑state routing in terms of information stored at each router?
📖 Explanation: Distance‑vector routers maintain a table containing the next hop and associated cost for each known destination, whereas link‑state routers keep a complete topology database of all nodes and links, enabling them to compute shortest paths locally.
Q20. If a router’s periodic update interval is set to 30 seconds, but a link cost changes after 10 seconds, when will neighboring routers first learn of the change assuming no triggered updates?
📖 Explanation: Without triggered updates, routers rely solely on the periodic timer. Since the next scheduled broadcast occurs 30 seconds after the previous one, the change that happened at the 10‑second mark will be advertised at the 30‑second point.
Q21. Which combination of mechanisms most effectively prevents routing loops in distance‑vector protocols?
📖 Explanation: Split horizon stops a router from advertising a route back to the source, while poison reverse explicitly advertises an infinite metric to that source. Together they block the formation of loops that could otherwise arise from incorrect route reversals.
Q22. When aggregating routes, a distance‑vector router summarizes multiple destinations into a single entry. How does this affect the accuracy of the cost vector?
📖 Explanation: Aggregation replaces several specific costs with a single summarized cost, often the highest among the grouped routes. This can overstate the true cost for some destinations, reducing precision but simplifying the routing table.
Q23. In an asynchronous distance‑vector environment, two neighboring routers exchange vectors at different times. Which scenario can lead to temporary inconsistency?
📖 Explanation: If one router sends an update while its neighbor has not yet processed the previous update, the neighbor may temporarily hold outdated information, creating a brief inconsistency until the next exchange synchronizes their tables.
Q24. If all link costs in a network are multiplied by a constant factor k>1, how does the relative ordering of paths change for distance‑vector routing?
📖 Explanation: Multiplying every link cost by the same positive factor scales all path costs uniformly. Since each path’s total cost is multiplied by the same factor, the order of cheapest to most expensive paths stays the same, preserving routing decisions.
Q25. Consider a network with routers A, B, C, D where link costs are: A‑B=1, B‑C=2, C‑D=3, A‑D=10. After a failure of link B‑C, what is the new least‑cost path from A to D and its total cost?
📖 Explanation: With B‑C down, the path A‑B‑C‑D is unavailable. The only remaining viable routes are the direct A‑D link (cost 10) or any longer detour that would exceed 10. Therefore the least‑cost path remains the direct A‑D link with total cost 10.
Q26. A hold‑down timer is set to 60 seconds. Router X receives an update indicating a cost of 20 to destination Y, then 5 seconds later receives a lower cost of 8. What will X do with the new information?
📖 Explanation: During a hold‑down period, a router ignores any improvements to a route to avoid instability. Hence, even though a lower cost arrives, X will retain the existing (higher) metric until the 60‑second timer expires.
Q27. Switching the routing metric from hop count to a non‑additive metric (e.g., reliability expressed as a probability) can affect loop formation. Which statement best describes this effect?
📖 Explanation: Distance‑vector algorithms rely on the additive property of metrics to compute cumulative costs. A non‑additive metric violates this assumption, so the protocol can still generate inconsistent information and loops despite the metric’s nature.
Q28. If a router has two equal‑cost paths to a destination, each with total cost 5, and the protocol implements equal‑cost multipath (ECMP), how many next‑hop entries will appear in its routing table for that destination?
📖 Explanation: ECMP allows a router to install multiple next‑hop entries when multiple paths share the same lowest cost. With two distinct paths of cost 5, the router will store both next hops, resulting in two entries for the destination.
Q29. In a distance‑vector network, a rumor about a cost increase propagates faster than a rumor about a cost decrease due to triggered updates. Which property of the protocol explains this asymmetry?
📖 Explanation: Distance‑vector protocols generate triggered updates whenever a metric worsens (cost increases) to quickly inform neighbors. Decreases are typically disseminated only at the next periodic interval, causing the observed asymmetry in propagation speed.