Sample questions
Question 1Easy
Which algorithm does OSPF use to compute routes?
- Path-vector selection
- Bellman-Ford
- Dijkstra's shortest path first
- Kruskal's minimum spanning tree
Answer: C. Dijkstra's shortest path first
Explanation
Each OSPF router builds the full topology map from LSAs and runs Dijkstra's SPF algorithm.
Step-by-step solution
- Every OSPF router builds an identical, complete link-state database from flooded LSAs.
- Each router then runs the same algorithm independently on that shared map.
- That algorithm is Dijkstra's shortest path first (SPF).
Why the other options are wrong
- A. Path-vector route selection is BGP's mechanism, not OSPF's.
- B. Bellman-Ford is the algorithm distance-vector protocols like RIP use, not link-state protocols like OSPF.
- D. Kruskal's algorithm builds a minimum spanning tree, a different problem from finding shortest paths to every destination.
Tip: OSPF = link-state database + Dijkstra's SPF, run independently by every router.
Question 2Easy
Which device connects different networks and forwards packets based on IP addresses?
- Hub
- Repeater
- Router
- Layer-2 switch
Answer: C. Router
Explanation
Routers operate at the network layer. Hubs and repeaters are physical-layer devices; layer-2 switches forward by MAC address within a network.
Step-by-step solution
- A router operates at the network layer, reading IP addresses to make forwarding decisions.
- It uses those addresses to connect distinct networks together and forward packets between them.
- Hubs and repeaters work below addressing entirely, and layer-2 switches forward within one network using MAC addresses, not between networks.
Why the other options are wrong
- A. A hub just repeats signals; it has no concept of IP addresses or separate networks at all.
- B. A repeater, like a hub, just regenerates signals without reading any addresses.
- D. A layer-2 switch forwards within one network using MAC addresses, not between networks using IP addresses.
Tip: Router = network layer, forwards between networks using IP addresses.
Question 3Easy
In RIP, what hop count means "unreachable"?
- 0
- 16
- 255
- 15
Answer: B. 16
Explanation
RIP allows paths up to 15 hops; a metric of 16 is treated as infinity.
Step-by-step solution
- RIP treats hop counts up to and including 15 as reachable.
- A hop count of 16 is specifically reserved to mean 'unreachable'.
- This caps how far 'count to infinity' can climb before the route is declared dead.
Why the other options are wrong
- A. 0 would actually mean the destination is the router itself (0 hops away), not unreachable.
- C. 255 is far beyond RIP's actual maximum hop count of 15.
- D. 15 is RIP's maximum usable (reachable) hop count; one more than that, 16, is what signals unreachable.
Tip: RIP: 15 = farthest reachable hop count; 16 = treated as infinity/unreachable.
Question 4Easy
What is an autonomous system (AS)?
- A single router with redundant power supplies
- A group of switches that share one VLAN and one spanning tree instance
- A DNS zone
- A set of networks under one administrative routing policy
Answer: D. A set of networks under one administrative routing policy
Explanation
Each AS has its own number and interior routing; BGP connects autonomous systems.
Step-by-step solution
- An autonomous system is a set of networks managed under one administrative routing policy.
- Each AS runs its own interior routing (such as OSPF) independently inside its own boundary.
- BGP is what connects these independently administered autonomous systems together.
Why the other options are wrong
- A. An autonomous system is a network-wide administrative concept, not a description of one single device's hardware redundancy.
- B. VLANs and spanning tree are layer-2 switching concepts within one network, unrelated to the layer-3, multi-network scope of an AS.
- C. A DNS zone is a naming administrative boundary, a completely different concept from a routing administrative boundary.
Tip: AS = one administrative routing domain, identified by a unique AS number, connected to others via BGP.
Question 5Medium
Using the same table (172.16.0.0/12, 172.16.64.0/18, 172.16.96.0/19, default 0.0.0.0/0), which entry is used for 172.16.130.9?
- 0.0.0.0/0
- 172.16.64.0/18
- 172.16.96.0/19
- 172.16.0.0/12
Answer: D. 172.16.0.0/12
Explanation
130 lies outside 64 to 127 in the third octet, so only the /12 and the default match; the longer one, 172.16.0.0/12, wins.
Step-by-step solution
- 172.16.130.9 does not fall within the /18 (64-127) or /19 (96-127) ranges, since 130 is outside both.
- Only the broad /12 route and the default route actually cover this destination.
- Between those two, the /12 is more specific, so it wins.
Why the other options are wrong
- A. The default route is only a last resort, but a more specific route (the /12) matches here.
- B. 130 falls outside the 64-127 range this /18 covers, so it does not match this destination at all.
- C. 130 falls outside the 96-127 range this /19 covers, so it does not match this destination either.
Tip: Always double-check that a candidate route's range genuinely contains the destination address before assuming it is the longest match.
Question 6Medium
OSPF is an example of which type of routing protocol?
- Distance-vector
- Static routing
- Link-state
- Path-vector
Answer: C. Link-state
Explanation
OSPF routers flood link-state advertisements so each builds a complete topology map and runs Dijkstra's shortest-path algorithm.
Step-by-step solution
- OSPF routers flood information about their own links to every other router in the area.
- Every router ends up with an identical, complete map of the topology.
- Each router then runs Dijkstra's algorithm independently on that map to compute shortest paths.
Why the other options are wrong
- A. Distance-vector protocols like RIP only know distances reported by neighbours, not the full topology OSPF builds.
- B. Static routing is not a dynamic protocol category at all; routes are configured by hand.
- D. Path-vector protocols like BGP track the sequence of autonomous systems a route passes through, a different mechanism from OSPF's topology database.
Tip: Link-state = full topology map + Dijkstra; distance-vector = just neighbours' distances + Bellman-Ford.
Question 7Medium
How does BGP prevent routing loops between autonomous systems?
- A router rejects routes whose AS_PATH already contains its own AS number
- It applies split horizon on every link between neighbouring autonomous systems
- It limits every path to 15 AS hops, like RIP
- It floods LSAs with sequence numbers
Answer: A. A router rejects routes whose AS_PATH already contains its own AS number
Explanation
Seeing its own AS in the path means the advertisement has looped back.
Step-by-step solution
- Every BGP route advertisement carries the complete AS_PATH, the full list of autonomous systems it has passed through.
- A router checks any incoming advertisement's AS_PATH for its own AS number.
- If its own AS number already appears, the advertisement has looped back, so the router rejects it.
Why the other options are wrong
- B. Split horizon is a distance-vector technique used within protocols like RIP, not how BGP prevents loops between autonomous systems.
- C. BGP has no fixed 15-hop limit like RIP; its loop prevention works differently, via the AS_PATH check.
- D. Flooding LSAs with sequence numbers is link-state routing's technique (like OSPF), not BGP's.
Tip: BGP loop prevention: reject any route whose AS_PATH already contains your own AS number.
Question 8Medium
Why is OSPF divided into areas around a backbone area 0?
- To encrypt traffic between departments that belong to different areas
- To limit LSA flooding and SPF computation to smaller regions
- To allow RIP and OSPF to run together on the same routers without conflicts
- Because OSPF supports only 16 routers in total
Answer: B. To limit LSA flooding and SPF computation to smaller regions
Explanation
Areas keep link-state databases small; inter-area routes are summarised through area 0.
Step-by-step solution
- Without areas, every single OSPF router in a huge network would need to store and recompute routes over the entire topology on every change.
- Splitting into areas around a backbone (area 0) keeps each router's link-state database limited to its own area.
- Inter-area routes are instead summarised through area 0, keeping both flooding and SPF computation manageable.
Why the other options are wrong
- A. OSPF areas have nothing to do with encrypting traffic; that is a security function, not a routing scalability one.
- C. Running RIP and OSPF together is a separate topic (route redistribution), unrelated to why OSPF uses areas.
- D. OSPF has no fixed 16-router limit; areas exist purely for scalability, not because of such a cap.
Tip: OSPF areas: smaller link-state databases, faster SPF runs, inter-area routes summarised through area 0.
Question 9Hard
Which BGP variant runs between routers inside the same autonomous system?
- OSPF
- iBGP
- IGRP
- eBGP
Answer: B. iBGP
Explanation
eBGP peers sit in different autonomous systems; iBGP distributes externally learned routes among routers of the same AS.
Step-by-step solution
- BGP has two variants depending on where the peers sit.
- eBGP runs between routers in different autonomous systems.
- iBGP runs between routers inside the same autonomous system, distributing externally learned routes internally.
Why the other options are wrong
- A. OSPF is a completely separate interior routing protocol, not a variant of BGP.
- C. IGRP is an old, unrelated Cisco distance-vector protocol, not a BGP variant.
- D. eBGP specifically runs between routers in different autonomous systems, the opposite of what is being asked here.
Tip: eBGP = between different autonomous systems. iBGP = within the same autonomous system.
Question 10Hard
What does the TTL (Time To Live) field in an IPv4 header prevent?
- Packets being sent to the wrong MAC address
- Packets circulating forever in a routing loop
- Out-of-order delivery
- Packets larger than the MTU
Answer: B. Packets circulating forever in a routing loop
Explanation
Each router decrements TTL by one and discards the packet when it reaches zero, typically sending an ICMP Time Exceeded message (which traceroute relies on).
Step-by-step solution
- Every router that forwards an IPv4 packet decrements its TTL field by 1.
- If TTL reaches 0, the packet is dropped instead of being forwarded again.
- This guarantees that even a packet trapped in a routing loop eventually gets discarded rather than circulating forever.
Why the other options are wrong
- A. MAC address issues are a data link layer concern, unrelated to TTL.
- C. Ordering is handled by the transport layer, using TCP sequence numbers, not by TTL.
- D. MTU and fragmentation are handled by separate mechanisms (the DF bit, Path MTU Discovery), not TTL.
Tip: TTL = a built-in 'give up after N hops' safety net against routing loops.
Practise all 34 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →