Sample Configuration for Testing OSPF Planned Graceful Restart

During a planned restart, the restarting router informs the neighbors before restarting. The neighbors act as if the router is still within the network topology and continue forwarding traffic to the restarting router. A grace period is set to specify the time period till which the neighbors should consider the restarting router as part of the topology.

The prerequisite configuration mentioned in section 3.2 Configuration Guidelines (Prerequisite) should be done in the switches ISS1, ISS2, ISS3, ISS4, and ISS8 before configuring OSPF.

Figure 1. Topology for Testing OSPF Planned Graceful Restart


Configurations in ISS1:

  1. Execute the following commands.

    Type the following:

    • Enter the Global Configuration Mode in ISS1.
    iS5comm# configure terminal
    • Enable OSPF globally in the switch and enter the Router Configuration mode.
    iS5comm(config)# router ospf
    • Configure the OSPF router ID.
    iS5comm (config-router)# router-id 10.10.2.1
    • Configure the OSPF interfaces.
    iS5comm (config-router)# network 10.4.0.1 area 0.0.0.0
    • Enable opaque functionality in ISS1.
    iS5comm (config-router)# capability opaque
    • Enable graceful restart support in ISS1. This configuration enables ISS1 to support planned restart.
    iS5comm (config-router)# nsf ietf restart-support plannedOnly
    • Configure the graceful restart timeout interval as 50 seconds in ISS1.
    iS5comm (config-router)# nsf ietf restart-interval 50
    • Configure the Grace-LSA Ack required state as enabled in ISS1.
    iS5comm (config-router)# nsf ietf grace lsa ack required
    • Configure the Grace LSA retransmission count as 100 in ISS1.
    iS5comm (config-router)# nsf ietf grlsa retrans count 100
    • Exit the Router Configuration Mode.
    iS5comm (config-router)# end
  2. View the Configuration done in ISS1.

    Type the following:

    iS5comm# show ip ospf
    OSPF Router with ID (10.10.2.1) (Vrf  default)
    Supports only single TOS(TOS0) route
    ABR Type supported is Standard ABR
    It is an Area Border Router
    Number of Areas in this router is 2
    Area is 0.0.0.6
    Number of interfaces in this area is 1
    SPF algorithm executed 9 times
    Area is 0.0.0.0
    Number of interfaces in this area is 1
    SPF algorithm executed 9 times
    Planned Non-Stop Forwarding enabled
    Restart-interval limit: 50
    Grace LSA Retransmission Count: 100
    Helper Grace LSA ACK :Required
    Restart Reason is:
    Unknown
    Helper is Giving Support for:
    Unknown
    Software Restart
    Software Reload/Upgrade
    Switch To Redundant
    Helper Grace Time Limit: 0
    Strict LSA checking State Is:Disabled
    Route calculation staggering is enabled
    Route calculation staggering interval is  10 seconds

Configurations in ISS2

  1. Execute the following commands.

    Type the following:

    • Enter the Global Configuration Mode in ISS2.
    iS5comm# configure terminal
    • Enable OSPF globally in the switch and enter the Router Configuration mode.
    iS5comm(config)# router ospf
    • Configure the OSPF router ID.
    iS5comm (config-router)# router-id 10.10.2.2
    • Configure the OSPF interfaces.
    iS5comm (config-router)# network 10.4.0.2 area 0.0.0.0
    • Exit the Router Configuration Mode.
    iS5comm (config-router)# end
  2. View the Configuration done in ISS2. Also check, if by default ISS2 is providing helper support for all four type of restart reasons.

    Type the following:

    iS5comm# show ip ospf
    OSPF Router with ID (10.10.2.2) (Vrf  default)
    Supports only single TOS(TOS0) route
    ABR Type supported is Standard ABR
    It is an Area Border Router
    Number of Areas in this router is 2
    Area is 0.0.0.6
    Number of interfaces in this area is 1
    SPF algorithm executed 9 times
    Area is 0.0.0.0
    Number of interfaces in this area is 1
    SPF algorithm executed 9 times
    Planned Non-Stop Forwarding enabled
    Restart-interval limit: 50
    Grace LSA Retransmission Count: 100
    Helper Grace LSA ACK :Required
    Restart Reason is:
    Unknown
    Helper is Giving Support for:
    Unknown
    Software Restart
    Software Reload/Upgrade
    Switch To Redundant
    Helper Grace Time Limit: 0
    Strict LSA checking State Is:Disabled
    Route calculation staggering is enabled
    Route calculation staggering interval is  10 seconds

