LSA Throttling
This section contains basic OSPF LSA throttling configuration examples.
The OSPF Link-State Advertisement (LSA) throttling feature provides a mechanism to dynamically slow down link-state advertisement (LSA) updates in OSPF during times of network instability. It also allows faster OSPF convergence by providing LSA rate limiting in milliseconds, when the network is stable.
How OSPF LSA Throttling Works
The timers throttle lsa all command controls the generation (sending) of LSAs. The first LSA is always generated immediately upon an OSPF topology change, and the next LSA generated is controlled by the minimum start interval. The subsequent LSAs generated for the same LSA are rate-limited until the maximum interval is reached. The “same LSA” is defined as an LSA instance that contains the same LSA ID number, LSA type, and advertising router ID.
The timers lsa arrival command controls the minimum interval for accepting the same LSA. If an instance of the same LSA arrives sooner than the interval that is set, the LSA is dropped. It is recommended that the arrival interval be less than or equal to the hold-time interval of the timers throttle lsa all command.
Topology
The diagram shows the minimum configuration required to enable OSPF LSA Throttling Timers feature. R1 and R2 are two routers in Area 0 connecting to network 10.10.10.0/24. 
Note:	Configure one interface so that it belongs to only one area. It is possible, however, to configure different interfaces on a router to belong to different areas. 
Figure 4-19: Basic OSPF Topology
R1
 
| #configure terminal | Enter configure mode. | 
| (config)#interface lo | Specify the interface loopback to configure. | 
| (config-if)#ip address 1.1.1.1/32 | Configure the ip address (1.1.1.1) to interface loopback. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#router ospf 1 | Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.  | 
| (config-router)#network 10.10.10.0/24 area 0 | Define the interface (10.10.10.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).  | 
| (config-router)#network 1.1.1.1/32 area 0 | Define the interface (1.1.1.1/32) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#timers throttle lsa all 10000 20000 45000 | Configure LSA Throttling timers (Starting interval: <0-600000>, Min Hold Interval: <1-600000> and Max Wait Interval:< 1-600000>) in milliseconds. The Default value for corresponding timers are: Starting interval: 0, Min Hold Interval: 5 sec and Max Wait Interval: 5 sec. | 
| (config-router)#logging monitor 7   | Enable logging monitor globally.   | 
| (config-router)#logging level ospf 7 | Enable logging level ospf globally. | 
| (config-router)#end | Exit router mode | 
R2
 
| #configure terminal | Enter configure mode. | 
| (config)#router ospf 1 | Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.  | 
| (config-router)#network 10.10.10.0/24 area 0 | Define the interface (10.10.10.0/24) on which OSPF runs, and associate the area ID (0) with the interface.  | 
Validation
R1
Check the output of show ip ospf and verify the initial throttle delay, minimum hold time for LSA throttle and maximum wait time for LSA throttle.
#show ip ospf 1
 Routing Process "ospf 1" with ID 1.1.1.1
 Process uptime is 11 minutes
 Process bound to VRF default
 Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Graceful Restart
 SPF schedule delay initial 0 secs 500 msecs
 SPF schedule delay min 0 secs 500 msecs
 SPF schedule delay max 50 secs 0 msecs
 Refresh timer 10 secs
 Number of incoming current DD exchange neighbors 0/64
 Number of outgoing current DD exchange neighbors 0/64
 Initial LSA throttle delay 10 secs 0 msecs
 Minimum hold time for LSA throttle 20 secs 0 msecs
 Maximum wait time for LSA throttle 45 secs 0 msecs
 Minimum LSA arrival 1 secs 0 msecs
 Number of external LSA 0. Checksum 0x000000
 Number of opaque AS LSA 0. Checksum 0x000000
 Number of non-default external LSA 0
 External LSA database is unlimited.
 Number of LSA originated 4
 Number of LSA received 4
 Number of areas attached to this router: 1
MemPool - struct ospf lsa             : (0-8) | Total (8/100000) blk_size:160
MemPool - struct rxmt                 : | Total (0/0) blk_size:8
    Area 0.0.0.0 (BACKBONE)
        Number of interfaces in this area is 2(2)
        Number of fully adjacent neighbors in this area is 1
        Area has no authentication
        SPF algorithm last executed 00:10:12.807 ago
        SPF algorithm executed 5 times
        Number of LSA 7. Checksum 0x02c480
 Dste Staus: Disabled
 
 
#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 1 VRF(default):
Neighbor ID  Pri State       Dead Time  Address     Interface Instance ID
3.1.1.1      1   Full/Backup 00:00:34   10.10.10.11   eth1       0
 
 
#debug ospf database-timer rate-limit
 
#show debugging ospf
OSPF debugging status:
  OSPF rate limit timer events debugging is on
