Inleiding
In dit document wordt beschreven welke BGP-routeringstabel (Border Gateway Protocol) regelmatig moet worden gemonitord voor veel van de klanten om bereikbaarheidsnetwerken te volgen via een netwerkmonitoringtool. Het legt ook uit hoe BGP-statistieken kunnen worden verzameld via het Simple Network Management Protocol (SNMP) met betrekking tot de routetabel voor virtuele routering en doorgifte (VRF) op het ASR-platform (Aggregation Services Router) en Integrated Service Router (ISR).
Probleem
Hoe BGP-buren te monitoren met het gebruik van BGP4-MIB onder VRF op ASR en ISR met het gebruik van SNMP v3.
Opmerking: BGP4-MIB is een contextbewuste MIB. Dit document is beperkt tot de configuratie op ASR- en ISR-platforms.
Oplossing
Gebruik snmp-context. De SNMP-context moet in kaart worden gebracht aan de SNMP-groep en de VRF die die BGP-buren heeft.
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>
Opmerking: Afhankelijk van uw release, kan de context opdracht worden vervangen door snmp context opdracht. Zie de CIsco IOS Network Management Command Reference voor meer informatie
Voorbeeld configuratie:
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
Test VRF die de BGP-buren bevat:
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
Polling resultaat met het gebruik van de context (gebruik de "-n" attribuut om de context toe te voegen wanneer u poll):
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