Configurations in ISS3

  1. Execute the following commands.

    Type the following:

    • Enter the Global Configuration Mode in ISS3.
    iS5comm# configure terminal
    • Enable OSPF globally in the switch and enter the Router Configuration mode.
    iS5comm(config)# router ospf
    • Configure the OSPF router ID.
    iS5comm (config-router)# router-id 10.1.1.3
    • Configure the OSPF interfaces.
    iS5comm (config-router)# network 10.4.0.3 area 0.0.0.0
    • Exit the Router Configuration Mode.
    iS5comm (config-router)# end
  2. View the configuration done in ISS3. Also check, if by default ISS3 is providing helper support for all four type of restart reasons.

    Type the following:

    iS5comm# show ip ospf
    OSPF Router with ID (10.1.1.3) (Vrf  default)
    Supports only single TOS(TOS0) route
    ABR Type supported is Standard ABR
    It is an Area Border Router
    Number of Areas in this router is 2
    Area is 0.0.0.6
    Number of interfaces in this area is 1
    SPF algorithm executed 9 times
    Area is 0.0.0.0
    Number of interfaces in this area is 1
    SPF algorithm executed 9 times
    Planned Non-Stop Forwarding enabled
    Restart-interval limit: 50
    Grace LSA Retransmission Count: 100
    Helper Grace LSA ACK :Required
    Restart Reason is:
    Unknown
    Helper is Giving Support for:
    Unknown
    Software Restart
    Software Reload/Upgrade
    Switch To Redundant
    Helper Grace Time Limit: 0
    Strict LSA checking State Is:Disabled
    Route calculation staggering is enabled
    Route calculation staggering interval is  10 seconds

Configurations in ISS4

  1. Execute the following commands.

    Type the following:

    • Enter the Global Configuration Mode in ISS4.
    iS5comm# configure terminal
    • Enable OSPF globally in the switch and enter the Router Configuration mode.
    iS5comm(config)# router ospf
    • Configure the OSPF router ID.
    iS5comm (config-router)# router-id 10.5.5.4
    • Configure the OSPF interfaces.
    iS5comm(config-router)# network 10.5.5.4 area 0.0.0.0
    iS5comm(config-router)# network 10.4.0.4 area 0.0.0.0
    • Exit the Router Configuration Mode.
    iS5comm (config-router)# end
  2. View the Configuration done in ISS3. Also check, if by default ISS3 is providing helper support for all four type of restart reasons.

    Type the following:

    iS5comm# show ip ospf
    OSPF Router with ID (10.5.5.4)(Vrf  default)
    Supports only single TOS(TOS0) route
    ABR Type supported is Standard ABR
    It is an Area Border Router
    Number of Areas in this router is 2
    Area is 0.0.0.6
    Number of interfaces in this area is 1
    SPF algorithm executed 9 times
    Area is 0.0.0.0
    Number of interfaces in this area is 1
    SPF algorithm executed 9 times
    Planned Non-Stop Forwarding enabled
    Restart-interval limit: 50
    Grace LSA Retransmission Count: 100
    Helper Grace LSA ACK :Required
    Restart Reason is:
    Unknown
    Helper is Giving Support for:
    Unknown
    Software Restart
    Software Reload/Upgrade
    Switch To Redundant
    Helper Grace Time Limit: 0
    Strict LSA checking State Is:Disabled
    Route calculation staggering is enabled
    Route calculation staggering interval is  10 seconds

Configurations in ISS8

  1. Execute the following commands.

    Type the following:

    • Enter the Global Configuration Mode in ISS8.
    iS5comm# configure terminal
    • Enable OSPF globally in the switch and enter the Router Configuration mode.
    iS5comm(config)# router ospf
    • Configure the OSPF router ID.
    iS5comm (config-router)# router-id 10.10.2.8
    • Configure the OSPF interfaces.
    iS5comm(config-router)# network 10.10.2.8 area 0.0.0.6
    iS5comm(config-router)# network 10.10.1.8 area 0.0.0.6
    • Exit the Router Configuration Mode.
    iS5comm (config-router)# end
  2. View the configuration done in ISS8. Also check, if by default ISS8 is providing helper support for all four type of restart reasons.

    Type the following:

    iS5comm# show ip ospf
    OSPF Router with ID (10.10.2.8) (Vrf  default)
    Supports only single TOS(TOS0) route
    ABR Type supported is Standard ABR
    It is an Area Border Router
    Number of Areas in this router is 2
    Area is 0.0.0.6
    Number of interfaces in this area is 1
    SPF algorithm executed 9 times
    Area is 0.0.0.0
    Number of interfaces in this area is 1
    SPF algorithm executed 9 times
    Planned Non-Stop Forwarding enabled
    Restart-interval limit: 50
    Grace LSA Retransmission Count: 100
    Helper Grace LSA ACK :Required
    Restart Reason is:
    Unknown
    Helper is Giving Support for:
    Unknown
    Software Restart
    Software Reload/Upgrade
    Switch To Redundant
    Helper Grace Time Limit: 0
    Strict LSA checking State Is:Disabled
    Route calculation staggering is enabled
    Route calculation staggering interval is  10 seconds

