Introducción
Este documento describe la tabla de ruteo del Protocolo de gateway fronterizo (BGP) que se debe monitorear a intervalos regulares para muchos de los clientes para el seguimiento de redes de alcance a través de la herramienta de monitoreo de red. También se explica cómo recopilar estadísticas de BGP a través del protocolo simple de administración de red (SNMP) con respecto a la tabla de rutas de routing y reenvío virtuales (VRF) en la plataforma Aggregation Services Router (ASR) e Integrated Service Router (ISR).
Problema
Cómo monitorear los vecinos BGP con el uso de BGP4-MIB bajo VRF en ASR e ISR con el uso de SNMP v3.
Nota: BGP4-MIB es un MIB sensible al contexto. Este documento se limita a la configuración en plataformas ASR e ISR.
Solución
Utilice snmp context. El contexto SNMP debe ser mapeado al grupo SNMP y al VRF que tiene esos vecinos 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>
Nota: Dependiendo de su versión, el comando context puede ser reemplazado por el comando snmp context. Vea la Referencia de Comandos de Administración de Redes de Cisco IOS para obtener más información
Ejemplo de configuración:
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
Probar VRF que contiene los vecinos 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
Resultado del sondeo con el uso del contexto (utilice el atributo "-n" para agregar el contexto al sondear):
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