---
name: "SNMP::Info::CiscoBGP"
section: "3pm"
platform: "linux"
package: "libsnmp-info-perl"
version: "3.972002-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SNMP::Info::CiscoBGP"
---

# SNMP::Info::CiscoBGP(3pm)

SNMP Interface to Cisco's BGP MIBs

## NAME

SNMP::Info::CiscoBGP - SNMP Interface to Cisco's BGP MIBs

## AUTHOR

Alexander Hartmaier

## SYNOPSIS

\# Let SNMP::Info determine the correct subclass for you. my `$device` = SNMP::Info-\>(\
     AutoSpecify =\> 1,\
     Debug       =\> 1,\
     DestHost    =\> 'myswitch',\
     Community   =\> 'public',\
     Version     =\> 2 ) or die "Can't connect to DestHost.\\n";

my `$remoteas_for_index` = `$device`-\>cisco\_bgp\_peer2\_remoteas;

for my `$index` (keys `$remoteas_for_index`-\>%\*) {\
     my ($type, `$addrlength`, `$ip`) =\
         `$device`-\>parse\_cisco\_bgp\_peer2\_entry\_index($index);\
     printf('remote: %-39s  type: %-4s  remote AS: `%5d`',\
         `$ip`, `$type`, `$remoteas_for_index`-\>{$index}); }

## DESCRIPTION

SNMP::Info::CiscoBGP is a subclass of SNMP::Info that provides information about a cisco device's BGP configuration and state.

Use or create in a subclass of SNMP::Info.  Do not use directly.

### Inherited Classes

none.

### Required MIBs

- *CISCO-BGP4-MIB*

  ## GLOBALS

None

## TABLE METHODS

### Cisco BGP Peer 2 Table (cbgpPeer2Table)

This table contains, one entry per BGP peer, information about the connections with BGP peers.

- cisco\_bgp\_peer2\_state (cbgpPeer2State)

  - cisco\_bgp\_peer2\_adminstatus (cbgpPeer2AdminStatus)

  - cisco\_bgp\_peer2\_localaddr (cbgpPeer2LocalAddr)

  - cisco\_bgp\_peer2\_localport (cbgpPeer2LocalPort)

  - cisco\_bgp\_peer2\_localas (cbgpPeer2LocalAs)

  - cisco\_bgp\_peer2\_localidentifier (cbgpPeer2LocalIdentifier)

  - cisco\_bgp\_peer2\_remoteport (cbgpPeer2RemotePort)

  - cisco\_bgp\_peer2\_remoteas (cbgpPeer2RemoteAs)

  - cisco\_bgp\_peer2\_remoteidentifier (cbgpPeer2RemoteIdentifier)

  - cisco\_bgp\_peer2\_inupdates (cbgpPeer2InUpdates)

  - cisco\_bgp\_peer2\_outupdates (cbgpPeer2OutUpdates)

  - cisco\_bgp\_peer2\_intotalmessages (cbgpPeer2InTotalMessages)

  - cisco\_bgp\_peer2\_outtotalmessages (cbgpPeer2OutTotalMessages)

  - cisco\_bgp\_peer2\_lasterror (cbgpPeer2LastError)

  - cisco\_bgp\_peer2\_fsmestablishedtransitions (cbgpPeer2FsmEstablishedTransitions)

  - cisco\_bgp\_peer2\_fsmestablishedtime (cbgpPeer2FsmEstablishedTime)

  - cisco\_bgp\_peer2\_connectretryinterval (cbgpPeer2ConnectRetryInterval)

  - cisco\_bgp\_peer2\_holdtime (cbgpPeer2HoldTime)

  - cisco\_bgp\_peer2\_keepalive (cbgpPeer2KeepAlive)

  - cisco\_bgp\_peer2\_holdtimeconfigured (cbgpPeer2HoldTimeConfigured)

  - cisco\_bgp\_peer2\_keepaliveconfigured (cbgpPeer2KeepAliveConfigured)

  - cisco\_bgp\_peer2\_minasoriginationinterval (cbgpPeer2MinASOriginationInterval)

  - cisco\_bgp\_peer2\_inupdatelapsedtime (cbgpPeer2InUpdateElapsedTime)

  - cisco\_bgp\_peer2\_lasterrortxt (cbgpPeer2LastErrorTxt)

  - cisco\_bgp\_peer2\_prevstate (cbgpPeer2PrevState)

  ### Cisco BGP Peer 2 Address Family Prefix Table (cbgpPeer2AddrFamilyPrefixTable)

This table contains prefix related information related to address families supported by a peer.

- cisco\_bgp\_peer2\_acceptedprefixes (cbgpPeer2AcceptedPrefixes)

  - cisco\_bgp\_peer2\_deniedprefixes (cbgpPeer2DeniedPrefixes)

  - cisco\_bgp\_peer2\_prefixadminlimit (cbgpPeer2PrefixAdminLimit)

  - cisco\_bgp\_peer2\_prefixthreshold (cbgpPeer2PrefixThreshold)

  - cisco\_bgp\_peer2\_prefixclearthreshold (cbgpPeer2PrefixClearThreshold)

  - cisco\_bgp\_peer2\_advertisedprefixes (cbgpPeer2AdvertisedPrefixes)

  - cisco\_bgp\_peer2\_suppressedprefixes (cbgpPeer2SuppressedPrefixes)

  - cisco\_bgp\_peer2\_withdrawnprefixes (cbgpPeer2WithdrawnPrefixes)

  ### METHODS

- parse\_cisco\_bgp\_peer2\_entry\_index

  Takes a cbgpPeer2Entry index as returned by all methods of the Cisco BGP Peer 2 Table methods.

  Returns a list of type (numeric, cbgpPeer2Type), address length (in bytes: 4 for IPv4, 16 for IPv6) and the remote IP address as string.
