Monitor a BGP Session with SNMP

Intro


This was used to help with our requirement on monitoring BGP sessions via our NMS Software so the NOC could be alerted if critical BGP Sessions changed state.


OID

.1.3.6.1.2.1.15.3.1.2.ip.ip.ip.ip

Just replace IP with the ip of the bgp neighbor

Possible SNMP Output

1 = IDLE
2 = CONNECT
3 = ACTIVE
4 = OPENSENT
5 = OPENCONFIRM
6 = ESTABLISHED

SNMPGET Example

$ snmpget -mALL -v2c -c COMMUNTY HOST .1.3.6.1.2.1.15.3.1.2.xx.xx.xx.xx

BGP4-MIB::bgpPeerState.xx.xx.xx.x = INTEGER: established(6)

SNMP Translate

$ snmptranslate -mALL -IR -Td -On bgpPeerState .1.3.6.1.2.1.15.3.1.2

bgpPeerState OBJECT-TYPE
— FROM BGP4-MIB
SYNTAX INTEGER {idle(1), connect(2), active(3), opensent(4), openconfirm(5), established(6)}
MAX-ACCESS read-only
STATUS current
DESCRIPTION “The BGP peer connection state.”
= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) bgp(15) bgpPeerTable(3) bgpPeerEntry(1) 2 }


Leave a Reply

You must be logged in to post a comment.