summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_vty.h
diff options
context:
space:
mode:
authorDinesh G Dutt <5016467+ddutt@users.noreply.github.com>2019-08-31 18:24:49 +0200
committerDinesh G Dutt <5016467+ddutt@users.noreply.github.com>2019-09-02 16:21:44 +0200
commit3577f1c54f94d296a266d0660436ef0d0cfaffb0 (patch)
tree4592392f903c37c2714ad998bfc86851f84d64d2 /bgpd/bgp_vty.h
parentMerge pull request #4852 from ashish12pant/fix_log (diff)
downloadfrr-3577f1c54f94d296a266d0660436ef0d0cfaffb0.tar.xz
frr-3577f1c54f94d296a266d0660436ef0d0cfaffb0.zip
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>
Diffstat (limited to 'bgpd/bgp_vty.h')
-rw-r--r--bgpd/bgp_vty.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h
index 961467e22..27b5ea47b 100644
--- a/bgpd/bgp_vty.h
+++ b/bgpd/bgp_vty.h
@@ -71,7 +71,7 @@ extern int bgp_vty_find_and_parse_afi_safi_bgp(struct vty *vty,
safi_t *safi, struct bgp **bgp,
bool use_json);
extern int bgp_show_summary_vty(struct vty *vty, const char *name, afi_t afi,
- safi_t safi, bool use_json);
+ safi_t safi, bool show_failed, bool use_json);
extern void bgp_vpn_policy_config_write_afi(struct vty *vty, struct bgp *bgp,
afi_t afi);
#endif /* _QUAGGA_BGP_VTY_H */