Introduction
Ce document décrit la table de routage BGP (Border Gateway Protocol) à surveiller à intervalles réguliers pour de nombreux clients pour le suivi des réseaux d'accessibilité via l'outil de surveillance du réseau. Il explique également comment collecter des statistiques BGP via le protocole SNMP (Simple Network Management Protocol) par rapport à la table de routage et de transfert virtuel (VRF) sur la plate-forme ASR (Aggregation Services Router) et ISR (Integrated Service Router).
Problème
Comment surveiller les voisins BGP avec l'utilisation de BGP4-MIB sous VRF sur ASR et ISR avec l'utilisation de SNMP v3.
Remarque : BGP4-MIB est une MIB sensible au contexte. Ce document est limité à la configuration sur les plates-formes ASR et ISR.
Solution
Utilisez le contexte SNMP. Le contexte SNMP doit être mappé au groupe SNMP et au VRF qui a ces voisins BGP.
Create new context mapping under VRF configuration:
#context <context_name>
SNMP context enabling configuration:
#snmp-server context <context_name>
Apply snmp context mapping to snmp group configuration
#snmp-server group <group_name> v3 <privacy_and_authentication_type> context <context_name>
Remarque : Selon votre version, la commande context peut être remplacée par la commande snmp context. Pour plus d'informations, reportez-vous à Cisco IOS Network Management Command Reference
Exemple de configuration :
Configure context bgp under vrf
R1(config)#ip vrf test
R1(config)#context bgp
Associate context bgp to snmp configuration and apply on snmp-server group configuration
R1(config)#do show run | sec snmp
snmp-server group testgroup v3 priv context bgp
snmp-server context bgp
R1(config)#do show snmp user
User name: testuser
Engine ID: 800000090300002CC8818300
storage-type: nonvolatile active
Authentication Protocol: MD5
Privacy Protocol: AES128
Group-name: testgroup
Testez le VRF qui contient les voisins BGP :
R1#sh ip bgp vpnv4 vrf test summary
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.1.2 4 2 0 0 1 0 0 never Idle
Résultat de l'interrogation avec l'utilisation du contexte (utilisez l'attribut « -n » pour ajouter le contexte lorsque vous effectuez l'interrogation) :
ade # snmpwalk -v3 -u testuser -l authPriv -n bgp -a md5 -A BGL@dmin1 -x aes -X BGL@dmin1 10.201.168.29 1.3.6.1.2.1.15
SNMPv2-SMI::mib-2.15.1.0 = Hex-STRING: 10
SNMPv2-SMI::mib-2.15.2.0 = INTEGER: 1
SNMPv2-SMI::mib-2.15.3.1.1.10.1.1.2 = IpAddress: 0.0.0.0
SNMPv2-SMI::mib-2.15.3.1.2.10.1.1.2 = INTEGER: 1
SNMPv2-SMI::mib-2.15.3.1.3.10.1.1.2 = INTEGER: 2
SNMPv2-SMI::mib-2.15.3.1.4.10.1.1.2 = INTEGER: 4
SNMPv2-SMI::mib-2.15.3.1.5.10.1.1.2 = IpAddress: 0.0.0.0
SNMPv2-SMI::mib-2.15.3.1.6.10.1.1.2 = INTEGER: 0
SNMPv2-SMI::mib-2.15.3.1.7.10.1.1.2 = IpAddress: 10.1.1.2
SNMPv2-SMI::mib-2.15.3.1.8.10.1.1.2 = INTEGER: 0
SNMPv2-SMI::mib-2.15.3.1.9.10.1.1.2 = INTEGER: 2
SNMPv2-SMI::mib-2.15.3.1.10.10.1.1.2 = Counter32: 0
SNMPv2-SMI::mib-2.15.3.1.11.10.1.1.2 = Counter32: 0
SNMPv2-SMI::mib-2.15.3.1.12.10.1.1.2 = Counter32: 0
SNMPv2-SMI::mib-2.15.3.1.13.10.1.1.2 = Counter32: 0