🎓 BookMCQ
← Back to 29. Peer to Peer Paradigm

📝 Pastry routing algorithm (27 MCQs)

Progressive Prefix Matching Toward a Destination

Pastry routes a message toward the live node whose identifier is numerically closest to the destination key. At each hop, it normally chooses a peer whose node ID shares a longer prefix with the key than the current node. This progressive matching reduces the remaining identifier uncertainty without requiring a complete directory. Prefix matches direct logical progress; physical proximity remains a separate consideration.

Routing Table Rows and Fallback State

The routing table has rows based on the length of the prefix shared with the local node ID; columns represent possible values of the next digit. If the ideal entry is missing, Pastry consults its leaf set and other known nodes, selecting one that preserves at least the current prefix match and is numerically closer. Sets organize routing state by prefix, proximity, and identifier order.

Deciding When to Use the Leaf Set

If the destination key falls within the numerical range covered by the leaf set, the node can forward to the leaf-set member closest to that key. Otherwise, it attempts a longer prefix match using the routing table. This decision combines prefix progress with final numerical proximity. Every hop must improve the prefix or satisfy the fallback rule.

A Three-Hop Prefix Improvement

A node with ID 2B10 receives a message for key 2B9F. It can first forward to a known peer matching 2B, then to a peer matching 2B9, and finally use the leaf set to reach the closest live identifier. The example illustrates increasing prefix agreement before final delivery. The selected peer advances the key's shared prefix match at this stage.

Routing Efficiency and Locality

With well-populated routing tables, prefix matching limits the number of forwarding stages in relation to identifier length. The neighborhood set can favor network-close candidates when suitable alternatives exist, reducing physical path cost without changing the logical destination rule. Failures and absent entries can trigger fallback routing. The application remains responsible for stored data and service permissions.

Fallback Does Not Ignore Destination Closeness

'Pastry always chooses the longest prefix even if it is farther numerically' is false because fallback selection also considers closeness. 'The neighborhood set is the main routing table' misstates its locality role. 'A message stops at any matching prefix' is wrong; it proceeds toward the closest live ID. Identifier order and network proximity remain separate routing criteria in Pastry.

Routing-State Traces and Candidate Selection

For a routing problem, calculate the common prefix between current node and key, inspect the matching row and next-digit column, then apply the fallback rule if the entry is empty. Check whether the key lies inside the leaf-set range, and distinguish logical identifier progress from physical network proximity. Name the routing table row, fallback candidate, and leaf set decision clearly.

Pastry Forwarding and Fallback Terms

  • Prefix length - Count of matching leading digits..
  • Routing row - Table row selected by prefix length..
  • Next-digit column - Column for the required following digit..
  • Leaf-set range - Interval covered by neighboring node IDs..
  • Fallback - Alternative forwarding when an entry is missing..
  • Proximity metric - Measure preferring network close peers..
8
Easy
12
Medium
7
Hard

📝 All Pastry routing algorithm MCQs

Q1. If a router receives a packet with destination 192.168.10.0/24 and its routing table contains a static route to 192.168.10.0/24 via interface eth0, what will the router do?

A.Drop the packet
B.Forward to eth0 ✅
C.Broadcast the packet
D.Send an ICMP redirect
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The router matches the destination address with the static entry, determines that eth0 is the appropriate outgoing interface, and forwards the packet accordingly. Because the route is exact and directly connected, no additional processing such as broadcasting or ICMP generation is needed.

Q2. When OSPF adjacency fails because the hello interval on two routers differs, which immediate effect is observed on the routing table?

A.All OSPF routes are removed ✅
B.Only external routes are removed
C.No change occurs
D.OSPF routes are retained but marked inactive
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A mismatched hello interval prevents OSPF hello packets from being recognized, causing the adjacency to drop. When the adjacency disappears, the routers withdraw all OSPF-learned routes, so the routing table loses those entries immediately, while other protocol routes remain unchanged.

Q3. Compare distance‑vector and link‑state routing protocols in terms of convergence speed. Which statement is correct?

A.Distance‑vector converges faster
B.Link‑state converges faster ✅
C.Both converge at the same rate
D.Convergence depends only on network size
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Link‑state protocols flood the entire network with LSAs, allowing each router to have a complete view and compute shortest‑path trees quickly. Distance‑vector protocols rely on incremental updates and can suffer from slow convergence and count‑to‑infinity problems, making link‑state generally faster.

Q4. Which metric would most likely be used by a routing protocol that prefers paths with the smallest bandwidth‑delay product?

A.Hop count
B.Inverse of bandwidth
C.Product of bandwidth and delay ✅
D.Latency only
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: A protocol aiming to minimize the bandwidth‑delay product evaluates the product of link bandwidth and propagation delay; the smaller this product, the more efficient the path. Therefore, the metric directly reflects the multiplication of bandwidth and delay values.

Q5. How does hierarchical routing reduce the size of routing tables in large networks?

A.By aggregating routes into summary entries
B.By increasing the number of routers
C.By using longer subnet masks only
D.By disabling routing protocols in lower tiers ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: Hierarchical routing groups routers into areas and uses summary routes at area borders, allowing each router to store only aggregated entries instead of every individual subnet. This aggregation dramatically shrinks the number of entries each router must maintain.

