šŸŽ“ BookMCQ
← Back to 20. Unicast Routing

šŸ“ Least cost routing metrics (12 MCQs)

How Least Cost Routing Compares Available Paths

Least cost routing selects a path by comparing the total metric assigned to candidate routes. A metric represents a chosen network property, such as hop count, administrative cost, bandwidth-related cost, or delay. The least numerical value is preferred when the protocol defines lower values as better. This approach gives routers a repeatable basis for choosing among multiple paths across a routing domain.

Additive Metrics and Link Cost Calculation

Many shortest-path methods assign a cost to each link and calculate a path cost by adding the costs along that route. The metric may be configured by an administrator or derived from an interface characteristic. A protocol's metric is not automatically a direct measurement of every performance factor, and different protocols may calculate cost differently.

Comparing Route Costs Before Updating a Table

The router obtains candidate route information, adds the local link cost where required, and compares the resulting metric with the current route. If a better eligible route is found, it updates the routing table with the new next hop and outgoing interface. Routing updates may then be advertised according to the protocol's own rules.

Calculating the Least Cost Path in a Small Network

Consider a path from Router R1 to R4 through R2 with link costs 2 and 5, giving a total of 7. An alternative through R3 has costs 3 and 6, giving 9. With an additive metric and no policy difference, the R1Ć¢ā‚¬ā€œR2Ć¢ā‚¬ā€œR4 path is preferred because 7 is lower than 9.

Why Metric Design Affects Network Performance

Metric selection influences load distribution, resilience, and the route chosen after a failure. Hop count is simple but treats short and high-capacity links equally; bandwidth-based cost can favor faster links, while delay-based metrics may reflect responsiveness. The metric remains a routing abstraction, so actual throughput and congestion can differ from the path's calculated cost.

Common Errors When Comparing Routing Metrics

'Least cost always means fewest routers' is incorrect unless hop count is the metric. 'A link with more bandwidth must always have lower cost' is incorrect because the protocol may use another formula. 'A metric of 5 is five milliseconds' is incorrect unless the metric is explicitly defined in time units.

Solving Least Cost Routing Questions

Students should add link costs accurately, compare complete path totals, and show the selected route and next hop. Check whether a question uses hop count, bandwidth-derived cost, delay, or a stated administrative value. Do not compare numerical metrics from different protocols as though they necessarily measure the same property or use the same scale.

Least cost routing metrics: Key Terms

  • Metric - Value used to compare routes.
  • Path cost - Combined cost of links on a route.
  • Hop count - Number of routers traversed.
  • Bandwidth - Link capacity for data transmission.
  • Delay - Time taken for data delivery.
  • Tie - Equal metric values on candidate routes.
3
Easy
5
Medium
4
Hard

šŸ“ All Least cost routing metrics MCQs

Q1. What is the main goal of least-cost routing in unicast networks?

A.To minimize the number of hops regardless of link costs
B.To maximize bandwidth usage
C.To select a path whose total link cost is minimal āœ…
D.To ensure equal load distribution across all paths
šŸ’” Difficulty: easy | āœ… Correct: C

šŸ“– Explanation: The objective of least‑cost routing is to choose the route whose sum of individual link costs is the smallest, ensuring efficient use of network resources while delivering the packet to its destination.

Q2. Given a network where the cost of link A‑B is 2, B‑C is 3, and A‑C is 7, which path will a least‑cost routing algorithm select to forward a packet from A to C?

A.A → B → C āœ…
B.A → C directly
C.Both paths have equal cost
D.The algorithm will split traffic between both paths
šŸ’” Difficulty: easy | āœ… Correct: A

šŸ“– Explanation: Adding the costs of the two‑hop path yields 2+3=52+3=5, which is lower than the direct link cost of 7. Therefore the algorithm selects the path A‑B‑C because it provides the minimum total cost.

Q3. In a network, the current least‑cost path from X to Z is X‑Y‑Z with total cost 4+5=94+5=9. If the cost of link Y‑Z increases to 10, which of the following becomes the new least‑cost path?

A.X → Y → Z (cost 9)
B.X → W → Z (cost 8) āœ…
C.X → V → Z (cost 10)
D.X → Y → W → Z (cost 12)
šŸ’” Difficulty: medium | āœ… Correct: B

šŸ“– Explanation: When Y‑Z becomes 10, the original path costs 4+10=144+10=14. The alternative X‑W‑Z has a total cost of 6+2=86+2=8, which is now the smallest among the listed options, making it the new least‑cost path.

Q4. Which set of links forms the least‑cost spanning tree rooted at A for the graph with links A‑B (1), A‑C (4), B‑C (2), B‑D (5), and C‑D (1)?

A.{A‑B, A‑C, B‑D}
B.{A‑C, B‑C, C‑D}
C.{A‑B, B‑C, B‑D}
D.{A‑B, B‑C, C‑D} āœ…
šŸ’” Difficulty: hard | āœ… Correct: D

šŸ“– Explanation: The tree must connect all nodes with minimal total cost. Selecting A‑B (1), B‑C (2), and C‑D (1) yields a total cost of 4, which is lower than any other combination that still connects every node, thus it is the least‑cost spanning tree.

Q5. When evaluating convergence speed after a link failure, which statement best distinguishes distance‑vector routing from link‑state routing in the context of least‑cost routing?

A.Distance‑vector updates only the affected routers, so convergence is instantaneous
B.Link‑state floods the entire network with updated topology, leading to faster convergence than distance‑vector āœ…
C.Distance‑vector may suffer from count‑to‑infinity, causing slower convergence
D.Link‑state requires each router to recompute routes independently, which always takes longer than distance‑vector
šŸ’” Difficulty: medium | āœ… Correct: B

