Top 45 OSPF Configuration and Troubleshooting Interview Questions and Answers
Top 45 OSPF Configuration and Troubleshooting Interview Questions and Answers
Configuration and
Troubleshooting
Interview
Questions and
Answers
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
Contents
1. What is OSPF, and why is it widely used? ................................................................. 4
2. How do you configure a basic OSPF setup on a Cisco router? .................................. 4
3. What is the significance of OSPF areas? ................................................................... 4
4. How does OSPF calculate the best path? .................................................................. 4
5. How do you troubleshoot OSPF adjacency issues? ................................................... 5
6. What are OSPF states, and why are they important? ................................................. 5
7. How does OSPF handle loop prevention?.................................................................. 5
8. What is OSPF's "Passive Interface," and why use it? ................................................. 5
9. What is OSPF route summarization? How do you configure it? ................................. 6
10. Explain OSPF network types. ................................................................................... 6
11. How do you troubleshoot OSPF routing loops? ........................................................ 6
12. What are OSPF LSAs, and how many types are there? ........................................... 7
13. What is the difference between OSPF and EIGRP? ................................................. 7
14. How do you configure OSPF authentication? ........................................................... 7
15. What is the role of the DR and BDR in OSPF? ......................................................... 8
16. What is an OSPF Router ID, and how is it selected?................................................ 8
17. What is the purpose of OSPF areas? ....................................................................... 8
18. How do you verify OSPF neighbors?........................................................................ 9
19. How does OSPF calculate the cost of a link? ........................................................... 9
20. What are OSPF Hello and Dead timers, and why are they important? ..................... 9
21. What is a DR and BDR in OSPF? How are they elected? ...................................... 10
22. What is an OSPF Stub Area? ................................................................................. 10
23. How do you configure OSPF route summarization? ............................................... 10
24. How do you troubleshoot OSPF adjacency issues? ............................................... 11
25. What are Type 1 LSAs in OSPF? ........................................................................... 11
26. What is OSPF Redistribution, and how is it configured? ......................................... 11
27. How does OSPF handle link failures? .................................................................... 11
28. What is the purpose of a virtual link in OSPF? ....................................................... 12
29. What is OSPF NSSA (Not-So-Stubby Area)? ......................................................... 12
30. How do you ensure OSPF scalability? ................................................................... 12
31. What is the difference between OSPF broadcast and non-broadcast networks?.... 12
32. How does OSPF handle authentication? ................................................................ 13
33. What is an ABR in OSPF, and what is its function? ................................................ 13
34. How do you configure OSPF passive interfaces, and why are they useful? ........... 13
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
35. What is the difference between internal and external OSPF routes? ...................... 14
36. What is the significance of the OSPF metric type in redistributed routes? .............. 14
37. How do you configure OSPF default routes?.......................................................... 14
38. How does OSPF manage multi-area networks? ..................................................... 14
39. What are Type 2 LSAs in OSPF? ........................................................................... 15
40. How do you configure OSPF timers to improve convergence? ............................... 15
41. What is OSPF graceful restart, and how is it configured? ....................................... 15
42. How do you troubleshoot OSPF route flapping?..................................................... 15
43. What is the difference between inter-area and intra-area OSPF routes? ................ 16
44. What is the OSPF "overload" command, and when is it used? ............................... 16
45. How do you filter OSPF routes using distribute lists? ............................................. 16
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
Answer:
OSPF (Open Shortest Path First) is a link-state routing protocol that uses Dijkstra's algorithm
to determine the shortest path. It's widely used due to its scalability, fast convergence, and
support for features like VLSM, authentication, and route summarization.
Example:
A company with multiple branches uses OSPF to maintain an optimal routing table and
reduce routing loops.
Answer:
Example:
To configure OSPF on Router1:
router ospf 1
router-id 1.1.1.1
network 192.168.1.0 0.0.0.255 area 0
Answer:
OSPF areas help segment networks to improve scalability and reduce the size of the routing
table. Area 0 is the backbone area, and all other areas must connect to it.
Example:
In a multi-branch network, Area 0 acts as the core, while branch offices are in non-backbone
areas.
Answer:
OSPF uses cost, calculated as Cost = Reference Bandwidth / Interface Bandwidth.
The path with the lowest cumulative cost is selected.
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
Example:
For a GigabitEthernet link, the cost is:
Answer:
Example:
If Router1 doesn't form adjacency with Router2, ensure both share the same area and network
type.
Answer:
OSPF states are: Down, Init, Two-Way, ExStart, Exchange, Loading, and Full. These reflect
the progression of neighbor establishment.
Example:
A router stuck in the Init state may indicate a unidirectional communication issue.
Answer:
OSPF uses a tree-like structure called an SPF tree, ensuring only one path to a destination is
used.
Example:
If two routers advertise the same route, OSPF selects the lowest-cost path.
Answer:
Passive interfaces prevent OSPF from sending Hello packets on an interface. This is used for
security or when adjacency isn’t required.
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
Example:
To make the LAN interface passive:
router ospf 1
passive-interface GigabitEthernet0/1
Answer:
Route summarization reduces the size of the routing table by aggregating routes into a
summary.
Example:
To summarize in Area 1:
router ospf 1
area 1 range 10.0.0.0 255.255.0.0
Answer:
OSPF supports different network types:
Example:
For NBMA, configure neighbors manually using:
neighbor <ip-address>
Answer:
Example:
A loop may arise if a route is improperly advertised between areas.
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
12. What are OSPF LSAs, and how many types are there?
Answer:
OSPF LSAs (Link-State Advertisements) share topology information. Common types
include:
Example:
Use show ip ospf database to view LSA details.
Answer:
Example:
OSPF is better for large, complex networks; EIGRP is simpler to configure in small
networks.
Answer:
1. Enable authentication:
2. Configure a key:
Example:
router ospf 1
area 0 authentication
interface GigabitEthernet0/0
ip ospf authentication-key cisco123
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
Answer:
The Designated Router (DR) and Backup DR (BDR) minimize LSA flooding in broadcast
networks. DRs form adjacencies with all other routers.
Example:
Use the show ip ospf neighbor command to identify the DR and BDR.
Apologies for the incomplete answers earlier. Let me rewrite all 30 questions with detailed
answers and examples to ensure clarity and completeness. Here’s the full set:
Answer:
The OSPF Router ID is a unique identifier used by a router in the OSPF network for
identification. It is selected in this priority order:
Example:
If the Router ID is manually set to 1.1.1.1 using:
router ospf 1
router-id 1.1.1.1
Answer:
OSPF areas are used to divide large networks into smaller sections to reduce routing table
size and LSA flooding.
Area 0 (Backbone Area): Central hub to which all other areas connect.
Non-backbone Areas: Used for internal communication within a section of the
network.
Example:
For a network with branches in different regions:
Backbone: Area 0.
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
Answer:
Use the show ip ospf neighbor command. It displays OSPF neighbors' states, Router IDs,
and interfaces.
Example Output:
Answer:
The OSPF cost is calculated as:
Example:
For a 1 Gbps link:
router ospf 1
auto-cost reference-bandwidth 10000
20. What are OSPF Hello and Dead timers, and why are they important?
Answer:
Example Configuration:
interface GigabitEthernet0/0
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
ip ospf hello-interval 5
ip ospf dead-interval 20
Answer:
In multi-access networks, OSPF elects:
Election Process: Based on OSPF Priority (default: 1). Higher priority wins.
Example Configuration:
interface GigabitEthernet0/0
ip ospf priority 100
Answer:
Stub areas block external routes (Type 5 LSAs) to reduce routing table size. Only a default
route is injected into the stub area.
Example Configuration:
router ospf 1
area 1 stub
Answer:
Summarization reduces the number of LSAs and routing table entries.
router ospf 1
area 1 range 192.168.0.0 255.255.252.0
router ospf 1
redistribute static subnets
summary-address 10.1.0.0 255.255.0.0
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
Answer:
Example Command:
Answer:
Type 1 LSAs (Router LSAs) are generated by all routers to describe directly connected links
within an area.
Answer:
Redistribution imports routes from other protocols into OSPF.
router ospf 1
redistribute static subnets
Answer:
OSPF uses the Dijkstra SPF algorithm to recalculate paths when a link fails. Convergence
depends on timers and network size.
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
Answer:
Virtual links connect isolated areas to Area 0.
Example Configuration:
router ospf 1
area 1 virtual-link 2.2.2.2
Answer:
An NSSA allows external routes (Type 7 LSAs) while retaining stub properties.
Example Configuration:
router ospf 1
area 1 nssa
Answer:
Example:
For a large network, divide into areas and summarize at ABRs:
Answer:
router ospf 1
neighbor 192.168.1.2
Answer:
OSPF supports three types of authentication:
1. None (Default)
2. Simple (Clear-text passwords):
3. interface Gig0/0
4. ip ospf authentication-key mypassword
5. router ospf 1
6. area 0 authentication
7. MD5 (Encrypted passwords):
8. interface Gig0/0
9. ip ospf authentication message-digest
10. ip ospf message-digest-key 1 md5 mypassword
Answer:
An Area Border Router (ABR) connects multiple OSPF areas, summarizing and
redistributing routes between them. It contains LSDBs for all connected areas.
Example:
A router connected to Area 0 and Area 1:
router ospf 1
network 10.0.0.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 1
34. How do you configure OSPF passive interfaces, and why are they
useful?
Answer:
Passive interfaces prevent OSPF from sending Hello packets, conserving resources and
improving security on unused links.
Example Configuration:
router ospf 1
passive-interface default
no passive-interface GigabitEthernet0/0
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
35. What is the difference between internal and external OSPF routes?
Answer:
Answer:
OSPF supports two metric types for external routes:
Example Configuration:
router ospf 1
redistribute static subnets metric-type 1
Answer:
Default routes can be injected into OSPF using the default-information originate
command.
Example Configuration:
router ospf 1
default-information originate always
Answer:
In multi-area OSPF, ABRs summarize routes to reduce LSDB size and ensure scalability.
LSAs are filtered between areas.
Example:
router ospf 1
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
Answer:
Type 2 LSAs (Network LSAs) are generated by the DR in broadcast and non-broadcast
networks. They describe routers connected to a multi-access network.
Example Output:
Answer:
Lowering Hello and Dead timers can improve convergence but may increase CPU utilization.
Example Configuration:
interface GigabitEthernet0/0
ip ospf hello-interval 2
ip ospf dead-interval 8
Answer:
Graceful restart allows OSPF to continue forwarding traffic during a restart by preserving
neighbor relationships.
Example Configuration:
router ospf 1
graceful-restart
Answer:
Check for:
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
Example Command:
Answer:
Example:
Routing Table Entry:
Answer:
The overload command prevents a router from being used as a transit router by advertising a
maximum metric.
Example Configuration:
router ospf 1
max-metric router-lsa
Answer:
Distribute lists control routes advertised or received in OSPF.
Example Configuration:
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088
45 Interview Q&A for OSPF Configuration and Troubleshooting | [email protected] | +91 9739521088