Here, we administratively shutdown and then bring up the loopback interface to generate Rate Limit Timer events for OSPF debugging to capture.
(config)#int lo
(config-if)#shutdown
2019 Mar 29 16:32:36.838 : OcNOS : OSPF : NOTIF : [OSPF_OPR_LINK_DOWN_4]: Received Link down for interface: lo
2019 Mar 29 16:32:36.838 : OcNOS : OSPF : INFO : Starting Rate Limit Timer for LSA[0.0.0.0:Type1:1.1.1.1:(self)]: with 10000 msec delay
2019 Mar 29 16:32:36.838 : OcNOS : OSPF : NOTIF : [OSPF_OPR_STATE_4]: [lo:1.1.1.1]: Status change Loopback -> Down
 
(config-if)#no shutdown
2019 Mar 29 16:32:42.705 : OcNOS : OSPF : NOTIF : [OSPF_OPR_LINK_UP_4]: Received Link up for  interface: lo
2019 Mar 29 16:32:42.705 : OcNOS : OSPF : NOTIF : [OSPF_OPR_STATE_4]: [lo:1.1.1.1]: Status change Down -> Loopback
2019 Mar 29 16:32:46.853 : OcNOS : OSPF : INFO : Rate Limit Timer for LSA[0.0.0.0:Type1:1.1.1.1:(self)]: expired
2019 Mar 29 16:32:46.853 : OcNOS : OSPF : INFO : For Next Instance of LSA[0.0.0.0:Type1:1.1.1.1:(self)]: generation wait 20000 msec
 
 
(config-if)#shutdown
2019 Mar 29 16:32:54.353 : OcNOS : OSPF : NOTIF : [OSPF_OPR_LINK_DOWN_4]: Received Link down for interface: lo
2019 Mar 29 16:32:54.353 : OcNOS : OSPF : INFO : Starting Rate Limit Timer for LSA[0.0.0.0:Type1:1.1.1.1:(self)]: with 12499 msec delay
2019 Mar 29 16:32:54.353 : OcNOS : OSPF : NOTIF : [OSPF_OPR_STATE_4]: [lo:1.1.1.1]: Status change Loopback -> Down
 
(config-if)#no shutdown
2019 Mar 29 16:32:59.252 : OcNOS : OSPF : NOTIF : [OSPF_OPR_LINK_UP_4]: Received Link up for  interface: lo
2019 Mar 29 16:32:59.252 : OcNOS : OSPF : NOTIF : [OSPF_OPR_STATE_4]: [lo:1.1.1.1]: Status change Down -> Loopback
2019 Mar 29 16:33:06.870 : OcNOS : OSPF : INFO : Rate Limit Timer for LSA[0.0.0.0:Type1:1.1.1.1:(self)]: expired
2019 Mar 29 16:33:06.870 : OcNOS : OSPF : INFO : For Next Instance of LSA[0.0.0.0:Type1:1.1.1.1:(self)]: generation wait 40000 msec
R2
Check the output of “show ip ospf neighbor” and verify that OSPF adjacency is up.
#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 1 VRF(default):
Neighbor ID  Pri  State     Dead Time   Address    Interface  Instance ID
1.1.1.1      1    Full/DR   00:00:33    10.10.10.10   eth1       0
 
Check the output of show ip ospf database and verify that LSA (router LSA in this example) is updated according to the configured LSA throttling timers configured on its neighbor.
#show ip ospf database
 
            OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
                Router Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum  Link count
3.1.1.1         3.1.1.1          373     0x80000004 0xc60c 1
1.1.1.1         1.1.1.1           71     0x80000008 0xb9f2 2
 
                Net Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum
10.10.10.10     1.1.1.1          375     0x80000001 0x18e5
 
                Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID         ADV Router      Age      Seq#      CkSum  Opaque ID
1.0.0.1         3.1.1.1          372     0x80000001 0x2cf6 1
1.0.0.1         1.1.1.1          373     0x80000001 0x2af6 1
1.0.0.8         3.1.1.1          372     0x80000001 0x7d45 8
1.0.0.8         1.1.1.1          373     0x80000001 0x566c 8
 
 
#show ip ospf database
 
            OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
                Router Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum  Link count
3.1.1.1         3.1.1.1          378     0x80000004 0xc60c 1
1.1.1.1         1.1.1.1           76     0x80000008 0xb9f2 2
 
                Net Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum
10.10.10.10     1.1.1.1          380     0x80000001 0x18e5
 
                Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID         ADV Router       Age      Seq#     CkSum Opaque ID
1.0.0.1         3.1.1.1          377     0x80000001 0x2cf6 1
1.0.0.1         1.1.1.1          378     0x80000001 0x2af6 1
1.0.0.8         3.1.1.1          377     0x80000001 0x7d45 8
1.0.0.8         1.1.1.1          378     0x80000001 0x566c 8
 
 
#show ip ospf database
 
            OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
                Router Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum  Link count
