Study Notes : OSPF iSPF and Graceful Modes

iSPF

Incremental SPF is a feature that can be enabled on a complete area or a single router, and will allow the device to perform a partial SPF calculation on the area of the SPF affected by the LSA received.  This is configured (with no arguments):

A partial update should be initiated by changes to LSA types 3,4,5 & 7 by default.

An incremental could be initiated by changes to LSA types 1 & 2, but it depends on the scope of the change!

R1(config)#router ospf 1
R1(config-router)#ispf
R1#show ip ospf
 Routing Process "ospf 1" with ID 1.1.1.1
<omitted>
 Incremental-SPF enabled
<omitted>
R3#debug ip ospf spf topology base
OSPF SPF debugging is on for unicast base topology
OSPF SPF intra debugging is on for unicast base topology
OSPF SPF inter debugging is on for unicast base topology
OSPF SPF external debugging is on for unicast base topology
R3# (Shut down a router out of R3's Area)
*Apr 9 22:42:26.995: OSPF-1 SPF : Schedule partial SPF type 3, LSID 55.55.55.55, adv_rtr 1.1.1.1 area 1
*Apr 9 22:42:27.003: OSPF-1 SPF : Schedule partial SPF type 3, LSID 55.55.55.55, adv_rtr 9.9.9.9 area 1
*Apr 9 22:42:27.007: OSPF-1 SPF : Schedule partial SPF type 3, LSID 11.0.5.1, adv_rtr 9.9.9.9 area 1
*Apr 9 22:42:27.007: OSPF-1 SPF : Schedule partial SPF type 3, LSID 5.5.5.5, adv_rtr 9.9.9.9 area 1
*Apr 9 22:42:27.007: OSPF-1 SPF : Service partial SPF, spf instance 18, 4/0/0
*Apr 9 22:42:27.007: OSPF-1 INTER: Process partial summary spf queue
*Apr 9 22:42:27.007: OSPF-1 INTER: Process partial spfQ: type 3, LSID 55.55.55.55, mask 255.255.255.255, adv_rtr 1.1.1.1, age 1, seq 0x80000001, area 1
*Apr 9 22:42:27.007: OSPF-1 INTER: Process partial (ABR 0 Transit 0): type 3, LSID 55.55.55.55, mask 255.255.255.255, adv_rtr 1.1.1.1, age 1, seq 0x80000001, area 1
*Apr 9 22:42:27.011: OSPF-1 INTER: Start partial processing: type 3, LSID 55.55.55.55, mask 255.255.255.255,
R3#
R3#
R3# (This time shut down an interface within the area being represented by a type 2 LSA)
*Apr 9 22:48:23.383: OSPF-1 SPF : Detect change in LSA type 1, LSID 9.9.9.9 from 9.9.9.9 area 1
*Apr 9 22:48:23.383: OSPF-1 INTRA: Insert LSA to New_LSA list type 1, LSID 9.9.9.9, from 9.9.9.9 area 1
*Apr 9 22:48:23.387: OSPF-1 MON : Schedule Incremental SPF in area 1, change in LSID 9.9.9.9, LSA type R
*Apr 9 22:48:23.387: OSPF-1 MON : reset throttling to 5000ms next wait-interval 10000ms
*Apr 9 22:48:23.423: OSPF-1 SPF : Detect MAXAGE in LSA type 2, LS ID 10.49.49.9, from 9.9.9.9
*Apr 9 22:48:23.423: OSPF-1 SPF : Detect generic change in LSA type 2, LSID 10.49.49.9, from 9.9.9.9 area 1
R3#
*Apr 9 22:48:23.427: OSPF-1 INTRA: Insert LSA to New_LSA list type 2, LSID 10.49.49.9, from 9.9.9.9 area 1
*Apr 9 22:48:23.427: OSPF-1 MON : Schedule Incremental SPF in area 1, change in LSID 10.49.49.9, LSA type N
R3#
*Apr 9 22:48:28.391: OSPF-1 INTRA: Running SPF for area 1, SPF-type Incremental
*Apr 9 22:48:28.391: OSPF-1 INTRA: Initializing to run spf
*Apr 9 22:48:28.395: OSPF-1 INTRA: Running incremental SPF for area 1
*Apr 9 22:48:28.395: OSPF-1 INTRA: iSPF: checking parents for node 9.9.9.9, type 1, Adv 9.9.9.9
*Apr 9 22:48:28.399: OSPF-1 INTRA: iSPF: trying to find a link to parent 10.39.39.9 in the new LSA
*Apr 9 22:48:28.399: OSPF-1 INTRA: iSPF: found a link to parent 10.39.39.9 in the new LSA
*Apr 9 22:48:28.403: OSPF-1 INTRA: iSPF: No change in parents node 9.9.9.9, type 1, Adv. Rtr 9.9.9.9
*Apr 9 22:48:28.403: OSPF-1 INTRA: iSPF: scanning new LSA for node 9.9.9.9, type 1, Adv. Rtr. 9.9.9.9
*Apr 9 22:48:28.407: OSPF-1 INTRA: iSPF: checking parent of node 10.39.39.9, type 2, Adv. Rtr 9.9.9.9
*Apr 9 22:48:28.407: OSPF-1 INTRA: iSPF: checking parent of node 9.9.9.9, type 1, Adv. Rtr 9.9.9.9
*Apr 9 22:48:28.407: OSPF-1 INTRA: iSPF - node 10.39.39.9, type 2,
R3#Adv 9.9.9.9 found as parent of node 9.9.9.9, type 1, Adv 9.9.9.9
*Apr 9 22:48:28.411: OSPF-1 INTRA: iSPF - update all stub-routes of node 9.9.9.9, type 1, Adv 9.9.9.9
*Apr 9 22:48:28.411: OSPF-1 INTRA: iSPF: init all stub-routes on delete_list of node 9.9.9.9, type 1, Adv. Rtr 9.9.9.9
*Apr 9 22:48:28.415: OSPF-1 INTRA: iSPF: initialising node 10.49.49.255, type 0, Adv 9.9.9.9
*Apr 9 22:48:28.415: OSPF-1 INTRA: iSPF: process all stub-routes of node 9.9.9.9, type 1, Adv 9.9.9.9
*Apr 9 22:48:28.419: OSPF-1 INTRA: Update ABR Router Route 9.9.9.9 via Ethernet2/7/10.39.39.9, metric 10, area 1
*Apr 9 22:48:28.419: OSPF-1 SPF : Added ABR path to router 9.9.9.9 via 10.39.39.9, area 1, Area SPF 9, PDB SPF 35, Type Incr
*Apr 9 22:48:28.423: OSPF-1 INTRA: iSPF: checking lost links of node 9.9.9.9, type 1, Adv 9.9.9.9
*Apr 9 22:48:28.423: OSPF-1 INTRA: iSPF: checking parent of node 10.49.49.9, type 2, Adv. Rtr 9.9.9.9
*Apr 9 22:48:28.427: OSPF-1 INTRA: iSPF - node 9.9.9
R3#.9, type 1, Adv 9.9.9.9 found as parent of node 10.49.49.9, type 2, Adv 9.9.9.9
*Apr 9 22:48:28.427: OSPF-1 INTRA: iSPF: scrubing subtree of node 10.49.49.9, type 2, Adv 9.9.9.9
*Apr 9 22:48:28.427: OSPF-1 INTRA: iSPF: crubbing node 10.49.49.9, type 2, Adv 9.9.9.9
*Apr 9 22:48:28.427: OSPF-1 INTRA: iSPF: It is a network LSA 10.49.49.9. Router Count 2
*Apr 9 22:48:28.427: OSPF-1 INTRA: iSPF - Processing router id 9.9.9.9
*Apr 9 22:48:28.427: OSPF-1 INTRA: iSPF: checking parent of node 9.9.9.9, type 1, Adv. Rtr 9.9.9.9
*Apr 9 22:48:28.427: OSPF-1 INTRA: iSPF - Processing router id 4.4.4.4
*Apr 9 22:48:28.427: OSPF-1 INTRA: iSPF: checking parent of node 4.4.4.4, type 1, Adv. Rtr 4.4.4.4
*Apr 9 22:48:28.427: OSPF-1 INTRA: iSPF: putting on the orphans node 10.49.49.9, type 2, Adv 9.9.9.9
*Apr 9 22:48:28.427: OSPF-1 INTRA: iSPF: initialising node 10.49.49.9, type 2, Adv 9.9.9.9

