OcNOS SP : Layer 3 Guide : Open Shortest Path First Configuration : OSPFv3 Graceful Restart Configuration
OSPFv3 Graceful Restart Configuration
The possibility of maintaining a router's data forwarding capability while the router's control software restarts is called graceful restart or non-stop forwarding. After the router restarts and reloads, it must change its OSPF processing until it re-establishes full adjacencies with all its former fully adjacent neighbors. The time period between the restart/reload and re-establishment of adjacencies is called the grace period.
Essentially, the OSPF procedure for graceful restart is as follows:
The router attempting a graceful restart originates link-local Opaque-LSAs, called Grace-LSAs, announcing its intention to perform a graceful restart within a specified amount of time (grace period).
During the grace period, neighbors continue to announce the restarting router in their LSAs as if it were fully adjacent (OSPF neighbor state Full), but only if the network topology remains static (the contents of the LSAs in the link-state database that have LS types 1-5 and 7 remain unchanged, and periodic refreshes are allowed).
Note: The Graceful restart configuration is applicable for both OSPFv2 and OSPFv3.
Topology
OSPFv3 Graceful Restart
Configure R1 for Graceful Restart
 
#configure terminal
Enter configure mode.
(config)#interface eth1
Specify the interface (eth1)to configure, and enter Interface mode.
(config-if)#ipv6 address 5ffe::112/64
Assign the IPv6 address to the interface.
(config-if)#ipv6 router ospf area 0 tag 1
Configure the interface for OSPFv3 on area 0.
(config-if)#exit
Exit interface mode.
(config)#router ipv6 ospf 1
Create an OSPFv3 routing instance.
(config-router)#router-id 1.1.1.1
Specify a Router ID (1.1.1.1) for the OSPFv3 routing process.
(config-router)#capability restart graceful
The graceful restart capability is enabled by default.
If the user disabled it already, execute this CLI to enable graceful restart capability.
(config-router)#end
Exit Configure mode and enter Privileged Exec mode.
#write
Save the configuration.
#restart ipv6 ospf graceful grace-period 100
Restart OSPFv3 with a 200-second grace period, so that the neighbor maintains adjacency and preserves the routes for 100 seconds.
Configure R2 as Restart Helper
 
#configure terminal
Enter configure mode.
(config)#interface eth1
Specify the interface (eth1)to configure, and enter Interface mode.
(config-if)#ipv6 address 5ffe::113/64
Assign the IPv6 address to the interface.
(config-if)#ipv6 router ospf area 0 tag 1
Configure the interface for OSPFv3 on area 0.
(config-if)#exit
Exit interface mode.
(config)#router ipv6 ospf 1
Create an OSPFv3 routing instance.
(config-router)#router-id 2.2.2.2
Specify a Router ID (2.2.2.2) for the OSPFv3 routing process.
(config-router)#exit
Exit Router mode and enter Configure mode.
(config)#ipv6 ospf restart helper max-grace-period 1800
Configure R2 to act as the helper when the grace period is less than 1800.
Remove Capability Restart Configuration from R1
#configure terminal
Enter configure mode.
(config)#router ipv6 ospf 1
Create an OSPFv3 routing instance.
(config-router)#router-id 1.1.1.1
Specify a Router ID (1.1.1.1) for the OSPFv3 routing process.
(config-router)#no capability restart
Unconfiguring graceful restart capability under router ipv6 ospf 1.
(config-router)#exit
Exit Router mode and enter Configure mode.
Remove Helper Configuration from R2
 
#configure terminal
Enter configure mode.
(config)#ipv6 ospf restart helper never
Configure R2 to not work as the helper.
(config)#commit
Commit the configuration.
(config)#exit
Exit Router mode and enter Configure mode.
Validation
R1 After Configuring Graceful Restart
R1#show ipv6 ospf neighbor
OSPFv3 Process (1)
Neighbor ID Pri State Dead Time Interface Instance ID
2.2.2.2 1 Full/DR 00:00:39 eth1 0
 
 
R1#show ipv6 ospf route
OSPFv3 Process (1)
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
 
Destination Metric
Next-hop
C 5ffe::/64 1
directly connected, eth1, Area 0.0.0.0
 
 
 
rtr1#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, I - IS-IS, B - BGP
Timers: Uptime
 
IP Route Table for VRF "default"
C ::1/128 via ::, lo, 02:02:28
C 5ffe::/64 via ::, eth1, 00:23:16
C fe80::/64 via ::, eth1, 01:25:04
K ff00::/8 [0/256] via ::, eth0, 01:25:05
 
 
 
rtr1#show ipv6 ospf database grace
 
OSPFv3 Router with ID (1.1.1.1) (Process 1)
R1 Before Graceful Restart
R1#show ipv6 ospf neighbor
OSPFv3 Process (1)
Neighbor ID Pri State Dead Time Interface Instance ID
2.2.2.2 1 Full/DR 00:00:37 eth1 0
 
 
 