3.1.1.1         3.1.1.1          380     0x80000004 0xc60c 1
1.1.1.1         1.1.1.1           78     0x80000008 0xb9f2 2
 
                Net Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum
10.10.10.10     1.1.1.1          382     0x80000001 0x18e5
 
                Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID         ADV Router      Age      Seq#      CkSum  Opaque ID
1.0.0.1         3.1.1.1          379     0x80000001 0x2cf6 1
1.0.0.1         1.1.1.1          380     0x80000001 0x2af6 1
1.0.0.8         3.1.1.1          379     0x80000001 0x7d45 8
1.0.0.8         1.1.1.1          380     0x80000001 0x566c 8
 
 
#show ip ospf database
 
            OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
                Router Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum  Link count
3.1.1.1         3.1.1.1          381     0x80000004 0xc60c 1
1.1.1.1         1.1.1.1           79     0x80000008 0xb9f2 2
 
                Net Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum
10.10.10.10     1.1.1.1          383     0x80000001 0x18e5
 
                Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID         ADV Router      Age      Seq#      CkSum  Opaque ID
1.0.0.1         3.1.1.1          380     0x80000001 0x2cf6 1
1.0.0.1         1.1.1.1          381     0x80000001 0x2af6 1
1.0.0.8         3.1.1.1          380     0x80000001 0x7d45 8
1.0.0.8         1.1.1.1          381     0x80000001 0x566c 8
 
 
#show ip ospf database
 
            OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
                Router Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum  Link count
3.1.1.1         3.1.1.1          382     0x80000004 0xc60c 1
1.1.1.1         1.1.1.1           80     0x80000008 0xb9f2 2
 
                Net Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum
10.10.10.10     1.1.1.1          384     0x80000001 0x18e5
 
                Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID         ADV Router      Age      Seq#      CkSum  Opaque ID
1.0.0.1         3.1.1.1          381     0x80000001 0x2cf6 1
1.0.0.1         1.1.1.1          382     0x80000001 0x2af6 1
1.0.0.8         3.1.1.1          381     0x80000001 0x7d45 8
1.0.0.8         1.1.1.1          382     0x80000001 0x566c 8
 
 
#show ip ospf database
 
            OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
                Router Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum  Link count
3.1.1.1         3.1.1.1          383     0x80000004 0xc60c 1
1.1.1.1         1.1.1.1           81     0x80000008 0xb9f2 2
 
                Net Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum
10.10.10.10     1.1.1.1          385     0x80000001 0x18e5
 
                Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID         ADV Router      Age      Seq#      CkSum  Opaque ID
1.0.0.1         3.1.1.1          382     0x80000001 0x2cf6 1
1.0.0.1         1.1.1.1          383     0x80000001 0x2af6 1
1.0.0.8         3.1.1.1          382     0x80000001 0x7d45 8
1.0.0.8         1.1.1.1          383     0x80000001 0x566c 8
Configure OSPF LSA Arrival Timers
The diagram shows the minimum configuration required to enable OSPF Minimum LSA Arrival Timers feature. R1 and R2 are two routers in Area 0 connecting to network 10.10.10.0/24. 
Note:	Configure one interface so that it belongs to only one area. It is possible, however, to configure different interfaces on a router to belong to different areas. 
Topology
Figure 4-20: Basic OSPF Topology
Configuration
R1
 
| #configure terminal | Enter configure mode. | 
| (config)#interface lo | Specify the interface loopback to configure. | 
| (config-if)#ip address 1.1.1.1/32 | Configure the ip address (1.1.1.1) to interface loopback. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#router ospf 1 | Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.  | 
| (config-router)#network 10.10.10.0/24 area 0 | Define the interface (10.10.10.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).  | 
| (config-router)#network 1.1.1.1/32 area 0 | Define the interface (1.1.1.1/32) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#end | Exit router mode | 
R2
 
| #configure terminal | Enter configure mode. | 
| (config)#router ospf 1 | Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.  | 
| (config-router)#network 10.10.10.0/24 area 0 | Define the interface (10.10.10.0/24) on which OSPF runs, and associate the area ID (0) with the interface.  | 
| (config-router)#timers lsa arrival 100000 | Configure Minimum LSA Arrival timers (Minimum LSA arrival Interval:< 0-600000>) in milliseconds. The Default value for Minimum LSA Arrival timer is: 1 sec. | 
Validation
R1
Check the output of show ip ospf and verify that the minimum LSA arrival timer by default is set to 1 sec. 
#show ip ospf
 Routing Process "ospf 1" with ID 1.1.1.1
 Process uptime is 11 minutes
 Process bound to VRF default
 Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Graceful Restart
 SPF schedule delay initial 0 secs 500 msecs
 SPF schedule delay min 0 secs 500 msecs
 SPF schedule delay max 50 secs 0 msecs
 Refresh timer 10 secs
 Number of incoming current DD exchange neighbors 0/64
 Number of outgoing current DD exchange neighbors 0/64
 Initial LSA throttle delay 10 secs 0 msecs
 Minimum hold time for LSA throttle 20 secs 0 msecs
 Maximum wait time for LSA throttle 45 secs 0 msecs
 Minimum LSA arrival 1 secs 0 msecs
 Number of external LSA 0. Checksum 0x000000
 Number of opaque AS LSA 0. Checksum 0x000000
 Number of non-default external LSA 0
 External LSA database is unlimited.
 Number of LSA originated 4
 Number of LSA received 4
 Number of areas attached to this router: 1