Graceful Restart

Sometimes the control plane of the routing protocol can fail and need to be recovered.  For instance, a supervisor fails in a dual supervisor system.    Rather than dropping all adjacency and neighbours, where the routes and packets on the data plane are both dropped, Graceful restart can assist as defined in RFC3623.  This is possible because of the separation between control and data planes.

The standards version is Graceful Restart (GR), and the Cisco implementation is called Non-Stop Forwarding (NSF).  Cisco supports both.

The router undergoing a graceful restart is said to be in GR Mode, and the DIRECTLY connected neighbours are said to be in Helper Mode where they pretend the GR mode neighbour isn’t experiencing a problem by:

  • Ignoring lack of hellos and maintaining adjacency.
  • Still advertise in LSA types 1 and 2 if needed.
  • Hold off DR election to keep the GR Mode router the DR if required

Be aware that NSF-Aware devices can ONLY be a helper, but a NSF-Capable device can be a helper or perform the GR if required.  There are some conditions to a GR:

  • The router allows data forwarding during a control plane issue.
  • The GR Mode router needs to send a type 9 Opaque LSA (Grace LSA).
  • LSA Database is stable (No Changes!)
  • All the neighbours are helpers.

Restart takes place in the grace period, which is 60 seconds by default, but is configuration up to the maximum of the LSA refresh time.  From the detail below, my router appears to be NSF-Aware only:

