< Home

OSPF GR

This section described the related concepts and the implementation process of OSPF GR.

OSPF graceful restart (GR) allows packets to be forwarded during OSPF restart. OSPF GR ensures service continuity and improves network reliability.

Background

When the router restarts or performs a master/slave main control board switchover, it immediately ages all routing entries in the forwarding information base (FIB), which causes route interruptions. An adjacent router deletes the router from its neighbor list and notifies other routers of the restart or switchover. As a result, shortest path first (SPF) calculations are performed on the entire network again. If the router recovers in a short time, a neighbor relationship is reestablished. Frequent neighbor relationship changes cause route flapping.

To resolve this issue and avoid unnecessary SPF calculations, enable OSPF GR. After you enable OSPF GR on the router, the router restarts OSPF in GR mode and notifies an adjacent router that it will recover immediately. In this situation, the adjacent router does not delete the OSPF GR-enabled router from its neighbor list and other routers do not detect that the OSPF GR-enabled router is restarting. OSPF GR prevents route flapping caused by neighbor relationship changes. As shown in Figure 1, router A, router B, router C, and router D run OSPF, and router A and router B have OSPF GR enabled. When router A restarts in GR mode, router B helps router A perform a GR without notifying router C or router D of the GR. This process ensures service continuity.

Figure 1 OSPF GR

Related Concepts

  • GR

    GR is one of high availability (HA) technologies, which comprise a set of comprehensive technologies, such as fault-tolerant redundancy, link protection, faulty node recovery, and traffic engineering. GR, a fault-tolerant redundancy technology, has been widely used for router upgrades and master/slave main control board switchovers. GR ensures proper traffic forwarding and service continuity during a routing protocol restart.

    GR is classified into the following types by status:

    • Totally GR: When a neighbor of a router does not support GR, the router leaves the GR state.
    • Partly GR: When a neighbor of a router does not support GR, only the router's interface connected to this neighbor leaves the GR state.

    GR is classified into the following types based on the implementation mode:

    • Planned GR: allows you to configure the router to restart or perform a master/slave main control board switchover. The restarter sends a grace link state advertisement (LSA) before the restart or master/slave main control board switchover.
    • Unplanned GR: allows the router to restart or perform a master/slave main control board switchover when the router fails. The router immediately performs a master/slave main control board switchover without sending a grace LSA. When the slave main control board goes Up, the router enters the GR state.
  • Grace LSA

    When the router enters or leaves the GR state, it sends grace LSAs to notify its neighbors of the GR period, cause, and interface address.

  • Restarter

    A restarter is a restarting router that can be configured to support totally or partly GR.

  • Helper

    A helper helps a restarter maintain routing information and can be configured to support planned or unplanned GR. A policy can also be configured to enable the helper to selectively support GR.

  • GR period

    A GR period is the time during which a GR is performed. The GR period cannot exceed 1800 seconds. A router can leave the GR state without waiting for GR to expire.

Implementation

Table 1 describes differences between master/slave main control board switchovers with OSPF GR enabled and disabled.

Table 1 Differences between master/slave main control board switchovers with OSPF GR enabled and disabled

Item

Master/Slave Main Control Board Switchover with OSPF GR Disabled

Master/Slave Main Control Board Switchover with OSPF GR Enabled

Neighbor establishment

OSPF neighbor relationships are reestablished.

OSPF neighbor relationships are reestablished.

Route calculation

Routes are recalculated.

Routes are recalculated.

FIB

FIBs change.

FIBs remain unchanged.

Route flapping

The entire network detects route changes, and route flapping occurs for a short period of time.

Except the neighbors of the router on which a master/slave main control board switchover occurred, other routers do not detect route changes.

Impact on services

Packets are lost during forwarding, and services are interrupted.

No packets are lost during forwarding, and services are not affected.

Figure 2 shows an OSPF GR process.

Figure 2 OSPF GR process

An OSPF GR process includes the following procedures:
  1. The restarter (router A) enters the GR state.

    1. The restarter performs a master/slave main control board switchover.

      In planned GR mode, the restarter sends a grace LSA to each neighbor to notify them of the GR start, period, and cause before performing a master/slave main control board switchover. In unplanned GR mode, the restarter does not send grace LSAs.
    2. Before the restarter enters the GR state, it sends a grace LSA to maintain OSPF neighbor relationships.
    3. When the slave main control board goes Up, the restarter immediately sends a grace LSA to notify the helper (router B) of the GR start, period, and cause. Then, the restarter sends five consecutive grace LSAs to the helper to ensure that the helper can receive a grace LSA.

      Sending five consecutive grace LSAs is proposed by vendors and has not been defined by OSPF.

    During the GR, the helper retains a neighbor relationship with the restarter. Other routers do not detect the master/slave main control board switchover performed by the restarter.

  2. The restarter stays in the GR state.

    1. The restarter and helper establish an OSPF adjacency.
    2. The helper checks the restarter status. If the restarter status is Down, the helper considers that the restarter can restore services within a specified GR period. Before the specified GR period expires, the helper does not terminate sessions or delete the topology or routing information obtained from the restarter.
    3. When the restarter recovers, it sends a packet to the helper. After the restarter receives a response, it reestablishes a neighbor relationship with the helper.
    4. The restarter establishes a session with the helper to obtain topology or routing information and uses the information to calculate its own routing table.

    A master/slave main control board switchover or restarter restart can be manually performed or automatically triggered by faults. During the master/slave main control board switchover or restarter restart, the restarter does not delete the routing information from its routing table or FIB or reset its interface boards. This process ensures service continuity.

  3. The restarter leaves the GR state.

    • If the GR is successful, the restarter reestablishes a neighbor relationship with the helper before the GR period expires. After the helper receives a grace LSA with an aging time of 3600 seconds from the restarter, the status of the neighbor relationship between the helper and restarter changes to Full.

    • If the GR fails, several cases occur on the restarter and helper.

      The following conditions occur on the restarter:
      • The GR expires, and the neighbor relationship does not recover completely.

      • Type 1 or Type 2 LSAs sent by the helper cause the restarter to fail to perform a bidirectional check.

      • The status of the interface that functions as the restarter changes.

      • The restarter receives 1-way Hello packets from the helper.

      • The restarter receives grace LSAs generated by another router on the same network segment.

        Only one router can perform a GR on the same network segment at the same time.
      • Different designated routers (DRs) or backup designated routers (BDRs) are elected among the restarter and neighbors on the same network segment due to topology changes.

      The following conditions occur on the helper:

      • The helper does not receive grace LSAs from the restarter before the neighbor relationship expires.

      • The status of the interface that functions as the helper changes.

      • The helper receives LSAs, which are different from the LSAs in its own link state database (LSDB), from other routers. You can configure the helper not to perform a strict LSA check to avoid this issue.

      • The helper receives grace LSAs from two routers on the same network segment at the same time.

      • The neighbor relationships between the helper and other routers change.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >