我在 Cisco IOS 路由器上有一个类似于下面的规则集。就跟踪延迟而言,所有规则都运行良好,但是 SNMP 位在发生单个 ICMP 故障时触发,而不是在跟踪计时器完成并发现跟踪状态发生变化并因此更改路线时触发。
我可以看到轨迹计时器按预期工作:“可达性已启动,延迟已关闭(剩余 12 秒)”
应如何配置才能触发导致浮动路由激活的故障?
track 1 rtr 123 reachability
delay down 20 up 60
!
ip route 0.0.0.0 0.0.0.0 1.2.3.4 track 1
ip route 0.0.0.0 0.0.0.0 4.3.2.1 254 name ADSL_Backup
!
ip sla 123
icmp-echo 3.4.5.6 source-interface FastEthernet0/0
timeout 2000
frequency 10
ip sla schedule 123 life forever start-time now
!
logging trap notifications
!
event manager applet IP-SLA-123-TIMEOUT
event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.123 get-type exact entry-op eq entry-val 1 exit-op eq exit-val 2 poll-interval 5
action 1.0 mail server "7.6.5.4" to "[email protected]" from "[email protected]" subject "IP SLA 123 Timeout" body "Timeout on the primary line"
event manager applet IP-SLA-123-OK
event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.123 get-type exact entry-op eq entry-val 2 exit-op eq exit-val 1 poll-interval 5
action 1.0 mail server "7.6.5.4" to "[email protected]" from "[email protected]" subject "IP SLA 123 Restored" body "Primary line restored"
答案1
您正在使用基于 IP SLA 功能(而不是跟踪对象)的 Cisco EEM 触发 SNMP 警报。
请看一下这个文档:http://www.cisco.com/en/US/docs/ios/12_4t/12_4t2/ht_eem.html#wp1058361