Configurations for checking GR functionality

  1. Observe the IP routing Table in ISS4. It should have route to 10.10.2.0 network with next hop as ISS1’s vlan1 interface.

    Type the following:

    iS5comm# show ip route
    Codes: C - connected, S - static, R - rip, B - bgp, O - ospf
    Vrf Name:          default
    ---------
    C 10.4.0.0/16 is directly connected, vlan1
    C 10.5.5.0/24 is directly connected, vlan4
    C 10.5.6.0/24 is directly connected, vlan3 
    O 10.10.1.0/24 [3] via 10.4.0.1
    O 10.10.2.0/24 [2] via 10.4.0.1
  2. Observe the IP routing Table in ISS4. It should have route to 10.10.2.0 network with next hop as ISS1’s vlan1 interface.

    Type the following:

    iS5comm(config)# shutdown ospf
  3. View the packets sent on vlan1 interface of ISS1. You can see the Grace-LSA from ISS1 sent on that interface.

    Type the following:

    Frame 2 (106 bytes on wire, 106 bytes captured)
    Arrival Time: Feb 17, 2011 10:05:57.329311000
    [Time delta from previous packet: 1.781175000 seconds]
    [Time since reference or first frame: 1.781175000 seconds]
    
    
    Open Shortest Path First
    OSPF Header
    OSPF Version: 2
    Message Type: LS Update (4)
    Packet Length: 72Source OSPF Router: 10.10.2.1 (10.10.2.1)
    Area ID: 0.0.0.0 (Backbone)
    Packet Checksum: 0xaaed [correct]
    Auth Type: Null
    Auth Data (none)
    LS Update Packet
    Number of LSAs: 1
    LS Type: Opaque LSA, Link-local scope
    LS Age: 1 seconds
    Options: 0x00 ()
    0... .... = DN: DN-bit is NOT set
    .0.. .... = O: O-bit is NOT set
    ..0. .... = DC: Demand circuits are NOT supported
    ...0 .... = L: The packet does NOT contain LLS data block
    .... 0... = NP: Nssa is NOT supported
    .... .0.. = MC: NOT multicast capable
    .... ..0. = E: NO ExternalRoutingCapability
    Link-State Advertisement Type: Opaque LSA, Link-local scope (9)
    Link State ID Opaque Type: grace-LSA (3)
    Link State ID Opaque ID: 0
    Advertising Router: 10.10.2.1 (10.10.2.1)
    LS Sequence Number: 0x80000001
    LS Checksum: ac31
    Length: 44
    Unknown LSA Type 3
  4. Observe the IP routing Table in ISS4. It should have route to 10.10.2.0 network with next hop as ISS1’s vlan1 interface.

    Type the following:

    Open Shortest Path First
    OSPF Header
    OSPF Version: 2
    Message Type: LS Acknowledge (5)
    Packet Length: 44
    Source OSPF Router: 10.1.1.3 (10.1.1.3)
    Area ID: 0.0.0.0 (Backbone)
    Packet Checksum: 0xb756 [correct]
    Auth Type: Null
    Auth Data (none)
    LSA Header
    LS Age: 1 seconds
    Options: 0x00 ()
    0... .... = DN: DN-bit is NOT set
    .0.. .... = O: O-bit is NOT set
    ..0. .... = DC: Demand circuits are NOT supported
    ...0 .... = L: The packet does NOT contain LLS data block
    .... 0... = NP: Nssa is NOT supported
    .... .0.. = MC: NOT multicast capable
    .... ..0. = E: NO ExternalRoutingCapability
    Link-State Advertisement Type: Opaque LSA, Link-local scope (9)Link State ID Opaque Type: grace-LSA (3)
    Link State ID Opaque ID: 0
    Advertising Router: 10.10.2.1 (10.10.2.1)
  5. View the output in ISS1. You can see the value of remaining restart-interval and Restart Reason being changed as Software Restart.

    Type the following:

    iS5comm# show ip ospf
    OSPF Router with ID (10.10.2.8) (Vrf  default)
    Supports only single TOS(TOS0) route
    ABR Type supported is Standard ABR
    It is an Area Border Router
    Number of Areas in this router is 1
    Area is 0.0.0.6
    Number of interfaces in this area is 1
    SPF algorithm executed 32 times
    Area is 0.0.0.0
    Number of interfaces in this area is 1
    SPF algorithm executed 9 times
    Planned Non-Stop Forwarding enabled
    Restart-interval limit: 50
    Grace LSA Retransmission Count: 100
    Helper Grace LSA ACK :Required
    Restart Reason is:
    Software Restart
    Helper is Giving Support for:
    Unknown
    Software Restart
    Software Reload/Upgrade
    Switch To Redundant
    Helper Grace Time Limit: 0
    Strict LSA checking State Is:Disabled
    Route calculation staggering is enabled
    Route calculation staggering interval is  10 seconds
  6. Ping ISS8’s VLAN 1 Interface (10.10.2.8) from ISS4. It should be successful.

    Type the following:

    iS5comm# ping 10.10.2.8
    Reply Received From :10.10.2.8, TimeTaken : 60 msecs
    Reply Received From :10.10.2.8, TimeTaken : 60 msecs
    Reply Received From :10.10.2.8, TimeTaken : 60 msecs
    --- 10.10.2.8 Ping Statistics ---
    3 Packets Transmitted, 3 Packets Received, 0% Packets Loss
    Note:

    This shows that ISS1 is still in forwarding path although ISS1’s OSPF module’s state is set to shut down.