.. _example_protocols_bgp_bgpmonitordb:
##############
Bgp Monitor Db
##############
.. sidebar:: Contents
.. contents::
:depth: 2
:local:
This scenario validates the BGP extended metrics exposed via monitor-db command.
Tests the `show monitor-db ip bgp` command with and without local-address configuration.
The monitor-db command displays BGP peer metrics in a structured format similar to VRF output.
.. image:: topology.svg
:width: 400
***************************************
Test iBGP Monitor-DB With Local Address
***************************************
Description
===========
Validate show monitor-db ip bgp displays all extended BGP peer metrics
when BGP neighbor is configured with explicit local-address.
Expected metrics: bgpPeerLocalAddr, bgpPeerLocalAs, bgpPeerRemoteAddr,
bgpPeerRemoteAs, bgpPeerState, bgpPeerInUpdates, bgpPeerOutUpdates,
bgpPeerInTotalMessages, bgpPeerOutTotalMessages,
bgpPeerFsmEstablishedTime, bgpPeerFsmEstablishedTransitions.
Scenario
========
.. include:: bgpmonitordb/testibgpmonitor-dbwithlocaladdress
.. raw:: html
******************************************
Test iBGP Monitor-DB Without Local Address
******************************************
Description
===========
Validate show monitor-db ip bgp correctly displays bgpPeerLocalAddr
when BGP neighbor is configured WITHOUT explicit local-address.
The local address should be obtained automatically from the connection.
Scenario
========
.. include:: bgpmonitordb/testibgpmonitor-dbwithoutlocaladdress
.. raw:: html
***************************************
Test eBGP Monitor-DB With Local Address
***************************************
Description
===========
Validate show monitor-db ip bgp displays all extended BGP peer metrics
for eBGP scenario with explicit local-address configured.
Uses disable-connected-check instead of ebgp-multihop (incompatible with local-address).
Scenario
========
.. include:: bgpmonitordb/testebgpmonitor-dbwithlocaladdress
.. raw:: html
******************************************
Test eBGP Monitor-DB Without Local Address
******************************************
Description
===========
Validate show monitor-db ip bgp correctly displays bgpPeerLocalAddr
for eBGP scenario when configured WITHOUT explicit local-address.
Scenario
========
.. include:: bgpmonitordb/testebgpmonitor-dbwithoutlocaladdress
.. raw:: html