0% found this document useful (0 votes)
50 views17 pages

Top 45 OSPF Configuration and Troubleshooting Interview Questions and Answers

Uploaded by

premrajv90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views17 pages

Top 45 OSPF Configuration and Troubleshooting Interview Questions and Answers

Uploaded by

premrajv90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Top 45 OSPF

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

1. What is OSPF, and why is it widely used?

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.

2. How do you configure a basic OSPF setup on a Cisco router?

Answer:

1. Enter global configuration mode: router ospf <process-id>.


2. Define router ID: router-id x.x.x.x.
3. Specify networks: network <ip-address> <wildcard-mask> area <area-id>.

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

3. What is the significance of OSPF areas?

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.

4. How does OSPF calculate the best path?

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:

Reference Bandwidth (100 Mbps) / Interface Bandwidth (1 Gbps) = 1

5. How do you troubleshoot OSPF adjacency issues?

Answer:

1. Check interface status: show ip interface brief.


2. Verify OSPF configuration: show ip ospf neighbor.
3. Confirm network types and area IDs match.
4. Debug OSPF packets: debug ip ospf adjacency.

Example:
If Router1 doesn't form adjacency with Router2, ensure both share the same area and network
type.

6. What are OSPF states, and why are they important?

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.

7. How does OSPF handle loop prevention?

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.

8. What is OSPF's "Passive Interface," and why use it?

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

9. What is OSPF route summarization? How do you configure it?

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

10. Explain OSPF network types.

Answer:
OSPF supports different network types:

 Broadcast (e.g., Ethernet)


 Point-to-Point (e.g., WAN links)
 Non-Broadcast Multi-Access (NBMA, e.g., Frame Relay)

Example:
For NBMA, configure neighbors manually using:

neighbor <ip-address>

11. How do you troubleshoot OSPF routing loops?

Answer:

1. Check area configuration.


2. Verify summarization and redistribution settings.
3. Inspect LSAs with show ip ospf database.

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:

 Type 1: Router LSA


 Type 2: Network LSA
 Type 3: Summary LSA

Example:
Use show ip ospf database to view LSA details.

13. What is the difference between OSPF and EIGRP?

Answer:

 OSPF: Link-state protocol; uses cost metric.


 EIGRP: Distance-vector protocol; uses composite metric.

Example:
OSPF is better for large, complex networks; EIGRP is simpler to configure in small
networks.

14. How do you configure OSPF authentication?

Answer:

1. Enable authentication:

area <area-id> authentication

2. Configure a key:

ip ospf authentication-key <password>

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

15. What is the role of the DR and BDR in OSPF?

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:

16. What is an OSPF Router ID, and how is it selected?

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:

1. Manually configured Router ID using router-id.


2. Highest IP address on a loopback interface.
3. Highest IP address on an active physical interface.

Example:
If the Router ID is manually set to 1.1.1.1 using:

router ospf 1
router-id 1.1.1.1

This ID overrides all other selections.

17. What is the purpose of OSPF areas?

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

 Branches: Area 1, Area 2, etc.

18. How do you verify OSPF neighbors?

Answer:
Use the show ip ospf neighbor command. It displays OSPF neighbors' states, Router IDs,
and interfaces.

Example Output:

Router# show ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:38 192.168.1.2 Gig0/0

19. How does OSPF calculate the cost of a link?

Answer:
The OSPF cost is calculated as:

Cost=ReferenceBandwidth/InterfaceBandwidthCost = Reference Bandwidth / Interface


Bandwidth

Default Reference Bandwidth: 100 Mbps.

Example:
For a 1 Gbps link:

Cost=100/1000=1Cost = 100 / 1000 = 1

You can modify the reference bandwidth globally:

router ospf 1
auto-cost reference-bandwidth 10000

20. What are OSPF Hello and Dead timers, and why are they important?

Answer:

 Hello Timer: Interval for sending Hello packets (default: 10 seconds).


 Dead Timer: Time to wait before declaring a neighbor down (default: 40 seconds).

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

21. What is a DR and BDR in OSPF? How are they elected?

Answer:
In multi-access networks, OSPF elects:

 Designated Router (DR): Manages LSA updates.


 Backup Designated Router (BDR): Takes over if DR fails.

Election Process: Based on OSPF Priority (default: 1). Higher priority wins.

Example Configuration:

interface GigabitEthernet0/0
ip ospf priority 100

22. What is an OSPF Stub Area?

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

23. How do you configure OSPF route summarization?

Answer:
Summarization reduces the number of LSAs and routing table entries.

