🎓 BookMCQ
← Back to 20. Unicast Routing

📝 General idea of routing algorithms (13 MCQs)

How Routers Select Paths Across Interconnected Networks

Routing algorithms determine how routers learn reachable destinations and select suitable paths for IP packets across interconnected networks. They use information such as network topology, link cost, hop count, delay, or administrative policy to build routing tables. The network layer uses these results to choose a next hop, while the forwarding process applies that decision to each arriving packet during normal network operation.

Routing Information, Metrics and Network Topology

A routing method may be static, configured manually, or dynamic, where routers exchange information and recalculate routes after changes. Distance-vector methods share destination costs with neighbors; link-state methods distribute topology information; path-vector methods advertise reachable networks with path attributes. Each method maintains a different view of the network and therefore handles scalability and route changes differently.

From Route Discovery to Packet Forwarding

A router receives routing information, validates and compares candidate paths, selects preferred routes, and installs eligible entries in its routing table. When a packet arrives, the router examines its destination IP address, performs a route lookup, selects an outgoing interface and next-hop address, and forwards the packet after the required link-layer encapsulation.

Choosing Between Two Candidate Routes

Suppose a router can reach network 192.0.2.0/24 through Router A at a total metric of 12 or through Router B at a metric of 7. If both routes use the same metric definition and policy permits them, the router normally prefers Router B. The metric comparison illustrates how routing information influences the selected next hop.

Relationship Between Routing Protocols and the IP Layer

Routing algorithms support IP internetworking by adapting paths when links or routers fail and by distributing reachability information beyond directly connected networks. Interior gateway protocols exchange routes within an autonomous system, whereas exterior gateway routing connects separate autonomous systems. Routing determines the path information; IP forwarding performs the actual packet-by-packet transfer.

Misunderstandings About Route Selection and Forwarding

'Routing and forwarding are identical' is incorrect: routing computes or learns paths, while forwarding moves individual packets. 'The shortest geographic path is always selected' is incorrect because protocols use configured metrics and policies. 'Every routing protocol knows the entire Internet topology' is incorrect because protocols maintain only the information appropriate to their scope.

Interpreting Routing Tables and Algorithm Behaviour

For examinations, identify the routing protocol category, the information exchanged, and the metric used for path selection. Trace how a route enters a table, compare alternative next hops, and distinguish control-plane updates from data-plane forwarding. Be prepared to explain convergence, routing loops, and why an algorithm suitable for a small network may not scale globally.

Routing Algorithms Key Terms

  • Routing table - Stores destinations and forwarding information.
  • Next hop - The next router toward a destination.
  • Metric - A value used to compare routes.
  • Convergence - Routers reach consistent routing information.
  • IGP - Routes within one autonomous system.
  • EGP - Exchanges routes between autonomous systems.
4
Easy
6
Medium
3
Hard

📝 All General idea of routing algorithms MCQs

Q1. In the weighted graph model of the Internet, if two routers are not directly connected, what is the cost of the edge between them?

A.Zero
B.One
C.Infinity ✅
D.Negative one
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: In the graph model, an edge that does not exist between two routers is assigned an infinite cost, indicating that no direct path is available. This convention prevents the routing algorithm from mistakenly selecting a non‑existent link, and it forces the algorithm to search for alternative routes through intermediate routers.

Q2. Compare hierarchical routing with flat routing regarding scalability. Which statement is correct?

A.Hierarchical routing reduces routing table size by aggregating routes ✅
B.Flat routing reduces routing table size by aggregating routes
C.Both approaches produce identical table sizes
D.Hierarchical routing increases the number of required routers
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Hierarchical routing introduces multiple levels where each level summarizes the routes of the level below it. This aggregation dramatically cuts the number of entries each router must store, making the system far more scalable than flat routing, which requires every router to maintain a full view of all network destinations.

Q3. If edge costs represent latency, which path should a router choose to forward a packet?

A.The path with the most hops
B.The path with the highest total cost
C.The path with the lowest total cost ✅
D.A random path regardless of cost
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: When costs model latency, the routing goal is to minimize end‑to‑end delay. Therefore the router selects the route whose summed edge costs (latencies) are smallest. This ensures that the packet experiences the least possible delay, even if the chosen path contains fewer or more hops than alternative routes.

Q4. What is the primary function of a forwarding table in a router?

A.Store the IP addresses of all hosts in the network
B.Determine the next hop for each destination prefix ✅
C.Generate new IP addresses for outgoing packets
D.Encrypt packets before transmission
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: A forwarding table contains entries that map destination network prefixes to specific outgoing interfaces and next‑hop router addresses. When a packet arrives, the router looks up the destination prefix in this table to decide where to forward the packet next, enabling hop‑by‑hop progression toward the final destination.

Q5. Given edge costs A‑B = 2, B‑C = 3, and A‑C = 10, which route from A to C has the least total cost?