R1(config-router)#nsf ?
 cisco Cisco Non-stop forwarding
 ietf IETF graceful restart
R1(config-router)#nsf cisco ?
 helper helper support
R1(config-router)#nsf cisco he
R1(config-router)#nsf cisco helper ?
 disable disable helper support
 <cr>
R1(config-router)#nsf cisco helper
R1(config-router)#nsf iet
R1(config-router)#nsf ietf ?
 helper helper support
R1(config-router)#nsf ietf h
R1(config-router)#nsf ietf helper ?
 disable disable helper support
 strict-lsa-checking enable helper strict LSA checking
 <cr>
R1(config-router)#nsf ietf helper

Graceful Shutdown

Using a shutdown under the router process (or under a specific interface) will:

  • Drop all OSPF Adjacencies
  • Flush all Self-Originated LSAs
  • Send out Hellos with DR/BDR set to 0.0.0.0 to get neighbours back to init state
  • Stop sending or Receiving OSPF packets.
R1#show debug
OSPF:
 OSPF packet debugging is on
 OSPF adjacency debugging is on
 OSPF non-stop forwarding debugging is on
 OSPF hello debugging is on
 OSPF LSA generation debugging is on
 OSPF RIB (Routing Information Base) debugging is on for process 1
 OSPF Local RIB (Routing Information Base) debugging is on for process 1
 OSPF Global RIB (Routing Information Base) debugging is on for process 1
 OSPF Redistribution debugging is on for process 1
