]> git.proxmox.com Git - mirror_frr.git/commit - doc/user/bgp.rst
bgpd: Add a new command to only show failed peerings
authorDinesh G Dutt <5016467+ddutt@users.noreply.github.com>
Sat, 31 Aug 2019 16:24:49 +0000 (16:24 +0000)
committerDinesh G Dutt <5016467+ddutt@users.noreply.github.com>
Mon, 2 Sep 2019 14:21:44 +0000 (14:21 +0000)
commit3577f1c54f94d296a266d0660436ef0d0cfaffb0
tree4592392f903c37c2714ad998bfc86851f84d64d2
parent4298dfd12e15e727ee565a7873b85fca0ec4f6c8
bgpd: Add a new command to only show failed peerings

In a data center, having 32-128 peers is not uncommon. In such a situation, to find a
peer that has failed and why is several commands. This hinders both the automatability of
failure detection and the ease/speed with which the reason can be found. To simplify this
process of catching a failure and its cause quicker, this patch does the following:

1. Created a new function, bgp_show_failed_summary to display the
   failed summary output for JSON and vty
2. Created a new function to display the reset code/subcode. This is now used in the
   failed summary code and in the show neighbors code
3. Added a new variable failedPeers in all the JSON outputs, including the vanilla
   "show bgp summary" family. This lists the failed session count.
4. Display peer, dropped count, estd count, uptime and the reason for failure as the
   output of "show bgp summary failed" family of commands
5. Added three resset codes for the case where we're waiting for NHT, waiting for peer
   IPv6 addr, waiting for VRF to init.

This also counts the case where only one peer has advertised an AFI/SAFI.

The new command has the optional keyword "failed" added to the classical summary command.

The changes affect only one existing output, that of "show [ip] bgp neighbors <nbr>". As
we track the lack of NHT resolution for a peer or the lack of knowing a peer IPv6 addr,
the output of that command will show a "waiting for NHT" etc. as the last reset reason.

This patch includes update to the documentation too.

Signed-off-by: Dinesh G Dutt <5016467+ddutt@users.noreply.github.com>
bgpd/bgp_evpn_vty.c
bgpd/bgp_fsm.c
bgpd/bgp_vty.c
bgpd/bgp_vty.h
bgpd/bgpd.h
doc/user/bgp.rst