MemPool - struct ospf lsa             : (0-8) | Total (8/100000) blk_size:160
MemPool - struct rxmt                 : | Total (0/0) blk_size:8
    Area 0.0.0.0 (BACKBONE)
        Number of interfaces in this area is 2(2)
        Number of fully adjacent neighbors in this area is 1
        Area has no authentication
        SPF algorithm last executed 00:10:12.807 ago
        SPF algorithm executed 5 times
        Number of LSA 7. Checksum 0x02c480
 Dste Staus: Disabled 
 
#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 1 VRF(default):
Neighbor ID     Pri   State            Dead Time   Address         Interface           Instance ID
3.1.1.1           1   Full/Backup      00:00:34    10.10.10.11     eth1
R2
Check the output of show ip ospf and verify that the minimum LSA arrival timer is set to 100 sec. 
#show ip ospf
 Routing Process "ospf 1" with ID 3.1.1.1
 Process uptime is 23 minutes
 Process bound to VRF default
 Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Graceful Restart
 SPF schedule delay initial 0 secs 500 msecs
 SPF schedule delay min 0 secs 500 msecs
 SPF schedule delay max 50 secs 0 msecs
 Refresh timer 10 secs
 Number of incoming current DD exchange neighbors 0/64
 Number of outgoing current DD exchange neighbors 0/64
 Initial LSA throttle delay 0 secs 0 msecs
 Minimum hold time for LSA throttle 5 secs 0 msecs
 Maximum wait time for LSA throttle 5 secs 0 msecs
 Minimum LSA arrival 100 secs 0 msecs
 Number of external LSA 0. Checksum 0x000000
 Number of opaque AS LSA 0. Checksum 0x000000
 Number of non-default external LSA 0
 External LSA database is unlimited.
 Number of LSA originated 3
 Number of LSA received 10
 Number of areas attached to this router: 1
MemPool - struct ospf lsa             : (0-9) | Total (9/100000) blk_size:160
MemPool - struct rxmt                 : | Total (0/0) blk_size:8
    Area 0.0.0.0 (BACKBONE)
        Number of interfaces in this area is 1(1)
        Number of fully adjacent neighbors in this area is 1
        Area has no authentication
        SPF algorithm last executed 00:22:12.911 ago
        SPF algorithm executed 4 times
        Number of LSA 7. Checksum 0x02c281
 Dste Staus: Disabled
Check the output of show ip ospf neighbor and verify that OSPF adjacency is up. 
#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 1 VRF(default):
Neighbor ID     Pri   State            Dead Time   Address         Interface           Instance ID
1.1.1.1           1   Full/DR          00:00:35    10.10.10.10     eth1                    0
Check the output of “show ip ospf database” and verify that LSA is accepted only after a time difference of 100 sec between two consecutive LSAs. 
#show ip ospf database
 
            OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
                Router Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum  Link count
3.1.1.1         3.1.1.1         1131     0x80000004 0xc60c 1
1.1.1.1         1.1.1.1          829     0x80000008 0xb9f2 2
 
                Net Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum
10.10.10.10     1.1.1.1         1133     0x80000001 0x18e5
 
                Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID         ADV Router      Age      Seq#      CkSum  Opaque ID
1.0.0.1         3.1.1.1         1130     0x80000001 0x2cf6 1
1.0.0.1         1.1.1.1         1131     0x80000001 0x2af6 1
1.0.0.8         3.1.1.1         1130     0x80000001 0x7d45 8
1.0.0.8         1.1.1.1         1131     0x80000001 0x566c 8
 
 
#show ip ospf database
 
            OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
                Router Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum  Link count
3.1.1.1         3.1.1.1         1132     0x80000004 0xc60c 1
1.1.1.1         1.1.1.1          831     0x80000008 0xb9f2 2
 
                Net Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum
10.10.10.10     1.1.1.1         1134     0x80000001 0x18e5
 
                Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID         ADV Router      Age      Seq#      CkSum  Opaque ID
1.0.0.1         3.1.1.1         1131     0x80000001 0x2cf6 1
1.0.0.1         1.1.1.1         1132     0x80000001 0x2af6 1
1.0.0.8         3.1.1.1         1131     0x80000001 0x7d45 8
1.0.0.8         1.1.1.1         1132     0x80000001 0x566c 8
 
 
#show ip ospf database
 
            OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
                Router Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum  Link count