R1(config)#router ospf 1
R1(config-router)#shut
*Apr 9 22:06:49.759: OSPF-1 PAK : rcv. v:2 t:1 l:48 rid:2.2.2.2 aid:0.0.0.0 chk:BA91 aut:0 auk: from Ethernet1/7
*Apr 9 22:06:49.759: OSPF-1 HELLO Et1/7: Rcv hello from 2.2.2.2 area 0 10.0.12.2
R1(config-router)#shut
R1(config-router)#
*Apr 9 22:06:53.215: OSPF-1 HELLO Et1/0: Send hello to 224.0.0.5 area 1 from 10.0.13.1
*Apr 9 22:06:53.531: OSPF-1 HELLO Et1/7: Send hello to 224.0.0.5 area 0 from 10.0.12.1
*Apr 9 22:06:53.543: OSPF-1 PAK Et1/7: Drop packet, OSPF shut down on interface
*Apr 9 22:06:53.571: OSPF-1 HELLO Et1/1: Send hello to 224.0.0.5 area 1 from 10.0.14.1
*Apr 9 22:06:53.575: OSPF-1 HELLO Et1/0: Send hello to 224.0.0.5 area 1 from 10.0.13.1
*Apr 9 22:06:53.595: OSPF-1 PAK Et1/0: Drop packet, OSPF shut down on interface
*Apr 9 22:06:53.599: OSPF-1 PAK Et1/1: Drop packet, OSPF shut down on interface
R1(config-router)#
*Apr 9 22:06:53.603: OSPF-1 PAK Et1/1: Drop packet, OSPF shut down on interface
*Apr 9 22:06:53.611: OSPF-1 LSGEN: Flushing External LSAs
*Apr 9 22:06:53.611: OSPF-1 LSGEN: Flushing Opaque AS LSAs
*Apr 9 22:06:53.683: OSPF-1 LSGEN: Flushing Link states in area 0
*Apr 9 22:06:53.731: OSPF-1 ADJ Lo111: Interface going Down
*Apr 9 22:06:53.731: OSPF-1 ADJ Lo111: 1.1.1.1 address 11.11.11.11 is dead, state DOWN
*Apr 9 22:06:53.735: OSPF-1 ADJ Et1/7: Interface going Down
*Apr 9 22:06:53.735: OSPF-1 ADJ Et1/7: 2.2.2.2 address 10.0.12.2 is dead, state DOWN
*Apr 9 22:06:53.739: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Ethernet1/7 from FULL to DOWN, Neighbor Down: Interface down or detached
*Apr 9 22:06:53.743: OSPF-1 ADJ Et1/7: Neighbor change event
*Apr 9 22:06:53.743: OSPF-1 ADJ Et1/7: DR/BDR election
*Apr 9 22:06:53.743: OSPF-1 ADJ Et1/7: Elect BDR 1.1.1.1
*Apr 9 22:06:53.747: OSPF-1 ADJ Et1/7: Elect DR 1.1.1.1
*Apr 9 22:06:53.747: OSPF-1 ADJ
R1(config-router)# Et1/7: Elect BDR 0.0.0.0
*Apr 9 22:06:53.751: OSPF-1 ADJ Et1/7: Elect DR 1.1.1.1
*Apr 9 22:06:53.751: OSPF-1 ADJ Et1/7: DR: 1.1.1.1 (Id) BDR: none
*Apr 9 22:06:53.755: OSPF-1 LSGEN: Scheduling network LSA on Ethernet1/7
*Apr 9 22:06:53.755: OSPF-1 ADJ Et1/7: Remember old DR 2.2.2.2 (id)
*Apr 9 22:06:53.755: OSPF-1 ADJ Et1/7: 1.1.1.1 address 10.0.12.1 is dead, state DOWN
*Apr 9 22:06:53.759: OSPF-1 ADJ Et1/7: Neighbor change event
*Apr 9 22:06:53.759: OSPF-1 ADJ Et1/7: DR/BDR election
*Apr 9 22:06:53.763: OSPF-1 ADJ Et1/7: Elect BDR 0.0.0.0
*Apr 9 22:06:53.763: OSPF-1 ADJ Et1/7: Elect DR 0.0.0.0
*Apr 9 22:06:53.763: OSPF-1 ADJ Et1/7: Elect BDR 0.0.0.0
*Apr 9 22:06:53.767: OSPF-1 ADJ Et1/7: Elect DR 0.0.0.0
*Apr 9 22:06:53.767: OSPF-1 ADJ Et1/7: DR: none BDR: none
*Apr 9 22:06:53.771: OSPF-1 ADJ Et1/7: Flush network LSA immediately
*Apr 9 22:06:53.771: OSPF-1 LSGEN: Scheduling network LSA on Ethernet1/7
*Apr 9 22:06:53.775:
R1(config-router)#OSPF-1 ADJ Et1/7: Remember old DR 1.1.1.1 (id)
*Apr 9 22:06:53.775: OSPF-1 LSGEN: Flushing Link states in area 1
*Apr 9 22:06:53.811: OSPF-1 ADJ Et1/1: Interface going Down
*Apr 9 22:06:53.811: OSPF-1 ADJ Et1/1: 4.4.4.4 address 10.0.14.4 is dead, state DOWN
*Apr 9 22:06:53.815: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Ethernet1/1 from FULL to DOWN, Neighbor Down: Interface down or detached
*Apr 9 22:06:53.815: OSPF-1 ADJ Et1/1: Neighbor change event
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: DR/BDR election
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: Elect BDR 1.1.1.1
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: Elect DR 1.1.1.1
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: Elect BDR 0.0.0.0
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: Elect DR 1.1.1.1
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: DR: 1.1.1.1 (Id) BDR: none
*Apr 9 22:06:53.819: OSPF-1 LSGEN: Scheduling network LSA on Ethernet1/1
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: Remember old DR 4.4.4.4 (id)
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: 1.1.1.1 address 10.0.14.1 is dead, state DOWN
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: Neighbor change event
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: DR/BDR election
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: Elect BDR 0.0.0.0
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: Elect DR 0.0.0.0
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: Elect BDR 0.0.0.0
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: Elect DR 0.0.0.0
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: DR: none BDR: none
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: Flush network LSA immediately
*Apr 9 22:06:53.819: OSPF-1 LSGEN: Scheduling network LSA on Ethernet1/1
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/1: Remember old DR 1.1.1.1 (id)
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Interface going Down
*Apr 9 22:06:53.819: OSPF-1 ADJ
R1(config-router)# Et1/0: 3.3.3.3 address 10.0.13.3 is dead, state DOWN
*Apr 9 22:06:53.819: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Ethernet1/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Neighbor change event
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: DR/BDR election
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Elect BDR 1.1.1.1
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Elect DR 1.1.1.1
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Elect BDR 0.0.0.0
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Elect DR 1.1.1.1
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: DR: 1.1.1.1 (Id) BDR: none
*Apr 9 22:06:53.819: OSPF-1 LSGEN: Scheduling network LSA on Ethernet1/0
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Remember old DR 3.3.3.3 (id)
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: 1.1.1.1 address 10.0.13.1 is dead, state DOWN
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Neighbor change event
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: DR/BDR election
*Apr
R1(config-router)# 9 22:06:53.819: OSPF-1 ADJ Et1/0: Elect BDR 0.0.0.0
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Elect DR 0.0.0.0
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Elect BDR 0.0.0.0
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Elect DR 0.0.0.0
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: DR: none BDR: none
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Flush network LSA immediately
*Apr 9 22:06:53.819: OSPF-1 LSGEN: Scheduling network LSA on Ethernet1/0
*Apr 9 22:06:53.819: OSPF-1 ADJ Et1/0: Remember old DR 1.1.1.1 (id)
*Apr 9 22:06:53.819: OSPF-1 LSGEN: Flushing Link states in area 2
*Apr 9 22:06:53.855: OSPF-1 LRIB : Local RIB clear
*Apr 9 22:06:53.955: %IPMCAST_RPF-4-RPF_LOOKUP_LOOP: RPF route lookup loop for 1.1.1.1
*Apr 9 22:06:54.095: OSPF-1 PAK Et1/0: Drop packet, OSPF shut down on interface
*Apr 9 22:06:54.255: OSPF-1 LSGEN: Not DR on intf Ethernet1/7 to build Net LSA
*Apr 9 22:06:54.319: OSPF-1 LSGEN: Not DR on intf Ethernet1/1 to build Net LSA
*Apr 9 22:06:54.31
R1(config-router)#9: OSPF-1 LSGEN: Not DR on intf Ethernet1/0 to build Net LSA
*Apr 9 22:06:57.411: OSPF-1 PAK Et1/1: Drop packet, OSPF shut down on interface
*Apr 9 22:06:57.459: OSPF-1 PAK Et1/0: Drop packet, OSPF shut down on interface
*Apr 9 22:06:57.467: OSPF-1 PAK Et1/7: Drop packet, OSPF shut down on interface
R1(config-router)#
*Apr 9 22:07:05.123: OSPF-1 PAK Et1/7: Drop packet, OSPF shut down on interface
R1(config-router)#
*Apr 9 22:07:08.755: OSPF-1 PAK Et1/0: Drop packet, OSPF shut down on interface
*Apr 9 22:07:09.115: OSPF-1 PAK Et1/1: Drop packet, OSPF shut down on interface
R1(config-router)#
R1#
*Apr 9 22:07:10.567: %SYS-5-CONFIG_I: Configured from console by console
R1#
*Apr 9 22:07:13.247: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to down
R1#
*Apr 9 22:07:20.351: OSPF-1 PAK Et1/7: Drop packet, OSPF shut down on interface
R1#un all
*Apr 9 22:07:24.711: OSPF-1 PAK Et1/0: Drop packet, OSPF shut down on interface
R1#un all
All possible debugging has been turned off

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s