šŸ“– Explanation: Link‑state protocols propagate the new topology to all routers via flooding, allowing each router to recompute shortest paths immediately. Distance‑vector protocols rely on incremental updates and can experience delayed convergence, especially with count‑to‑infinity problems.

Q6. Considering scalability and cost granularity, which of the following accurately reflects a trade‑off between OSPF (link‑state) and RIP (distance‑vector)?

A.RIP supports finer‑grained cost metrics than OSPF, improving path selection
B.OSPF limits the number of hops, making it less scalable than RIP
C.RIP’s simple hop‑count metric reduces computational overhead but cannot differentiate link quality, whereas OSPF’s configurable cost allows more precise least‑cost decisions at the expense of larger routing tables
D.OSPF updates are less frequent than RIP, causing slower adaptation to network changes āœ…
šŸ’” Difficulty: hard | āœ… Correct: D

šŸ“– Explanation: OSPF’s link‑state approach generates larger LSDBs and more frequent updates, which consume more memory and CPU, especially in large networks. RIP’s hop‑count metric is coarse but keeps routing information minimal, illustrating the classic scalability versus precision trade‑off.

Q7. Which characteristic uniquely identifies path‑vector routing compared to distance‑vector routing?

A.It carries the entire path (sequence of ASes) in each update āœ…
B.It uses only hop count as its metric
C.It updates routing tables only when a link fails
D.It does not prevent routing loops
šŸ’” Difficulty: easy | āœ… Correct: A

šŸ“– Explanation: Path‑vector protocols attach the full autonomous‑system path to each route advertisement, enabling detection of loops and policy enforcement, which is a distinctive feature not present in traditional distance‑vector protocols that only convey destination and metric.

Q8. If a network administrator wants to discourage use of a heavily congested link currently assigned a cost of 1, which adjustment to the cost metric is most appropriate to achieve least‑cost routing that prefers alternative paths?

A.Decrease the cost to 0 to attract more traffic
B.Leave the cost unchanged; congestion will self‑resolve
C.Increase the cost to a higher value, e.g., 10, making alternative routes cheaper overall āœ…
D.Set the cost to a negative value to force avoidance
šŸ’” Difficulty: medium | āœ… Correct: C

šŸ“– Explanation: Raising the link’s cost raises its contribution to the total path cost, causing the least‑cost algorithm to favor other routes with lower aggregate costs, thereby reducing traffic on the congested link.

Q9. Which sequence correctly describes the steps of Dijkstra’s algorithm when computing the least‑cost path from node S to all other nodes?

A.Initialize distances, repeatedly select the unvisited node with smallest tentative distance, update neighbors, mark node visited āœ…
B.Broadcast the current distance vector to all neighbors, then update tables based on received vectors
C.Perform a depth‑first search, recording cumulative costs, then choose the minimum
D.Flood the entire network with link‑state packets, then each router runs Bellman‑Ford
šŸ’” Difficulty: hard | āœ… Correct: A

šŸ“– Explanation: Dijkstra’s algorithm starts by setting the source distance to zero and all others to infinity, then repeatedly picks the closest unvisited node, relaxes its outgoing edges, and marks it visited until all nodes have their final shortest‑path costs.

Q10. How do changes in link cost values directly affect the entries in a router’s forwarding table in a least‑cost routing protocol?

A.The forwarding table remains static; only the metric values change
B.Only routes that use the changed link are removed, others stay unchanged
C.The router recomputes shortest‑path trees, updating next‑hop entries for any destination whose optimal path includes the altered link
D.Cost changes are ignored until a manual configuration update āœ…
šŸ’” Difficulty: medium | āœ… Correct: D

šŸ“– Explanation: When a link cost changes, the routing algorithm recalculates the least‑cost paths. Any destination whose optimal route traverses the modified link will have its next‑hop entry updated, while unaffected destinations retain their existing entries.

Q11. If a distance‑vector protocol mistakenly allows a link cost of –2, what is the most likely impact on the routing tables?

A.Routes will become more stable because negative costs reduce overall path length
B.The protocol will ignore the negative cost and treat it as zero
C.Routing loops may appear, and the protocol could repeatedly advertise decreasing path costs, leading to instability āœ…
D.The network will automatically correct the negative cost to a positive value
šŸ’” Difficulty: medium | āœ… Correct: C

šŸ“– Explanation: Distance‑vector protocols assume non‑negative metrics; a negative cost can cause the algorithm to continually lower advertised distances, producing routing loops and persistent instability, which is why protocols enforce non‑negative cost constraints.

Q12. Using the Bellman‑Ford algorithm, which path will be identified as the least‑cost route from node P to node T in the following directed graph: P‑Q (cost 3), P‑R (cost 2), Q‑S (cost 4), R‑S (cost 1), S‑T (cost 2), Q‑T (cost 10)?

A.P → Q → T (cost 13)
B.P → Q → S → T (cost 9)
C.P → R → S → T (cost 5) āœ…
D.P → R → T (no direct link, considered infinite)
šŸ’” Difficulty: hard | āœ… Correct: C

šŸ“– Explanation: Bellman‑Ford relaxes edges iteratively. The cheapest accumulated cost to T is via P‑R (2), R‑S (1), and S‑T (2), giving a total of 2+1+2=52+1+2=5, which is lower than any alternative route, so the algorithm selects the path P‑R‑S‑T.

šŸ”— Related Topics (MCQs)