3.1.1.1         3.1.1.1         1133     0x80000004 0xc60c 1
1.1.1.1         1.1.1.1          831     0x80000008 0xb9f2 2
 
                Net Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum
10.10.10.10     1.1.1.1         1135     0x80000001 0x18e5
 
                Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID         ADV Router      Age      Seq#      CkSum  Opaque ID
1.0.0.1         3.1.1.1         1132     0x80000001 0x2cf6 1
1.0.0.1         1.1.1.1         1133     0x80000001 0x2af6 1
1.0.0.8         3.1.1.1         1132     0x80000001 0x7d45 8
1.0.0.8         1.1.1.1         1133     0x80000001 0x566c 8
 
 
#show ip ospf database
 
            OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
                Router Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum  Link count
3.1.1.1         3.1.1.1         1134     0x80000004 0xc60c 1
1.1.1.1         1.1.1.1          832     0x80000008 0xb9f2 2
 
                Net Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum
10.10.10.10     1.1.1.1         1136     0x80000001 0x18e5
 
                Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID         ADV Router      Age      Seq#      CkSum  Opaque ID
1.0.0.1         3.1.1.1         1133     0x80000001 0x2cf6 1
1.0.0.1         1.1.1.1         1134     0x80000001 0x2af6 1
1.0.0.8         3.1.1.1         1133     0x80000001 0x7d45 8
1.0.0.8         1.1.1.1         1134     0x80000001 0x566c 8
#
#show ip ospf database
 
            OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
                Router Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum  Link count
3.1.1.1         3.1.1.1         1135     0x80000004 0xc60c 1
1.1.1.1         1.1.1.1          834     0x80000008 0xb9f2 2
 
                Net Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum
10.10.10.10     1.1.1.1         1137     0x80000001 0x18e5
 
                Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID         ADV Router      Age      Seq#      CkSum  Opaque ID
1.0.0.1         3.1.1.1         1134     0x80000001 0x2cf6 1
1.0.0.1         1.1.1.1         1135     0x80000001 0x2af6 1
1.0.0.8         3.1.1.1         1134     0x80000001 0x7d45 8
1.0.0.8         1.1.1.1         1135     0x80000001 0x566c 8
 
 
#show ip ospf database
 
            OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
                Router Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum  Link count
3.1.1.1         3.1.1.1         1136     0x80000004 0xc60c 1
1.1.1.1         1.1.1.1          834     0x80000008 0xb9f2 2
 
                Net Link States (Area 0.0.0.0)
 
Link ID         ADV Router       Age     Seq#      CkSum
10.10.10.10     1.1.1.1         1138     0x80000001 0x18e5
 
                Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID         ADV Router      Age      Seq#      CkSum  Opaque ID
1.0.0.1         3.1.1.1         1135     0x80000001 0x2cf6 1
1.0.0.1         1.1.1.1         1136     0x80000001 0x2af6 1
1.0.0.8         3.1.1.1         1135     0x80000001 0x7d45 8
1.0.0.8         1.1.1.1         1136     0x80000001 0x566c 8
 
Loop-Free Alternate Fast Reroute
This section contains basic OSPF Loop-Free Alternate Fast Reroute (LFA-FRR) configuration examples.
Overview
The goal of (LFA-FRR) is to reduce failure reaction time to 10s of milliseconds by using a pre-computed alternate next- hop in the event that the currently selected primary next-hop fails, so that the alternate can be rapidly used when the failure is detected. A network with this feature experiences less traffic loss and less micro-looping of packets than a network without LFA-FRR.
After enabling LFA-FRR on routers, routers calculate a backup path for each primary path to reach the destination.The backup path is calculated based on the attributes such as node protecting, link protecting, broadcast-link protecting and secondary path.
Topology
The diagram shows the configuration required to enable the OSPF LFA feature. 
 
Figure 4-21: Figure 4-13: 	Basic OSPF-LFA Topology
R1
| #configure terminal | Enter configure mode. | 
| (config)#int eth1 | Enter interface mode. | 
| (config-if)#ip address 10.1.1.1/24 | Configure the IP address of the interface | 
| (config-if)#exit | Exit interface mode. | 
| (config)#int eth2 | Enter interface mode. | 
| (config-if)#ip address 20.1.1.1/24 | Configure the IP address of the interface. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#int eth3 | Enter interface mode. | 
| (config-if)#ip address 30.1.1.1/24 | Configure the IP address of the interface. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#router ospf 1 | Configure the routing process and specify the Process ID (1). | 
| (config-router)#network 10.1.1.0/24 area 0 | Define the interface (10.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#network 20.1.1.0/24 area 0 | Define the interface (20.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#network 30.1.1.0/24 area 0 | Define the interface (30.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#fast-reroute keep-all- paths | Configure LFA-FRR to calculate the available backup path. | 
| (config-router)#end | Exit router mode. | 
 
