How to check the peer identifier, bgp state, local address by using SNMP MIBs. The bgpPeerTable gives us information about the Peer identifier, bgpstate, local address, Adminstatus, BGP peer state, BGP peer Updates, BGP holddown time, etc.
From the configuration prompt, execute the below mentioned command to get the snmp values:
Below is a full sample showing how to retrieve identifier, state, admin status, etc.
[edit protocols bgp]
root# run show snmp mib walk bgpPeerTable
root#run snmp mib walk bgppeertable
bgpPeerIdentifier.10.1.1.1 = 10.1.1.1
bgpPeerState.10.1.1.1 = 6
bgpPeerState.10.1.1.1 = 6
bgpPeerAdminStatus.10.1.1.1 = 2
bgpPeerNegotiatedVersion.10.1.1.1 = 4
bgpPeerLocalAddr.10.1.1.1 = 10.1.1.2
bgpPeerLocalPort.10.1.1.1 = 65191
bgpPeerRemoteAddr.10.1.1.1 = 10.1.1.1
bgpPeerRemotePort.10.1.1.1 = 179
bgpPeerRemoteAs.10.1.1.1 = 10
bgpPeerInUpdates.10.1.1.1 = 2
bgpPeerOutUpdates.10.1.1.1 = 0
bgpPeerInTotalMessages.10.1.1.1 = 84
bgpPeerOutTotalMessages.10.1.1.1 = 87
bgpPeerLastError.10.1.1.1 = 06 06
bgpPeerFsmEstablishedTransitions.10.1.1.1 = 2
bgpPeerFsmEstablishedTime.10.1.1.1 = 1124
bgpPeerConnectRetryInterval.10.1.1.1 = 32
bgpPeerHoldTime.10.1.1.1 = 90
bgpPeerKeepAlive.10.1.1.1 = 30
bgpPeerHoldTimeConfigured.10.1.1.1 = 90
bgpPeerKeepAliveConfigured.10.1.1.1 = 30
bgpPeerMinASOriginationInterval.10.1.1.1 = 1
bgpPeerMinRouteAdvertisementInterval.10.1.1.1 = 1
bgpPeerInUpdateElapsedTime.10.1.1.1 = 1124