소개
이 문서에서는 BGP(Border Gateway Protocol) 라우팅 테이블이 네트워크 모니터링 도구를 통해 연결 네트워크를 추적하기 위해 많은 고객에게 정기적으로 모니터링해야 하는 사항에 대해 설명합니다. 또한 ASR(Aggregation Services Router) 및 ISR(Integrated Service Router) 플랫폼의 VRF(Virtual Routing and Forwarding) 경로 테이블과 관련하여 SNMP(Simple Network Management Protocol)를 통해 BGP 통계를 수집하는 방법에 대해 설명합니다.
문제
SNMP v3을 사용하여 ASR 및 ISR의 VRF에서 BGP4-MIB를 사용하여 BGP 인접 디바이스를 모니터링하는 방법.
참고: BGP4-MIB는 컨텍스트 인식 MIB입니다. 이 문서는 ASR 및 ISR 플랫폼의 컨피그레이션으로 제한됩니다.
솔루션
SNMP 컨텍스트를 사용합니다. SNMP 컨텍스트는 SNMP 그룹 및 BGP 인접 디바이스가 있는 VRF에 매핑되어야 합니다.
Create new context mapping under VRF configuration:
#context
SNMP context enabling configuration:
#snmp-server context
Apply snmp context mapping to snmp group configuration
#snmp-server group v3 context
참고: 릴리스에 따라 context 명령은 snmp context 명령으로 대체되는 명령을 가져올 수 있습니다. 자세한 내용은 Cisco IOS Network Management Command Reference를 참조하십시오
컨피그레이션 예시:
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
BGP 인접 디바이스가 포함된 VRF 테스트:
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
컨텍스트를 사용한 폴링 결과(폴링 시 "-n" 특성을 사용하여 컨텍스트 추가):
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