R2
| #configure terminal | Enter configure mode. | 
| (config)#int eth1 | Enter interface mode. | 
| (config-if)#ip address 10.1.1.2/24 | Configure the IP address of the interface | 
| (config-if)#exit | Exit interface mode. | 
| (config)#int eth2 | Enter interface mode. | 
| (config-if)#ip address 40.1.1.1/24 | Configure the IP address of the interface. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#router ospf 1 | Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process. | 
| (config-router)#network 10.1.1.0/24 area 0 | Define the interface (20.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#network 40.1.1.0/24 area 0 | Define the interface (40.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#end | Exit router mode. | 
R3
| #configure terminal | Enter configure mode. | 
| (config)#int eth1 | Enter interface mode. | 
| (config-if)#ip address 20.1.1.2/24 | Configure the IP address of the interface | 
| (config-if)#exit | Exit interface mode. | 
| (config)#int eth2 | Enter interface mode. | 
| (config-if)#ip address 50.1.1.1/24 | Configure the IP address of the interface. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#router ospf 1 | Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process. | 
| (config-router)#network 20.1.1.0/24 area 0 | Define the interface (20.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#network 50.1.1.0/24 area 0 | Define the interface (50.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#end | Exit router mode. | 
 
 
R4
 
| #configure terminal | Enter configure mode. | 
| (config)#int eth1 | Enter interface mode. | 
| (config-if)#ip address 30.1.1.2/24 | Configure the IP address of the interface | 
| (config-if)#exit | Exit interface mode. | 
| (config)#int eth2 | Enter interface mode. | 
| (config-if)#ip address 60.1.1.1/24 | Configure the IP address of the interface. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#router ospf 1 | Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process. | 
| (config-router)#network 30.1.1.0/24 area 0 | Define the interface (30.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#network 60.1.1.0/24 area 0 | Define the interface (60.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#end | Exit router mode. | 
 
R5
| #configure terminal | Enter configure mode. | 
| (config)#int eth1 | Enter interface mode. | 
| (config-if)#ip address 40.1.1.2/24 | Configure the IP address of the interface | 
| (config-if)#exit | Exit interface mode. | 
| (config)#int eth2 | Enter interface mode. | 
| (config-if)#ip address 50.1.1.1/24 | Configure the IP address of the interface. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#int eth3 | Enter interface mode. | 
| (config-if)#ip address 60.1.1.1/24 | Configure the IP address of the interface. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#router ospf 1 | Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process. | 
| (config-router)#network 40.1.1.0/24 area 0 | Define the interface (30.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#network 50.1.1.0/24 area 0 | Define the interface (30.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#network 60.1.1.0/24 area 0 | Define the interface (30.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). | 
| (config-router)#end | Exit router mode. | 
 
Validation
R1
 
Check OSPF neighborship.
#show ip ospf neighbor
OSPF Process 100 VRF (default)
Neighbor ID     Pri   State           Dead Time   Address  Interface Intance ID
2.2.2.2           1   Full/DR         00:00:33    10.1.1.2     eth1  0
3.3.3.3           1   Full/DR         00:00:33    20.1.1.2     eth2  0
4.4.4.4           1   Full/DR         00:00:39    30.1.1.2     eth2  0
#
Check the OSPF route installation and LFA-FRR backup path for the primary path.
#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter
area
* - candidate default
 
IP Route Table for VRF "default"
C     10.1.1.0/24 is directly connected, eth1 
C     20.1.1.0/24 is directly connected, eth2 
C 30.1.1.0/24 is directly connected, eth3
O     40.1.1.0/24 [110/10] via 10.1.1.2, eth1, 00:16:43
O     50.1.1.0/24 [110/15] via 20.1.1.2, eth2, 00:16:43 
O IA  60.1.1.0/24 [110/15] via 10.1.1.2, eth1, 00:16:43 
O E2  70.1.1.0/24 [110/20] via 30.1.1.2, eth3, 00:16:43 
O E2 80.1.1.0/24 [110/20] via 10.1.1.2, eth1, 00:16:43
C 127.0.0.0/8 is directly connected, lo
C 192.168.100.0/24 is directly connected, eth0
Gateway of last resort is not set
 
Not mandatory that for all primary path, there exists an LFA backup path only if inequality equation satisfies according to attributes configured on routers, backup path will be calculated.
 
#show ip route fast-reroute
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area ,p - stale info
       * - candidate default
 
IP Route Table for VRF "default"
O       50.1.1.0/24 [110/15] via 20.1.1.2, eth2, 00:00:34
                    [FRR-NH] via 10.1.1.2, eth1
 
O       60.1.1.0/24 [110/15] via 10.1.1.2, eth1, 00:00:34
                    [FRR-NH] via 20.1.1.2, eth2
 
