Networking - MCQ Practice Questions
Computer networks MCQs — OSI, TCP/IP, routing & protocols.
168 questions | 100% Free
Which routing protocol uses the Bellman-Ford algorithm to calculate the best path to a destination network?
Understanding:
We need to identify which routing protocol relies on the Bellman-Ford algorithm for path calculation.
Step 1: Evaluate each protocol
RIP (Routing Information Protocol) is a distance-vector protocol that uses the Bellman-Ford algorithm to compute shortest paths. Each router shares its entire routing table with its neighbours at regular intervals.
Step 2: Eliminate incorrect options
OSPF uses Dijkstra's Shortest Path First (SPF) algorithm. EIGRP uses the Diffusing Update Algorithm (DUAL). BGP uses a path-vector algorithm based on policy attributes.
Answer:
RIP uses the Bellman-Ford algorithm to determine the best path to a destination.
Quick Tip:
A common trap is confusing RIP (Bellman-Ford) with OSPF (Dijkstra). Remember: Distance-Vector = Bellman-Ford; Link-State = Dijkstra.
What is the maximum hop count supported by RIPv2 before a route is considered unreachable?
Understanding:
We need to determine the maximum valid hop count in RIPv2.
Step 1: Recall RIP hop count limits
In RIPv2, the maximum hop count allowed for a reachable route is 15. A hop count of 16 is used to signify that the destination is unreachable (infinity metric).
Step 2: Distinguish from other protocols
A metric value of 255 is used in other contexts (e.g., OSPF administrative distance). 32 and other values are not standard RIP limits.
Answer:
The maximum valid hop count in RIPv2 is 15; a hop count of 16 means the route is unreachable.
Quick Tip:
This is why RIP is unsuitable for large networks — its scalability is severely limited by the 15-hop maximum.
In OSPF, which type of packet is used to discover and maintain neighbour relationships?
Understanding:
We need to identify the OSPF packet type responsible for neighbour discovery and maintenance.
Step 1: Review OSPF packet types
OSPF defines five packet types: Hello, DBD (Database Description), LSR (Link State Request), LSU (Link State Update), and LSAck (Link State Acknowledgement).
Step 2: Identify the function of each
The Hello packet is specifically used to discover OSPF neighbours, establish adjacencies, and maintain those relationships by being sent at regular intervals (Hello interval). DBD packets exchange database summaries, LSR requests specific link state records, and LSU carries actual link state advertisements.
Answer:
The Hello packet is used in OSPF to discover and maintain neighbour relationships.
Quick Tip:
Remember the acronym HD-LLA for the five OSPF packet types: Hello, DBD, LSR, LSU, LSAck.
Which of the following routing protocols is classified as a Path Vector protocol?
Understanding:
We need to identify which routing protocol belongs to the path-vector category.
Step 1: Classify routing protocol types
Routing protocols are broadly classified into three types based on their operation:
Step 2: Identify BGP
BGP (Border Gateway Protocol) is the standard exterior gateway protocol of the internet and is the only widely used path-vector protocol. It makes routing decisions based on path, network policies, and rule sets.
Answer:
BGP is the routing protocol classified as a path-vector protocol.
Quick Tip:
BGP is used between Autonomous Systems (inter-domain routing), while OSPF and EIGRP are used within an Autonomous System (intra-domain routing).
What is the default administrative distance of OSPF in Cisco routers?
Understanding:
We need to recall the default administrative distance (AD) assigned to OSPF on Cisco routers.
Step 1: Recall administrative distance values
Administrative distance is a value used by routers to rate the trustworthiness of routing information sources. Lower AD = more trusted. Standard Cisco AD values:
Step 2: Identify OSPF's AD
OSPF has a default administrative distance of 110 on Cisco routers.
Answer:
The default administrative distance of OSPF on Cisco routers is 110.
Quick Tip:
Memorize the sequence: EIGRP (90) < OSPF (110) < RIP (120). If all three know a route, EIGRP wins by default.
Which OSPF network type requires a Designated Router (DR) and Backup Designated Router (BDR) election?
Understanding:
We need to identify which OSPF network type triggers a DR/BDR election.
Step 1: Understand DR/BDR purpose
In networks where multiple routers share the same segment (multi-access networks), OSPF elects a Designated Router (DR) and a Backup Designated Router (BDR) to reduce the number of adjacencies and LSA flooding. Without DR/BDR, every router would form a full mesh of adjacencies.
Step 2: Evaluate each network type
Answer:
DR and BDR elections occur on Broadcast Multi-Access networks in OSPF.
Quick Tip:
On a broadcast segment with N routers, without DR/BDR there would be 2N(N−1) adjacencies. DR/BDR reduces this to N−1 adjacencies to the DR.
EIGRP uses the concept of a 'Feasible Successor'. What does a Feasible Successor represent?
Understanding:
We need to define the role of a Feasible Successor in EIGRP's DUAL algorithm.
Step 1: Understand EIGRP terminology
In EIGRP, the best path to a destination is called the Successor, and it is installed in the routing table. The Feasible Successor is an alternative backup path that is pre-computed and stored in the topology table, ready for immediate use if the Successor fails.
Step 2: The Feasibility Condition
A route qualifies as a Feasible Successor if its Reported Distance (RD) — the metric advertised by the neighbour — is less than the Feasible Distance (FD) of the current Successor path. This condition guarantees the backup path is loop-free.
Step 3: Benefit
Because the Feasible Successor is already in the topology table, EIGRP can switch to it instantly without running DUAL again, making convergence very fast.
Answer:
A Feasible Successor is a pre-computed, loop-free backup path stored in the topology table that satisfies the Feasibility Condition.
Quick Tip:
The key inequality to remember: RD of FS<FD of Successor. If this holds, the path is a valid Feasible Successor.
Which of the following best describes a 'link-state' routing protocol compared to a 'distance-vector' protocol?
Understanding:
We need to identify the defining characteristic of a link-state routing protocol.
Step 1: Distance-Vector characteristics
Distance-vector protocols (e.g., RIP) share their routing tables (distance and direction to each destination) only with directly connected neighbours. Updates propagate hop by hop, which can lead to slow convergence and routing loops.
Step 2: Link-State characteristics
Link-state protocols (e.g., OSPF, IS-IS) flood Link State Advertisements (LSAs) throughout the network so every router builds an identical topology database (LSDB). Each router then independently runs the Shortest Path First (SPF/Dijkstra) algorithm on this database to compute the best paths.
Step 3: Eliminating wrong options
Sharing the full routing table periodically describes distance-vector behaviour. Using only hop count describes RIP specifically. Hop-by-hop propagation also describes distance-vector protocols.
Answer:
A link-state protocol builds a full network topology map and runs SPF to determine the best paths.
Quick Tip:
Link-state protocols converge faster and scale better than distance-vector protocols, but they consume more CPU and memory due to SPF calculations and the topology database.
In BGP, what is the purpose of the AS_PATH attribute?
Understanding:
We need to identify the function of the BGP AS_PATH attribute.
Step 1: BGP path attributes overview
BGP selects routes based on a series of attributes. Key attributes include LOCAL_PREF, AS_PATH, MED (Multi-Exit Discriminator), NEXT_HOP, and ORIGIN.
Step 2: AS_PATH function
The AS_PATH attribute is a well-known mandatory BGP attribute that lists every Autonomous System (AS) number through which the routing update has passed. When a router advertises a prefix to a neighbour in a different AS, it prepends its own AS number to the AS_PATH.
Step 3: Dual role of AS_PATH
AS_PATH serves two purposes: (1) Loop prevention — if a router sees its own AS number in the AS_PATH, it discards the route. (2) Path selection — shorter AS_PATH is preferred during BGP best-path selection.
Answer:
The AS_PATH attribute records the sequence of Autonomous Systems a BGP route advertisement has traversed.
Quick Tip:
BGP AS_PATH prepending is a common traffic-engineering technique where an AS artificially lengthens its AS_PATH to make a route less preferred by external peers.
Which routing protocol uses multicast address 224.0.0.5 to send Hello packets to all OSPF routers on a segment?
Understanding:
We need to identify which routing protocol uses the multicast address 224.0.0.5 for Hello packets.
Step 1: Recall multicast addresses used by routing protocols
Different protocols use specific multicast addresses to limit traffic to only relevant routers:
Step 2: Confirm OSPF's use
OSPF routers send Hello packets to the multicast address 224.0.0.5, which represents all OSPF-enabled routers on the local segment. This is used for neighbour discovery and adjacency maintenance.
Answer:
OSPF uses the multicast address 224.0.0.5 to send Hello packets to all OSPF routers on a segment.
Quick Tip:
A quick memory trick: OSPF = 224.0.0.5 (All OSPF), 224.0.0.6 (DR/BDR); RIPv2 = 224.0.0.9; EIGRP = 224.0.0.10.