A.A‑B‑C ✅
B.A‑C
C.B‑C‑A
D.A‑B‑A‑C
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The total cost of A‑B‑C is 2 + 3 = 5, while the direct A‑C link costs 10. The other listed routes contain loops that increase cost further. Since routing algorithms aim to minimize cumulative cost, the path A‑B‑C, with a total cost of 5, is the optimal choice.

Q6. If the cost of edge B‑E increases from 2 to 7, how does the best path from A to E change?

A.It remains A‑B‑E
B.It changes to A‑D‑E ✅
C.It changes to A‑C‑E
D.No path exists from A to E
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Originally the cheapest route A‑B‑E costs 2 + 2 = 4. Raising B‑E to 7 makes that route cost 9. The alternative A‑D‑E costs 4 + 3 = 7, which is now lower than 9, so the least‑cost path switches to A‑D‑E.

Q7. How does hierarchical routing reduce the size of forwarding tables at backbone routers?

A.By aggregating multiple internal routes into a single summary route ✅
B.By duplicating all regional routes at each backbone router
C.By ignoring sub‑net information altogether
D.By increasing the number of routers in each region
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Hierarchical routing groups routers into regions and creates summary routes that represent all destinations within a region. Backbone routers store only these aggregated entries rather than every individual internal route, dramatically shrinking their forwarding tables while still being able to forward packets to any region via the summary.

Q8. If a router has no specific entry for a destination in its forwarding table, what default action is taken?

A.The packet is dropped immediately
B.The packet is flooded out of all interfaces
C.The packet is forwarded using the router’s default route ✅
D.The packet is broadcast to the entire network
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: When a router cannot find an exact match for a destination prefix, it falls back to its default route entry, if one exists. This default route points to a next‑hop router that can handle unknown destinations, ensuring the packet continues toward its goal rather than being discarded or indiscriminately flooded.

Q9. Which statement best describes the relationship between distance‑based and bandwidth‑based cost metrics in routing?

A.They always produce identical least‑cost paths
B.Distance‑based metrics alone determine the best path
C.Bandwidth‑based metrics alone determine the best path
D.Both metrics can lead to different optimal paths depending on network conditions ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: Distance metrics prioritize geographical or hop count length, while bandwidth metrics emphasize link capacity. Because these criteria evaluate different characteristics, the path that minimizes distance may not maximize bandwidth, and vice versa. Consequently, using one metric over the other can produce distinct least‑cost routes in the same network topology.

Q10. When all edge costs in a weighted graph are equal, which algorithm effectively finds the least‑cost path?

A.Dijkstra’s algorithm
B.Breadth‑first search (BFS) ✅
C.Bellman‑Ford algorithm
D.Floyd‑Warshall algorithm
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: If every edge has the same cost, the least‑cost path corresponds to the path with the fewest hops. Breadth‑first search explores nodes level by level and guarantees the shortest‑hop path, making it the appropriate choice. More complex algorithms like Dijkstra become unnecessary because they would compute the same result with additional overhead.

Q11. A new edge B‑E with cost x is added to a graph where A‑B‑C‑D‑E costs 4 and A‑E costs 5. For which range of x does the least‑cost path from A to E become A‑B‑E?

A.x < 1
B.x < 2
C.x < 3 ✅
D.x < 4
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The current cheapest path A‑B‑C‑D‑E has total cost 1 + 1 + 1 + 1 = 4. Adding edge B‑E creates a potential path A‑B‑E with cost 1 + x. For this new route to be cheaper than 4, the inequality 1 + x < 4 must hold, giving x < 3. Thus any cost below 3 makes A‑B‑E the optimal route.

Q12. How does hierarchical routing affect convergence time after a backbone link failure compared to flat routing?

A.It speeds convergence because updates are confined to affected regions ✅
B.It slows convergence due to additional hierarchical layers
C.Convergence time remains unchanged in both approaches
D.Convergence cannot be achieved with hierarchical routing
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: When a backbone link fails, hierarchical routing limits the propagation of updated routing information to the affected region and its immediate neighbors, rather than flooding the entire network as in flat routing. This containment reduces the number of routers that must recompute routes, leading to faster overall convergence and less transient disruption.

Q13. Design a hierarchical routing scheme for three regions (each with 10 routers) and a backbone of 5 routers. How does route aggregation at region borders reduce the number of entries each router stores, and what is the approximate reduction factor?

A.Reduction to about 15 entries (50% reduction)
B.Reduction to about 10 entries (66% reduction) ✅
C.Reduction to about 5 entries (83% reduction)
D.No reduction at all
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Each region’s border router can summarize its 10 internal routes into a single region‑wide entry. Consequently, a backbone router needs entries for the three region summaries plus the five other backbone routers, totaling roughly 8 entries. Compared with storing 30 individual routes, this is a reduction of about 73%, which aligns most closely with the option indicating roughly a two‑thirds reduction (≈ 66%).

🔗 Related Topics (MCQs)