š 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.
š All Least cost routing metrics MCQs
Q1. What is the main goal of least-cost routing in unicast networks?
š 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?
š Explanation: Adding the costs of the twoāhop path yields , 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 . If the cost of link YāZ increases to 10, which of the following becomes the new leastācost path?
š Explanation: When YāZ becomes 10, the original path costs . The alternative XāWāZ has a total cost of , 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)?
š 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?
š 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)?
š 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?
š 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?
š 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?
š 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?
š 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?
š 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)?
š 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 , which is lower than any alternative route, so the algorithm selects the path PāRāSāT.