Learn! Ten frequently asked questions in OSPF interviews

In network engineer interviews, OSPF-related questions are often asked, and it is crucial to have a deep understanding of its principles, configuration, and application scenarios. The following are 10 frequently asked OSPF knowledge points that interviewers often ask:

1. The difference between Stub, Totally Stub, and NSSA areas

Stub area: prohibits external routes (Type 5 LSA), and ABR issues default routes (Type 3 LSA).

Totally Stub area: In addition to prohibiting Type 5 LSA, Type 3 LSA is also prohibited, and only the default routes issued by ABR are retained.



NSSA area: allows the introduction of external routes (generating Type 7 LSA), prohibits Type 5 LSA, and ABR converts Type 7 LSA into Type 5 LSA and transmits it to other areas.

2. LSA types and functions

Type 1 (Router LSA): describes the interface and connection status of routers in the area.

Type 2 (Network LSA): generated by DR, describes the list of routers in the broadcast network.

Type 3 (Summary LSA): generated by ABR, total inter-area routes.

Type 4 (ASBR Summary LSA): generated by ABR, points to the location of ASBR.

Type 5 (External LSA): generated by ASBR, describes OSPF external routes.

Type 7 (NSSA External LSA): exists only in NSSA, used to carry external routes.


3. OSPF virtual link

Function: Connect non-backbone areas to backbone areas to solve the problem of unreasonable area design.

Note: This is a temporary solution. The routers at both ends must belong to the same transit area. Excessive use will increase network complexity and affect convergence stability.

4. Route aggregation implementation method

ABR aggregation: Use the following command on the ABR to aggregate the routes within the area to other areas:

ASBR aggregation: Use the following command on the ASBR:
(Need to be enabled in OSPF process) Summarize external routes. The advantage is to reduce the size of the routing table, reduce the frequency of SPF calculations, and improve the network convergence speed.

5. Authentication mechanism and configuration

Plain text authentication: authenticationmode simple <password>.

MD5 authentication: authenticationmode md5 <keyid> <password>, which is more secure. Regional/interface-level authentication configuration can be performed in the regional view or interface view.

6. OSPF GR (Graceful Restart)

Purpose: To ensure that neighbors are not interrupted when the device is restarted, avoiding route shock.
Principle: Restarting the device (Restarter) notifies the neighbor (Helper) to maintain the neighbor relationship and synchronize the LSDB after restarting.

Configuration: Both parties need to enable GR capability (`gracefulrestart enable`).

7. OSPF multi-process application scenarios

Isolate different business routes: such as enterprise network and data center.

Implement flexible routing policy control: introduce through inter-process routes. Can be used during configuration

Incremental SPF: only calculate the partial routes affected by topology changes, not the full amount.

Intelligent timer: adjust the SPF calculation interval to avoid frequent triggering.
PRC (Partial Route Calculation): Only processes LSA changes that affect the prefix.

9. Notes on the collaboration between OSPF and BGP

Route import: Be cautious when OSPF imports BGP routes and avoid routing loops through routing policy filtering.

Priority management: OSPF defaults to a higher priority than BGP, and the preference value needs to be adjusted to control route selection.

ASBR design: ASBR needs to set route redistribution (importroute bgp) and filter redundant routes.

10. Core improvements of OSPFv3 compared to OSPFv2

IPv6 support: Native support for IPv6 addresses, removing IPv4 dependency.
LSA reconstruction: Add `IntraAreaPrefixLSA` (Type 0x2009) to carry IPv6 prefix.

Authentication separation: Rely on IPv6 IPsec instead of OSPF's own authentication mechanism.

Link-local address: Use FE80::/10 address to establish neighbor relationship.

These knowledge points cover OSPF area design, LSA mechanism, route optimization, security enhancement and adaptation with IPv6. In actual network planning and troubleshooting, they need to be flexibly applied in combination with network topology and business needs.