DMVPN with SNMP traps
設定
iosv-1#sh run | s snmp
mmi snmp-timeout 180
snmp-server community SNMP RW
snmp-server chassis-id
snmp-server enable traps nhrp nhs
snmp-server enable traps nhrp nhc
snmp-server enable traps nhrp nhp
snmp-server enable traps nhrp quota-exceeded
snmp-server host 169.254.100.4 2c snmp
snmp-server host 169.254.100.4 version 2c SNMP nhrp
snmp mib nhrp
iosv-4#sh run | s snmp
mmi snmp-timeout 180
snmp-server community SNMP RW
snmp-server chassis-id
snmp-server manager
・その他の設定は前回参照
debug
iosv-1#debug snmp mib nhrp events
NHRP SNMP events debugging is on
iosv-1(config)#int tunnel 0
iosv-1(config-if)#shut
*Aug 3 18:24:05.199: NHRP_SNMP-EVE[1324]: In Free node nhs = 0x0, cache = 0x10FA958C
*Aug 3 18:24:05.199: NHRP_SNMP-EVE[1266]: Deleting node from v4 cache Tree = 0x11047320
*Aug 3 18:24:05.199: NHRP_SNMP-EVE[1268]: Deleted AVL node = 1104732C
*Aug 3 18:24:05.199: NHRP_SNMP-EVE[1270]: Head Cache Tree = 0x0
*Aug 3 18:24:05.199: NHRP_SNMP-EVE[1287]: Deleted node from Cache Tree = 0x11047320
*Aug 3 18:24:05.226: %DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 192.168.0.10 (Tunnel0) is down: interface down
*Aug 3 18:24:07.204: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to down
*Aug 3 18:24:07.205: %LINK-5-CHANGED: Interface Tunnel0, changed state to administratively down
iosv-1(config-if)#no shut
*Aug 3 18:24:10.121: NHRP_SNMP-EVE[961]: Adding nhs = 0 cache 10FA958C into SNMP Trees idb = Tunnel0
*Aug 3 18:24:10.122: NHRP_SNMP-EVE[1093]: Adding node in SNMP Trees is = 11047320
*Aug 3 18:24:10.122: NHRP_SNMP-EVE[1167]: New Cache Node ADDITION 0x11047320
*Aug 3 18:24:10.122: NHRP_SNMP-EVE[874]: New Add to Cache Tree
*Aug 3 18:24:10.123: NHRP_SNMP-EVE[883]: Added New 11047320 @ Cache New = 11047320
*Aug 3 18:24:12.130: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to up
*Aug 3 18:24:12.134: NHRP_SNMP-EVE[961]: Adding nhs = 0 cache 10FA958C into SNMP Trees idb = Tunnel0
*Aug 3 18:24:12.135: NHRP_SNMP-EVE[1093]: Adding node in SNMP Trees is = 11047320
*Aug 3 18:24:12.135: NHRP_SNMP-EVE[1180]: Not Adding Cache Entry to Tree 0x11047320
*Aug 3 18:24:12.138: %LINK-3-UPDOWN: Interface Tunnel0, changed state to up
*Aug 3 18:24:12.610: %DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 192.168.0.10 (Tunnel0) is up: new adjacency
iosv-4#debug ip udp
*Aug 3 18:25:41.678: UDP: rcvd src=169.254.100.1(49562), dst=169.254.100.4(162), length=328
iosv-4#
*Aug 3 18:25:47.066: UDP: rcvd src=169.254.100.1(49562), dst=169.254.100.4(162), length=349
パケットキャプチャ
ちゃんとNHRPのOIDが付与されたSNMPパケットがSNMPサーバまで向かってる。
show snmp mib nhrp status
iosv-1#show snmp mib nhrp status
NHRP-SNMP Agent Feature: Enabled
NHRP-SNMP Tree State: Good
ListEnqueue Count = 0 Node Malloc Counts = 1
まあ、みたまんま
沼
*Aug 3 15:59:15.983: NHRP_SNMP-EVE[956]: nhrpSnmp NOT Enabled
"snmp mib nhrp"←こいつがないとトラップが出ない。
CCOに書いてなくてめちゃくちゃ沼った。許さない。
参考
Reference record for OID 1.3.6.1.4.1.9.9.680
Chapter: DMVPN Tunnel Health Monitoring and Recovery