Q6. What does the acronym CIDR stand for?

A.Common Internet Data Routing
B.Centralized Interface Data Routing
C.Classless Inter‑Domain Routing ✅
D.Computer Integrated Data Routing
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: CIDR, or Classless Inter‑Domain Routing, replaces the older class‑based addressing scheme. It allows variable‑length subnet masks, enabling more efficient allocation of IP address space and supporting route aggregation, which reduces the size of global routing tables.

Q7. In IPv4, the default subnet mask for a Class B network is?

A.255.255.0.0 ✅
B.255.0.0.0
C.255.255.255.0
D.255.0.255.0
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Class B addresses occupy the first two octets for the network portion, leaving the last two for hosts. The default mask therefore has ones in the first sixteen bits (255.255) and zeros in the remaining sixteen bits, yielding 255.255.0.0.

Q8. Router A connects to Router B with a 100 Mbps link (cost 1) and Router B to Router C with a 50 Mbps link (cost 2). What is the total cost from A to C?

A.1
B.2
C.4
D.3 ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: The total path cost is the sum of individual link costs: 1+2=31 + 2 = 3. Therefore, the route from Router A to Router C incurs a combined metric of three, which is the value presented in option D.

Q9. If a router redistributes OSPF routes into EIGRP using metric type 1, what effect does this have on EIGRP’s metric calculation?

A.EIGRP ignores the OSPF metric
B.EIGRP treats the routes as external with a default metric
C.EIGRP uses the OSPF cost as the internal metric ✅
D.EIGRP converts the metric to delay only
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Metric type 1 indicates that the external route should be treated as internal for EIGRP calculations, causing EIGRP to adopt the OSPF‑derived cost directly as its own internal metric rather than applying a default external value.

Q10. A router drops a packet when its TTL field reaches zero. Which ICMP message is generated?

A.Destination Unreachable
B.Time Exceeded ✅
C.Parameter Problem
D.Source Quench
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: When the TTL (Time‑to‑Live) counter decrements to zero, the router discards the packet and sends an ICMP Time Exceeded message back to the source. This informs the sender that the packet could not reach its destination because it traversed too many hops.

Q11. Which statement correctly compares OSPF and RIP regarding maximum hop count?

A.Both support up to 255 hops
B.OSPF has no hop‑count limit while RIP limits to 15 hops ✅
C.RIP supports unlimited hops while OSPF limits to 10 hops
D.Both limit hops to 15
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: RIP is a distance‑vector protocol that restricts the network diameter to 15 hops, preventing routing loops. OSPF, a link‑state protocol, does not impose a hop‑count ceiling; it bases routing decisions on link costs, allowing arbitrarily large topologies.

Q12. What is the impact of increasing the OSPF hello interval on convergence time?

A.Increases convergence time ✅
B.Decreases convergence time
C.Has no effect on convergence
D.Causes immediate route flapping
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A longer hello interval means routers wait longer before detecting neighbor loss, delaying the propagation of LSAs and the recomputation of shortest‑path trees. Consequently, the overall convergence process takes more time, which can affect network stability during failures.

Q13. Why might an engineer choose MPLS over a plain IP VPN for a WAN link?

A.Lower cost
B.Simpler configuration
C.Better security
D.Traffic engineering capabilities ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: Multiprotocol Label Switching (MPLS) enables explicit path control and traffic engineering, allowing operators to allocate bandwidth, prioritize traffic, and avoid congestion. These capabilities surpass the basic encapsulation offered by a plain IP VPN, making MPLS attractive for performance‑critical WAN deployments.

Q14. If a network uses a /26 subnet mask, how many usable host addresses are available?

A.62
B.30 ✅
C.126
D.14
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A /26 mask leaves 32−26=632 - 26 = 6 host bits. The number of host addresses is 26−2=64−2=622^{6} - 2 = 64 - 2 = 62. Therefore, 62 usable IPs can be assigned to devices within that subnet.

Q15. How does ECMP (Equal‑Cost Multi‑Path) improve load balancing?

A.It distributes packets across equal‑cost paths ✅
B.It increases latency on all paths
C.It reduces redundancy in the network
D.It requires manual static routes
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: ECMP identifies multiple paths that have identical routing metrics and then spreads traffic among them, often on a per‑packet or per‑flow basis. This parallel utilization balances load, maximizes bandwidth, and provides resilience without needing additional configuration.

Q16. Given overlapping entries: 10.0.0.0/8 via eth0, 10.0.0.0/16 via eth1, and 10.0.0.5/32 via eth2, which route will be selected for destination 10.0.0.5?

A.Route with lowest metric
B.Route with longest prefix match
C.Route learned first ✅
D.Default route
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Routers apply the longest‑prefix match rule, preferring the most specific entry. The /32 host route is the longest match for 10.0.0.5, so the packet is forwarded out eth2 regardless of metric or learning order.

Q17. If AS 1 advertises a route to AS 2 with MED 100, and AS 2 also receives a more specific route with MED 200, which route is preferred?

