]> git.proxmox.com Git - mirror_frr.git/commit - ospfd/ospf_spf.h
ospfd: introduce support for Graceful Restart (restarting mode)
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 31 May 2021 13:27:51 +0000 (10:27 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Mon, 5 Jul 2021 14:43:02 +0000 (11:43 -0300)
commit1051417011b98dcebba527e0c9053db6fc7c6e30
tree4e07b4e25d3de792d20c6a78eb095b45a77ae731
parentcd52c44c009dad73ad65e0f0daf7855095121cdb
ospfd: introduce support for Graceful Restart (restarting mode)

RFC 3623 specifies the Graceful Restart enhancement to the OSPF
routing protocol. This PR implements support for the restarting mode,
whereas the helper mode was implemented by #6811.

This work is based on #6782, which implemented the pre-restart part
and settled the foundations for the post-restart part (behavioral
changes, GR exit conditions, and on-exit actions).

Here's a quick summary of how the GR restarting mode works:
* GR can be enabled on a per-instance basis using the `graceful-restart
  [grace-period (1-1800)]` command;
* To perform a graceful shutdown, the `graceful-restart prepare ospf`
  EXEC-level command needs to be issued before restarting the ospfd
  daemon (there's no specific requirement on how the daemon should
  be restarted);
* `graceful-restart prepare ospf` will initiate the graceful restart
  for all GR-enabled instances by taking the following actions:
  o Flooding Grace-LSAs over all interfaces
  o Freezing the OSPF routes in the RIB
  o Saving the end of the grace period in non-volatile memory (a JSON
    file stored in `$frr_statedir`)
* Once ospfd is started again, it will follow the procedures
  described in RFC 3623 until it detects it's time to exit the graceful
  restart (either successfully or unsuccessfully).

Testing done:
* New topotest featuring a multi-area OSPF topology (including stub
  and NSSA areas);
* Successful interop tests against IOS-XR routers acting as helpers.

Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
22 files changed:
configure.ac
doc/user/ospfd.rst
lib/command.h
ospfd/ospf_abr.c
ospfd/ospf_ase.c
ospfd/ospf_flood.c
ospfd/ospf_flood.h
ospfd/ospf_gr.c [new file with mode: 0644]
ospfd/ospf_gr.h
ospfd/ospf_gr_helper.c
ospfd/ospf_lsa.c
ospfd/ospf_main.c
ospfd/ospf_nsm.c
ospfd/ospf_packet.c
ospfd/ospf_spf.c
ospfd/ospf_spf.h
ospfd/ospf_vty.c
ospfd/ospf_zebra.c
ospfd/ospf_zebra.h
ospfd/ospfd.c
ospfd/ospfd.h
ospfd/subdir.am