O       70.1.1.0/24 [110/20] via 30.1.1.2, eth3, 00:02:27
                    [FRR-NH] via 10.1.1.2, eth1
 
O       80.1.1.0/24 [110/20] via 10.1.1.2, eth1, 00:02:27
                    [FRR-NH] via 20.1.1.2, eth2
 
Not mandatory that for all primary path, there exists an LFA backup path only if inequality equation satisfies according to attributes configured on routers, backup path will be calculated.
To prohibit an interface from being used as a repair path, disable fast reroute calculation on the interface.
(config)#int eth3
(config-if)#ip ospf fast-reroute per-prefix candidate disable 
(config-if)#end
Verify that the eth3 interface is not used for backup path calculation.
#show ip route 
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default
 
IP Route Table for VRF "default"
O       10.1.1.0/24 [110/10] via 20.1.1.1, eth1, 00:34:04
C       20.1.1.0/24 is directly connected, eth1
O       30.1.1.0/24 [110/20] via 20.1.1.1, eth1, 00:34:04
O       40.1.1.0/24 [110/15] via 20.1.1.1, eth1, 00:34:04
                    [110/15] via 50.1.1.2, eth2, 00:34:04
C       50.1.1.0/24 is directly connected, eth2
O IA    60.1.1.0/24 [110/15] via 50.1.1.2, eth2, 01:08:29
O E2    70.1.1.0/24 [110/20] via 20.1.1.1, eth1, 00:34:03
O E2    80.1.1.0/24 [110/20] via 50.1.1.2, eth2, 01:11:17
C       127.0.0.0/8 is directly connected, lo
C       192.168.100.0/24 is directly connected, eth0
#show ip route fast-reroute
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area ,p - stale info
       * - candidate default
 
IP Route Table for VRF "default"
O       10.1.1.0/24 [110/10] via 20.1.1.1, eth1, 00:00:34
                    [FRR-NH] via 50.1.1.2, eth2
 
O       30.1.1.0/24 [110/20] via 20.1.1.1, eth1, 00:00:34
                    [FRR-NH] via 50.1.1.2, eth2
 
O       60.1.1.0/24 [110/15] via 50.1.1.2, eth2, 00:02:27
                    [FRR-NH] via 20.1.1.1, eth1
 
O       70.1.1.0/24 [110/20] via 20.1.1.1, eth1, 00:02:27
                    [FRR-NH] via 50.1.1.2, eth2
 
O       80.1.1.0/24 [110/20] via 50.1.1.2, eth2, 00:02:27
 
Note:	Now the LFA backup paths have been changed, eth3 is not used.
 
LFA Tie-Breaker
Based on the index values configured, if inequalities are satisfied, protections will be provided:
•		Lower the index will have the highest priority, the path which provides protection with highest priority will be selected. If there are multiple paths providing the highest priority protection, then we will check which path provides the protection which has 2nd highest priority and so on.
•		If all the paths provide same priority, then the LFA route is chosen on the basis of path cost.
•		If none of the paths provides the protection with highest priority, then we will see which path provides the 2nd highest priority and so on.
config)#router ospf 100
(config-router)#fast-reroute tie-break ?
broadcast-interface-disjoint  Prefer broadcast link protecting backup path
 
                              *Default value is 70
 
downstream-path               Prefer backup path from downstream
 
                              *Default value is 90
 
interface-disjoint            Prefer link protecting backup path
 
                              *Default value is 60
 
node-protecting               Prefer node protecting backup path
 
                              *Default value is 30
 
primary-path                  Prefer backup path from ECMP set
 
                              *Default value is 20
 
secondary-path                Prefer non-ECMP backup path
 
                              *Default value is 255
(config-router)#fast-reroute tie-break broadcast-interface-disjoint index 1
(config-router)#fast-reroute tie-break node-protecting index 2
Verify show ip route and show ip route fast-reroute for backup path calculated according to attributes configured above.
#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter
area
* - candidate default
 
IP Route Table for VRF "default"
C     10.1.1.0/24 is directly connected, eth1 
C     20.1.1.0/24 is directly connected, eth2 
C 30.1.1.0/24 is directly connected, eth3
O     40.1.1.0/24 [110/10] via 10.1.1.2, eth1, 01:07:26
O     50.1.1.0/24 [110/15] via 20.1.1.2, eth2, 01:07:26 
O IA  60.1.1.0/24 [110/15] via 10.1.1.2, eth1, 01:07:26 
O E2  70.1.1.0/24 [110/20] via 30.1.1.2, eth3, 01:07:26 
O E2 80.1.1.0/24 [110/20] via 10.1.1.2, eth1, 01:07:26
C 127.0.0.0/8 is directly connected, lo
C 192.168.100.0/24 is directly connected, eth0
 
Gateway of last resort is not set
#show ip route fast-reroute
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area ,p - stale info
       * - candidate default
 