A.Higher MED is preferred
B.Lower MED is preferred
C.Routes with equal MED are chosen randomly
D.More specific route is preferred ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: BGP first evaluates route specificity; a more specific prefix overrides MED values. Therefore, even though the more specific route carries a higher MED (200), its greater specificity makes it the preferred path.

Q18. Two equal‑cost paths exist: Path A uses interfaces of 1 Gbps, Path B uses 100 Mbps. If policy‑based routing prefers higher bandwidth, which path will be chosen?

A.Path A (higher bandwidth)
B.Path B (lower bandwidth) ✅
C.Selection is random
D.Both paths are used equally
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Policy‑based routing can be configured to examine interface bandwidth attributes. When both paths have identical cost metrics, the router selects the one with the higher bandwidth—here Path A with 1 Gbps—because it offers greater capacity for traffic.

Q19. What is the effect of using a /30 subnet mask on a point‑to‑point link?

A.Allows exactly two host addresses ✅
B.Provides four usable host addresses
C.Allows only one host address
D.No host addresses are usable
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A /30 mask reserves 30 bits for the network, leaving 2 bits for host addresses. This yields 22−2=22^{2} - 2 = 2 usable IPs, which perfectly fits a point‑to‑point connection requiring one address for each endpoint.

Q20. If a router finds multiple routing table entries that match a destination IP, which entry is chosen?

A.The first matching entry
B.The entry with the lowest metric
C.The entry with the longest prefix match ✅
D.A randomly selected entry
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Routers implement the longest‑prefix match rule: they compare all matching entries and select the one with the most specific network mask, ensuring traffic is directed along the most precise route available.

Q21. In a multi‑area OSPF network, a summary route’s cost is 20. If a link inside the area fails and adds 5 to the intra‑area cost, what cost is advertised to other areas?

A.25 ✅
B.20
C.15
D.30
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: OSPF summary routes carry the accumulated intra‑area cost plus any additional metric changes. When the internal link failure raises the cost by 5, the summary’s advertised metric becomes 20+5=2520 + 5 = 25, which other areas then use for path selection.

Q22. Given the graph: A‑B 2, A‑C 5, B‑C 1, B‑D 4, C‑D 2. Using Dijkstra from A to D, what is the total cost of the shortest path?

A.4
B.5 ✅
C.6
D.7
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Applying Dijkstra, the cheapest route from A to D is A‑B‑C‑D with costs 2+1+2=52 + 1 + 2 = 5. No alternative yields a lower sum, so the shortest‑path metric equals 5, corresponding to option B.

Q23. How does the router’s forwarding plane differ from its control plane, and why is separating them beneficial?

A.Both planes perform identical functions
B.Forwarding plane decides routes, control plane moves packets
C.Control plane builds routing information while forwarding plane moves packets ✅
D.Control plane forwards packets, forwarding plane builds routing tables
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The control plane runs routing protocols, learns topology, and constructs the routing table. The forwarding plane (data plane) uses that table to move packets at line speed. Separating them allows the control plane to run complex computations without slowing packet forwarding, enabling high‑performance, scalable devices.

Q24. Compare scalability of OSPF versus RIP in a 100‑router network regarding control‑message volume. Which statement is accurate?

A.OSPF generates fewer messages than RIP
B.RIP generates fewer messages than OSPF
C.OSPF generates O(NN) LSAs while RIP generates O(NN) updates ✅
D.Both generate the same amount of messages
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: OSPF floods LSAs throughout the area, producing roughly O(NN) advertisements for each router, while RIP sends periodic distance‑vector updates to each neighbor, also O(NN). However, OSPF’s hierarchical design and incremental flooding make its message load more manageable than RIP’s full‑table broadcasts.

Q25. Which RFC defines the OSPF protocol?

A.RFC 1995
B.RFC 2328 ✅
C.RFC 1998
D.RFC 2001
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: OSPF was standardized in RFC 2328, titled “OSPF Version 2”. This document specifies the protocol’s packet formats, state machines, and algorithmic behavior, forming the basis for OSPF implementations used in modern IP networks.

Q26. In BGP, if a route has a higher local‑preference but a longer AS‑PATH length, which attribute is evaluated first?

A.Local‑preference first ✅
B.AS‑PATH length first
C.MED first
D.Origin first
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: BGP decision process examines attributes in a defined order. The first comparison after weight is local‑preference; a higher local‑preference overrides a longer AS‑PATH. Only if local‑preference values are equal does the router consider AS‑PATH length.

Q27. Design a routing strategy for a hybrid network using both SDN and traditional IP routing to achieve fast failover. Which combination is most effective?

A.Use only SDN controllers
B.Use only traditional routing
C.SDN for primary paths, traditional routing as backup ✅
D.Randomly switch between SDN and traditional
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: Employing an SDN controller to manage primary forwarding rules enables rapid re‑configuration, while retaining conventional IP routing as a fallback ensures continuity if the controller fails. This dual‑layer approach leverages SDN’s agility and the robustness of legacy routing, delivering swift failover without sacrificing resilience.

🔗 Related Topics (MCQs)