rtr1#show ipv6 ospf route
OSPFv3 Process (1)
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
 
Destination Metric
Next-hop
C 5ffe::/64 1
directly connected, eth1, Area 0.0.0.0
 
 
rtr1#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, I - IS-IS, B - BGP
Timers: Uptime
 
IP Route Table for VRF "default"
C ::1/128 via ::, lo, 02:02:28
C 5ffe::/64 via ::, eth1, 00:23:16
C fe80::/64 via ::, eth1, 01:25:04
K ff00::/8 [0/256] via ::, eth1, 01:25:05
 
 
 
rtr1#show ipv6 ospf database grace
 
OSPFv3 Router with ID (1.1.1.1) (Process 1)
 
R2 Before Graceful Restart
R2#show ipv6 ospf neighbor
OSPFv3 Process (1)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/Backup 00:00:40 eth1 0
 
 
R2#sh ipv6 ospf neighbor
OSPFv3 Process (1)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/Backup 00:00:40 eth1 0
R2#
R2#show ipv6 ospf route
OSPFv3 Process (1)
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
 
Destination Metric
Next-hop
C 5ffe::/64 1
directly connected, eth1, Area 0.0.0.0
 
 
R2#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, I - IS-IS, B - BGP
Timers: Uptime
 
IP Route Table for VRF "default"
C ::1/128 via ::, lo, 01:54:20
C 5ffe::/64 via ::, eth1, 00:12:16
C fe80::/64 via ::, eth2, 01:17:21
K ff00::/8 [0/256] via ::, eth1, 01:19:12
 
 
 
R2#show ipv6 ospf database grace
 
OSPFv3 Router with ID (2.2.2.2) (Process 1)
R1 During graceful restart
R1#restart ipv6 ospf graceful grace-period 1000
% Warning : OSPF6D process will stop and needs to restart manually,
You may loose ospf configuration, if not saved
Proceed for graceful restart? (y/n):y
R1#
R1#show running-config ospfv3
!
!
R1#
R1#show ipv6 ospf neighbor
R2 During graceful restart
R2#show ipv6 ospf neighbor
OSPFv3 Process (1)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/Backup 00:02:25* eth1 0
 
 
R2#show ipv6 ospf route
OSPFv3 Process (1)
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
 
Destination Metric
Next-hop
C 5ffe::/64 1
directly connected, eth1, Area 0.0.0.0
 
 
R2#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, I - IS-IS, B - BGP
Timers: Uptime
 
IP Route Table for VRF "default"
C ::1/128 via ::, lo, 01:57:26
C 5ffe::/64 via ::, eth1, 00:15:22
C fe80::/64 via ::, eth2, 01:20:27
K ff00::/8 [0/256] via ::, eth1, 01:22:18
 
 
R2#show ipv6 ospf database grace
 
OSPFv3 Router with ID (2.2.2.2) (Process 1)
 
Grace-LSA (Interface eth1)
 
LS age: 65
LS Type: Grace LSA
Link State ID: 0.0.0.3
Advertising Router: 1.1.1.1
LS Seq Number: 0x80000001
Checksum: 0x1660
Length: 36
 
Grace Period: 200
Restart Reason:
Software Restart
 
R1 After graceful restart
root@R1:/home/ocnos# cd /usr/local/sbin/
root@R1:/usr/local/sbin# ./ospf6d -d
bash-5.0$
bash-5.0$ exit
R1#
R1#show running-config ospfv3
!
router ipv6 ospf 1
router-id 2.2.2.2
!
interface xe3
ipv6 router ospf area 0.0.0.0 tag 1 instance-id 0
!
interface xe15
ipv6 router ospf area 0.0.0.0 tag 1 instance-id 0
!
R1#
R1#show ipv6 ospf neighbor
 
Total number of full neighbors: 2
OSPFv3 Process (1)
Neighbor ID Pri State Dead Time Interface Instance ID
2.2.2.2 1 Full/DR 00:00:39 eth1 0
R1#
R2 After graceful restart
R2#show ipv6 ospf neighbor
OSPFv3 Process (1)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/Backup 00:00:34 eth1 0
 
R2#show ipv6 ospf route
OSPFv3 Process (1)
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
 
Destination Metric
Next-hop
C 5ffe::/64 1
directly connected, eth1, Area 0.0.0.0
 
R2#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, I - IS-IS, B - BGP
Timers: Uptime
 
IP Route Table for VRF "default"
C ::1/128 via ::, lo, 02:07:14
C 5ffe::/64 via ::, eth1, 00:25:10
C fe80::/64 via ::, eth2, 01:30:15
K ff00::/8 [0/256] via ::, eth2, 01:30:17
 
R2#show ipv6 ospf database grace
 
OSPFv3 Router with ID (2.2.2.2) (Process 1)