IP Route Table for VRF "default"
 
O       50.1.1.0/24 [110/15] via 20.1.1.2, eth2, 00:00:34
                    [FRR-NH] via 10.1.1.2, eth1
 
O       60.1.1.0/24 [110/15] via 10.1.1.2, eth1, 00:02:27
                    [FRR-NH] via 20.1.1.2, eth2
 
O       70.1.1.0/24 [110/20] via 30.1.1.2, eth3, 00:02:27
                    [FRR-NH] via 10.1.1.2, eth1
 
O       80.1.1.0/24 [110/20] via 10.1.1.2, eth1, 00:02:27
                    [FRR-NH] via 20.1.1.2, eth2
 
#show ip ospf route fast-reroute
 
OSPF process 0:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       OSPF LFA attributes:
       P - Primary, SP - Secondary-Path, ID - Interface Disjoint,
       NP - Node Protecting, BID - Broadcast Interface Disjoint
 
O  50.1.1.0/24 [15] via 20.1.1.1, eth2, Area 0.0.0.0
                        Backup path:
                         via 10.1.1.2, eth1, Area 0.0.0.0
                        Attributes: Metric: [20] ,LP ,NP, BP
O  60.1.1.0/24 [15] via 10.1.1.2, eth1, Area 0.0.0.0
                        Backup path:
                         via 20.1.1.2, eth2, Area 0.0.0.0
                        Attributes: Metric: [15] ,LP ,NP,BP
O  70.1.1.0/24 [20] via 30.1.1.2, eth3, Area 0.0.0.0
                        Backup path:
                         via 10.1.1.2, eth1, Area 0.0.0.0
                        Attributes: Metric: [20] ,LP ,NP,BP
O  80.1.1.0/24 [20] via 10.1.1.2, eth1, Area 0.0.0.0
                        Backup path:
                         via 20.1.1.2, eth2, Area 0.0.0.0
                        Attributes: Metric: [20] ,LP,NP,BP
LFA Termination
A router MUST limit the amount of time an alternate next-hop is used after the primary next-hop has become unavailable. This ensures that the router will start using the new primary next-hops.
LFA termination avoids a micro looping in topology, when particular network goes down, LFA backup path will be installed and if termination interval is configured, LFA backup will be still used till the interval and it is used in order to verify new primary path is loop free.
R1
Configure termination interval on R1 in router mode:
| (config)#router ospf 1 | Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.  | 
| (config-router)#fast-reroute terminate-hold-on interval 100000 | Configure LFA termination interval | 
| (config-router)#exit | Exit router mode. | 
| (config)#exit | Exit config mode. | 
 
 If you check "show ip ospf" you can see the configured termination-hold on interval value along with ospf output:
#show ip ospf
IPFRR per-prefix tiebreakers:
    Name                                Index
    Primary path                        20
    Node Protecting                     30
    Interface disjoint                  60
    Broadcast interface disjoint        70
    Secondary path                      255
 LFA termination hold-on timer : 100 secs 0 msecs
 
#show ip route fast-reroute
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area ,p - stale info
       * - candidate default
 
IP Route Table for VRF "default"
O       50.1.1.0/24 [110/15] via 20.1.1.2, eth2, 00:00:34
                    [FRR-NH] via 10.1.1.2, eth1
 
O       60.1.1.0/24 [110/15 via 10.1.1.2, eth1, 00:00:34
                    [FRR-NH] via 20.1.1.2, eth2
 
O       70.1.1.0/24 [110/20] via 30.1.1.2, eth3, 00:02:27
                    [FRR-NH] via 10.1.1.2, eth1
 
O       80.1.1.0/24 [110/20] via 10.1.1.2, eth1, 00:02:27
                    [FRR-NH] via 20.1.1.2, eth2
 
Shut down one of the primary nexthops, here eth2 of rtr1:
| (config)#interface eth2 | Enter interface mode. | 
| (config-if)#shutdown | Shutdown the interface | 
| (config-if)#exit | Exit interface mode | 
| (config-if)#exit | Exit interface mode. | 
 
#show ip route fast-reroute
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area ,p - stale info
       * - candidate default
 
IP Route Table for VRF "default"
O       50.1.1.0/24 [110/15] via 20.1.1.2, eth1, 00:00:34  <<<eth1 which was back-up path before got  installed as new primary path
                    [FRR-NH] via 30.1.1.2, eth3
 
O       60.1.1.0/24 [110/15] via 10.1.1.2, eth1, 00:00:34
                    [FRR-NH] via 30.1.1.2, eth3
 
O       70.1.1.0/24 [110/20] via 30.1.1.2, eth3, 00:02:27
                    [FRR-NH] via 10.1.1.2, eth1
 
O       80.1.1.0/24 [110/20] via 10.1.1.2, eth1, 00:02:27
                    [FRR-NH] via 30.1.1.2, eth3