Inter-area Summarization Example:

router ospf 1
area 1 range 192.168.0.0 255.255.252.0

External Route Summarization Example:

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

24. How do you troubleshoot OSPF adjacency issues?

Answer:

1. Check interface IP/subnet mask.


2. Verify Hello/Dead timers: show ip ospf interface.
3. Confirm area numbers match.
4. Check for mismatched authentication.

Example Command:

debug ip ospf adj

25. What are Type 1 LSAs in OSPF?

Answer:
Type 1 LSAs (Router LSAs) are generated by all routers to describe directly connected links
within an area.

Example Output (Router LSA):

Link ID: 10.0.0.1, Metric: 10


Connected to: GigabitEthernet0/0

26. What is OSPF Redistribution, and how is it configured?

Answer:
Redistribution imports routes from other protocols into OSPF.

Example: Redistribute static routes into OSPF:

router ospf 1
redistribute static subnets

27. How does OSPF handle link failures?

Answer:
OSPF uses the Dijkstra SPF algorithm to recalculate paths when a link fails. Convergence
depends on timers and network size.

Example Command to Check Topology Changes:

show ip ospf database

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

28. What is the purpose of a virtual link in OSPF?

Answer:
Virtual links connect isolated areas to Area 0.

Example Configuration:

router ospf 1
area 1 virtual-link 2.2.2.2

29. What is OSPF NSSA (Not-So-Stubby Area)?

Answer:
An NSSA allows external routes (Type 7 LSAs) while retaining stub properties.

Example Configuration:

router ospf 1
area 1 nssa

30. How do you ensure OSPF scalability?

Answer:

1. Use areas to limit LSAs.


2. Summarize routes.
3. Configure stub or NSSA areas.

Example:
For a large network, divide into areas and summarize at ABRs:

area 1 range 10.1.0.0 255.255.0.0

31. What is the difference between OSPF broadcast and non-broadcast


networks?

Answer:

 Broadcast Networks: Automatically elect a DR/BDR and form adjacencies using


multicast (e.g., Ethernet).
 Non-Broadcast Networks: Require manual neighbor configuration as multicast is
not supported (e.g., Frame Relay).

Example: Configuring neighbors in non-broadcast networks:


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

router ospf 1
neighbor 192.168.1.2

32. How does OSPF handle authentication?

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

33. What is an ABR in OSPF, and what is its function?

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:

 Internal Routes: Learned within the OSPF domain (intra-area or inter-area).


 External Routes: Redistributed into OSPF from another protocol or static routes.

Example Command to View Routes:

show ip route ospf

36. What is the significance of the OSPF metric type in redistributed


routes?

Answer:
OSPF supports two metric types for external routes:

 Type 1 (E1): Adds internal OSPF cost to the external cost.


 Type 2 (E2): Only uses external cost (default).

Example Configuration:

router ospf 1
redistribute static subnets metric-type 1

37. How do you configure OSPF default routes?

Answer:
Default routes can be injected into OSPF using the default-information originate
command.

Example Configuration:

router ospf 1
default-information originate always

38. How does OSPF manage multi-area networks?

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

area 1 range 192.168.0.0 255.255.252.0

39. What are Type 2 LSAs in OSPF?

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:

Link ID: 192.168.1.1


Link Data: 255.255.255.0
Attached Router: 1.1.1.1

40. How do you configure OSPF timers to improve convergence?

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

41. What is OSPF graceful restart, and how is it configured?

Answer:
Graceful restart allows OSPF to continue forwarding traffic during a restart by preserving
neighbor relationships.

Example Configuration:

router ospf 1
graceful-restart

42. How do you troubleshoot OSPF route flapping?

Answer:
Check for:

1. Interface flapping: show ip interface brief.


2. Mismatched timers: show ip ospf interface.
3. Neighbor issues: debug ip ospf adj.

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:

show ip ospf log

43. What is the difference between inter-area and intra-area OSPF


routes?

Answer:

 Intra-Area Routes: Learned within the same area.


 Inter-Area Routes: Learned from a different area via an ABR.

Example:
Routing Table Entry:

O IA 192.168.1.0/24 [110/20] via 10.0.0.1

44. What is the OSPF "overload" command, and when is it used?

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

45. How do you filter OSPF routes using distribute lists?

Answer:
Distribute lists control routes advertised or received in OSPF.

Example Configuration:

access-list 10 deny 192.168.1.0 0.0.0.255


access-list 10 permit any
router ospf 1
distribute-list 10 in

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

You might also like