10-28-2009 05:37 AM
Is there any way by which we can find the number of routes and number of received routes using snmpget.
OID - 1.3.6.1.4.1.9.9.187.1.2.4.1.1 gives us information about the routes accepted after appling filters. But is there and OID for received-routes for a neighbour.
10-29-2009 05:15 PM
May have to get two OIDs and use the sum of Accepted, Denied prefixes.
CISCO-BGP4-MIB::cbgpPeerAcceptedPrefixes.192.168.1.2.ipv4.unicast = Counter32: 15
CISCO-BGP4-MIB::cbgpPeerDeniedPrefixes.192.168.1.2.ipv4.unicast = Gauge32: 2
HTH,
Dan
10-30-2009 06:04 AM
Hi Dan,
Thanks, but I still have doubts if this will give the correct value.
If i have a neighbour 192.168.1.2.
enterprises.9.9.187.1.2.4.1.1.63.243.149.110.1.1 = Counter32:
But cbgpPeerDeniedPrefixes ( 1.3.6.1.4.1.9.9.187.1.2.4.1.2) gives relative value which is not euivalent to ( accepted+denied)
Suggestion ..
10-30-2009 08:35 AM
Could you post the values for these OIDs:
CISCO-BGP4-MIB::cbgpPeerAcceptedPrefixes.192.168.1.2.ipv4.unicast = Counter32: 15
CISCO-BGP4-MIB::cbgpPeerDeniedPrefixes.192.168.1.2.ipv4.unicast = Gauge32: 2
CISCO-BGP4-MIB::cbgpPeerPrefixAdminLimit.192.168.1.2.ipv4.unicast = Gauge32: 0
CISCO-BGP4-MIB::cbgpPeerPrefixThreshold.192.168.1.2.ipv4.unicast = Gauge32: 0
CISCO-BGP4-MIB::cbgpPeerPrefixClearThreshold.192.168.1.2.ipv4.unicast = Gauge32: 0
CISCO-BGP4-MIB::cbgpPeerAdvertisedPrefixes.192.168.1.2.ipv4.unicast = Gauge32: 17
CISCO-BGP4-MIB::cbgpPeerSuppressedPrefixes.192.168.1.2.ipv4.unicast = Gauge32: 0
CISCO-BGP4-MIB::cbgpPeerWithdrawnPrefixes.192.168.1.2.ipv4.unicast = Gauge32: 0
Also post the "Total number of prefixs" shown by the "show ip bgp neigh 192.168.1.2" command
Thanks,
Dan
11-05-2009 05:44 AM
SNMPv2-SMI::enterprises.9.9.187.1.2.4.1.1.192.168.1.2.1.1 = Counter32: 151
SNMPv2-SMI::enterprises.9.9.187.1.2.4.1.2.192.168.1.2.1.1 = Gauge32: 2521
SNMPv2-SMI::enterprises.9.9.187.1.2.4.1.3.192.168.1.2.1.1 = Gauge32: 0
SNMPv2-SMI::enterprises.9.9.187.1.2.4.1.4.192.168.1.2.1.1 = Gauge32: 0
SNMPv2-SMI::enterprises.9.9.187.1.2.4.1.5.192.168.1.2.1.1 = Gauge32: 0
SNMPv2-SMI::enterprises.9.9.187.1.2.4.1.6.192.168.1.2.1.1 = Gauge32: 2213402
SNMPv2-SMI::enterprises.9.9.187.1.2.4.1.7.192.168.1.2.1.1 = Gauge32: 108514
SNMPv2-SMI::enterprises.9.9.187.1.2.4.1.8.192.168.1.2.1.1 = Gauge32: 986169
sh ip bgp neighbors 192.168.1.2
Sent Rcvd
Prefix activity: ---- ----
Prefixes Current: 55785 151 (Consumes 8424 bytes)
Prefixes Total: 2213421 1822
Implicit Withdraw: 1220931 1649
Explicit Withdraw: 986180 22
Used as bestpath: n/a 34
Used as multipath: n/a 34
Saved (soft-reconfig): n/a 84 (Consumes 4368 bytes)
09-18-2011 05:34 AM
can you please guide me how can i get these statistics for IPv6 BGP peers?
09-16-2024 02:43 PM - edited 09-16-2024 02:53 PM
These other OIDs may be helpful as they can pull from VRFs as well. The following is an email to a client I pasted here:
The first OID I listed, 1.3.6.1.4.1.9.9.187.1.2.8.1.6
This one is called cbgpPeer2AdvertisedPrefixes and its description is:
"This counter is incremented when a route prefix,
which belongs to an address family is advertised
on this connection. It is initialized to zero when
the connection is undergone a hard reset."
So, the OID combined with “grep {ip-address of neighbor}” will show how many prefixes are advertised across that specific interface.
Here is the output of the “show bgp vpnv4 unicast summary all” on the neighbor router and shows the number of prefixes match what is returned by the OID:
MSEE-ASR1K-3#show bgp vpnv4 unicast all summary
BGP router identifier 1.2.3.5, local AS number 64531
BGP table version is 11630617, main routing table version 11630617
507358 network entries using 129883648 bytes of memory
507358 path entries using 69000688 bytes of memory
5/5 BGP path/bestpath attribute entries using 1520 bytes of memory
3 BGP AS-PATH entries using 88 bytes of memory
1 BGP community entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 198885968 total bytes of memory
BGP activity 12826773/11810695 prefixes, 13649959/12633881 paths, scan interval 60 secs
507359 networks peaked at 06:59:15 Aug 7 2023 UTC (3d05h ago)
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
13.0.0.2 4 12345 9004 9839 11630617 0 0 3d02h 10
13.0.8.2 4 12345 9006 9834 11630617 0 0 3d03h 10
13.0.16.2 4 12345 9004 9825 11630617 0 0 3d02h 10
13.0.24.2 4 12345 9006 9821 11630617 0 0 3d03h 10
<Output Omitted>
14.3.232.2 4 12345 3790 4131 11630617 0 0 1d07h 0
20.0.1.2 4 64533 4953 4963 11630617 0 0 3d03h 5000
20.0.2.2 4 64533 4958 4955 11630617 0 0 3d03h 5000
20.0.3.2 4 64533 4967 4949 11630617 0 0 3d03h 5000
20.0.4.2 4 64533 4958 4968 11630617 0 0 3d03h 5000
20.0.5.2 4 64533 4959 4957 11630617 0 0 3d02h 5000
20.0.6.2 4 64533 4960 4959 11630617 0 0 3d03h 5000
20.0.7.2 4 64533 4962 4957 11630617 0 0 3d02h 5000
20.0.8.2 4 64533 4956 4952 11630617 0 0 3d02h 5000
20.0.9.2 4 64533 4964 4956 11630617 0 0 3d03h 5000
20.0.10.2 4 64533 4957 4954 11630617 0 0 3d03h 5000
20.0.11.2 4 64533 5016 5017 11630617 0 0 3d03h 455
20.0.12.2 4 64533 4948 4958 11630617 0 0 3d03h 455
SNMPWALK Output of MSEE-ASR1K-1:
snmpwalk -v 2c 10.1.48.96 -c cisco 1.3.6.1.4.1.9.9.187.1.2.8.1.6 | grep 20.0.1.1
SNMPv2-SMI::enterprises.9.9.187.1.2.8.1.6.1.4.20.0.1.1.1.128 = Gauge32: 5000
The companion OID to this is 1.3.6.1.4.1.9.9.187.1.2.8.1.1
This one is called cbgpPeer2AcceptedPrefixes and its description is:
"Number of accepted route prefixes on this connection,
which belong to an address family."
This OID combined with “grep {ip-address of neighbor}” will show how many prefixes are accepted/learned from this specific interface.
Here is the output of the “show bgp vpnv4 unicast summary all” on the router and shows the number of prefixes match what is returned by the OID:
MSEE-ASR1K-1#show bgp vpnv4 unicast all summary
BGP router identifier 1.2.3.4, local AS number 64533
BGP table version is 11250051, main routing table version 11250051
510496 network entries using 130686976 bytes of memory
511426 path entries using 69553936 bytes of memory
14/13 BGP path/bestpath attribute entries using 4256 bytes of memory
2 BGP AS-PATH entries using 64 bytes of memory
2 BGP community entries using 48 bytes of memory
4 BGP extended community entries using 96 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 200245376 total bytes of memory
930 received paths for inbound soft reconfiguration
BGP activity 12017654/10994203 prefixes, 14194960/13152588 paths, scan interval 60 secs
515021 networks peaked at 05:57:42 Jun 22 2023 UTC (7w0d ago)
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.2 4 12345 9014 9817 11250051 0 0 3d03h 5000
10.0.8.2 4 12345 9014 9824 11250051 0 0 3d03h 5000
10.0.16.2 4 12345 9013 9821 11250051 0 0 3d03h 5000
10.0.24.2 4 12345 9013 9822 11250051 0 0 3d03h 5000
10.0.32.2 4 12345 9014 9816 11250051 0 0 3d03h 5000
10.0.40.2 4 12345 9014 9819 11250051 0 0 3d03h 5000
10.0.48.2 4 12345 9014 9820 11250051 0 0 3d03h 5000
10.0.56.2 4 12345 9012 9828 11250051 0 0 3d03h 5000
10.0.64.2 4 12345 9013 9829 11250051 0 0 3d03h 5000
10.0.72.2 4 12345 9014 9831 11250051 0 0 3d03h 5000
10.0.80.2 4 12345 9009 9814 11250051 0 0 3d03h 455
10.0.88.2 4 12345 9008 9827 11250051 0 0 3d03h 455
10.0.96.2 4 12345 9009 9817 11250051 0 0 3d03h 455
<Output Omitted>
SNMPWALK Output of MSEE-ASR1K-1:
cisco@msft-auto-ubuntu-xe-1#snmpwalk -v 2c 10.1.48.96 -c cisco 1.3.6.1.4.1.9.9.187.1.2.8.1.1 | grep 10.0.0.2
SNMPv2-SMI::enterprises.9.9.187.1.2.8.1.1.1.4.10.0.0.2.1.128 = Counter32: 5000
cisco@msft-auto-ubuntu-xe-1#snmpwalk -v 2c 10.1.48.96 -c cisco 1.3.6.1.4.1.9.9.187.1.2.8.1.1 | grep 10.0.80.2
SNMPv2-SMI::enterprises.9.9.187.1.2.8.1.1.1.4.10.0.80.2.1.128 = Counter32: 455
In summary, if you have the ip address of the BGP neighbor, these OIDs will show you the number of prefixes advertised to that neighbor and the number of prefixes learned from that neighbor.
Thanks,
Baylor
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide