LSR and OSPF Comparison MCQs: 12 Solved Questions with Explanations
Solve 12 previous-year LSR and OSPF questions, then revise the distinctions among flooding, the link-state database, Dijkstra and routing tables.
KnowledgeGate Team
Exam prep & CS education

Link-state routing is an algorithm family; OSPF is an intra-domain protocol that uses it. The distinction matters: flooding creates a database, Dijkstra creates routes, and RIP uses a different approach. GATE, ISRO, UGC NET, BEL and UPPSC questions repeatedly test flooding, the link-state database, Dijkstra, routing tables, convergence, and RIP versus OSPF.
LSR and OSPF comparison: the two-minute concept map
Point | Link-state routing and OSPF |
|---|---|
Meaning | LSR is a routing approach; OSPF is an Interior Gateway Protocol that implements link-state routing. |
Information exchanged | Link-state advertisements describe local links and costs. |
Distribution | Reliable flooding within the routing domain or area. |
Router knowledge | A link-state database representing the topology. |
Computation | Each router runs Dijkstra locally. |
Result | A shortest-path tree from that router, then its routing table. |
For generic LSR context, compare Routing Algorithms: Distance Vector vs Link State.
Four routers A, B, C and D have undirected costs A-B = 2, A-C = 5, B-C = 1, B-D = 4 and C-D = 1. From A, start A = 0 and B = C = D = infinity. Settle B at 2: C becomes min(5, 2 + 1) = 3 and D becomes 2 + 4 = 6. Settle C at 3: D becomes min(6, 3 + 1) = 4. Final costs are B = 2, C = 3 through B, and D = 4 through B and C. Flooding builds the topology view; Dijkstra turns it into A's routes. See Graph Algorithms: BFS, DFS and Shortest Paths.
OSPF identity and shortest-path engine MCQs
Q1. OSPF properties and algorithm, GATE 2023, MSQ
Which of the following statements is/are INCORRECT about the OSPF (Open Shortest Path First) routing protocol used in the Internet?
(a) OSPF implements Bellman-Ford algorithm to find shortest paths.
(b) OSPF uses Dijkstra’s shortest path algorithm to implement least-cost path routing.
(c) OSPF is used as an inter-domain routing protocol.
(d) OSPF implements hierarchical routing.
Answer: (a) and (c) are incorrect. OSPF uses Dijkstra within a domain; areas add hierarchy, making (b) and (d) correct.
Q2. OSPF routing algorithm, ISRO 2014, MCQ
What is routing algorithm used by OSPF routing protocol?
(a) Distance vector
(b) Flooding
(c) Path vector
(d) Link state
Answer: (d) Link state. Flooding shares link states; OSPF computes routes from its topology database.
Q3. Dijkstra's role in routing, ISRO 2007, MCQ
Dijkstra’s algorithm is used to
(a) Create LSAs
(b) Flood an internet with information
(c) Calculate the routing tables
(d) Create a link state database
Answer: (c) Calculate the routing tables. Flooded LSAs form the link-state database. Dijkstra derives routes from it.
Q4. Shortest path first protocol family, UPPSC 2022, MCQ
Which type of routing protocol uses the shortest path first algorithm?
(a) Distance vector
(b) Link state
(c) Hybrid
(d) Sliding window
Answer: (b) Link state. Link-state routers run shortest-path-first on a topology graph. Distance-vector routers use neighbour estimates.
Link-state flooding, tables and local computation MCQs
Q5. Routing tables per router, BEL 2007, MCQ
If there are five routers and six networks in an intranet using link state routing, how many routing tables are there?
(a) 1
(b) 5
(c) 6
(d) 11
Answer: (b) 5. Each router owns one routing table, giving five. Networks are destinations inside them.
Q6. Computation after link-state packets, UGC NET 2017, MCQ
In link state routing algorithm after construction of link state packets, new routes are computed using :
(a) DES algorithm
(b) Dijkstra’s algorithm
(c) RSA algorithm
(d) Packets
Answer: (b) Dijkstra’s algorithm. Flooding builds the database, then each router runs Dijkstra. DES and RSA are cryptographic.
Q7. Distance vector versus link state behaviour, GATE 2008, MCQ
Two popular routing algorithms are Distance Vector (DV) and Link State (LS) routing. Which of the following are true?
(S1) Count to infinity is a problem only with DV and not LS routing.
(S2) In LS, the shortest path algorithm is run only at one node.
(S3) In DV, the shortest path algorithm is run only at one node.
(S4) DV requires a lesser number of network messages than LS.
(a) S1, S2 and S4 only
(b) S1, S3 and S4 only
(c) S2 and S3 only
(d) S1 and S4 only
Answer: (d) S1 and S4 only. Count to infinity affects DV, which usually sends fewer messages; distributed computation makes S2 and S3 false.
Q8. Link-state overhead and convergence, GATE 2014, MCQ
Consider the following three statements about link state and distance vector routing protocols, for a large network with 500 network nodes and 4000 links.
[S1] The computational overhead in link state protocols is higher than in distance vector protocols.
[S2] A distance vector protocol (with split horizon) avoids persistent routing loops, but not a link state protocol.
[S3] After a topology change, a link state protocol will converge faster than a distance vector protocol.
Which one of the following is correct about S1, S2, and S3 ?
(a) S1, S2, and S3 are all true.
(b) S1, S2, and S3 are all false.
(c) S1 and S2 are true, but S3 is false.
(d) S1 and S3 are true, but S2 is false.
Answer: (d) S1 and S3 are true, but S2 is false. Link state costs more but converges faster; split horizon limits only some DV loops.
RIP, OSPF and algorithm-comparison MCQs
Q9. RIP and OSPF statements, GATE 2017, MCQ
Consider the following statements about the routing protocols. Routing Information Protocol (RIP) and Open Shortest Path First (OSPF) in an IPv4 network.
I. RIP uses distance vector routing
II. RIP packets are sent using UDP
III. OSPF packets are sent using TCP
IV. OSPF operation is based on link-state routing
Which of the above statements are CORRECT?
(a) I and IV only
(b) I, II and III only
(c) I, II and IV only
(d) II, III and IV only
Answer: (c) I, II and IV only. RIP is distance vector over UDP; OSPF is link state over IP, not TCP.
Q10. Mixed routing-protocol claims, UGC NET 2023, MCQ
Which of the following statement/s is / are NOT CORRECT ?
(A) OSPF is based on distance-vector routing protocol.
(B) Both link-state and distance-vector routing are based on the least cost goal.
(C) BGP4 is based on the path-vector algorithm.
(D) The three-node instability can be avoided using split horizon combined with poison reverse.
(E) RIP is based on link state algorithm.
Choose the correct answer from the options given below :
(a) (A), (D) and (E) Only
(b) (A) and (B) Only
(c) (B) and (C) Only
(d) (B), (C) and (E) Only
Answer: (a) (A), (D) and (E) only. OSPF is link state and RIP distance vector; poison reverse cannot prevent every three-node instability.
Q11. Bellman-Ford and Dijkstra matching, GATE 2025, MCQ
Consider the routing protocols given in List I and the names given in List II:
List I: (i) Distance Vector routing; (ii) Link state routing.
List II: (a) Bellman-Ford; (b) Dijkstra.
For matching of items in List I with those in List II, which ONE of the following options is CORRECT?
(a) (i) – (a) and (ii) – (b)
(b) (i) – (a) and (ii) – (a)
(c) (i) – (b) and (ii) – (a)
(d) (i) – (b) and (ii) – (b)
Answer: (a) (i) – (a) and (ii) – (b). Distance vector uses the Bellman-Ford recurrence. Link state gives every router a graph for Dijkstra.
Q12. RIP versus OSPF algorithm families, GATE 2014, MCQ
Which of the following is TRUE about the interior gateway routing protocols − Routing Information Protocol (RIP) and Open Shortest Path First (OSPF)
(a) RIP uses distance vector routing and OSPF uses link state routing
(b) OSPF uses distance vector routing and RIP uses link state routing
(c) Both RIP and OSPF use link state routing
(d) Both RIP and OSPF use distance vector routing
Answer: (a) RIP uses distance vector routing and OSPF uses link state routing. Other options swap or collapse the families.
LSR and OSPF MCQ traps to check before locking an answer
Trap | Tempting wrong claim | Correction |
|---|---|---|
LSR family versus OSPF protocol | LSR equals OSPF. | LSR is an approach; OSPF is a link-state IGP. |
Flooding versus Dijkstra | Flooding finds paths. | Flooding shares LSAs; Dijkstra finds paths. |
Link-state database versus routing table | The LSDB is the routing table. | The table is derived from the LSDB graph. |
One table per router versus one per network | There is one table per network. | One table belongs to each router. |
RIP over UDP versus OSPF directly over IP | OSPF uses TCP. | RIP uses UDP; OSPF runs directly over IP. |
Poison reverse limits versus complete loop prevention | Poison reverse stops every loop. | It limits certain loops, not all. |
For Q2 and Q3, flooding tells A about A-B = 2, A-C = 5, B-C = 1, B-D = 4 and C-D = 1. Dijkstra, not flooding, produces A-B-C-D at cost 4.
How GATE, ISRO and UGC NET test LSR and OSPF
Direct classification and algorithm matching: Q2, Q4, Q6, Q11 and Q12.
Statement elimination about operation and transport: Q1, Q7, Q9 and Q10.
Applied reasoning about tables, overhead and convergence: Q5 and Q8.
Attempt every question without notes, mark guesses, review the trap table, then retry each miss. For distance-vector depth, use DVR, RIP and Split Horizon MCQs: 12 Solved Questions with Explanations, which owns neighbour exchange, hop-count metrics, count-to-infinity, split horizon and routing-table updates; here RIP appears only as a contrast to OSPF and link-state routing.
LSR and OSPF comparison: the short version and next step
OSPF is a link-state IGP: LSAs are flooded, each router builds a topology database, and Dijkstra produces its shortest-path tree and routing table. For A-B-C-D at cost 4, flooding supplies the five link costs and Dijkstra finds the route. Continue with GATE CS Exam Preparation Courses & Test Series or combine theory and practice through GATE Guidance by Sanchit Sir.
Keep learning

Computer Networks Basics & Criteria MCQs: 12 Solved Questions with Explanations
Solve 12 Computer Networks questions, then use clear explanations and worked criteria checks to separate similar terms confidently.

TCP Timers, RTT Estimation & SWS: 10 Solved MCQs and NATs
Solve 10 TCP exam questions covering timer roles, Silly Window Syndrome, recursive RTT estimates, Jacobson/Karels RTO and Karn's rule.

RSA Algorithm MCQs: 12 Solved Questions with Step-by-Step Explanations
Practise RSA key generation, modular inverses, encryption, signatures and defining equations, with concise working for conceptual and numerical answers.

Firewall, VPN, IDS and IPS MCQs: 11 Network Security Questions Solved
Solve 11 previous-year questions on firewalls, VPNs, IDS and IPS. Learn rule filtering, connection state, DMZ design, IPsec modes, tunnels and signatures.