{"id":1741,"date":"2014-01-14T07:06:56","date_gmt":"2014-01-14T07:06:56","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=1741"},"modified":"2014-01-14T07:07:42","modified_gmt":"2014-01-14T07:07:42","slug":"using-ip-sla-monitor-with-cisco-eem","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=1741","title":{"rendered":"Using IP SLA Monitor with Cisco EEM"},"content":{"rendered":"<p>Here is a handy way to use EEM to failover to a second ISP &#8211; use with a route-map:<\/p>\n<p><strong>Cisco EEM configuration:<!--more--><\/strong><\/p>\n<p>event manager applet BGP_ISP_DOWN<br \/>\nevent track 1 state down<br \/>\naction 1.0 cli command &#8220;enable&#8221;<br \/>\naction 1.1 cli command &#8220;conf t&#8221;<br \/>\naction 1.2 cli command &#8220;no ip prefix-list own-prefix seq 10 permit 10.10.10.0\/24&#8221;<br \/>\naction 1.3 cli command &#8220;ip prefix-list own-prefix-backup seq 15 permit 10.10.10.0\/24&#8221;<br \/>\naction 1.4 syslog msg &#8220;BGP peer ISP1 down 10.10.10.0\/24 now through ISP2&#8221;<\/p>\n<p><strong>IP SLA Configuration:<\/strong><\/p>\n<p>ip sla 1<br \/>\nicmp-echo x.x.x.x source-interface GigabitEthernet0\/1.101<br \/>\ntimeout 15000<br \/>\nfrequency 15<br \/>\nip sla schedule 1 life forever start-time now<br \/>\n!<br \/>\ntrack 1 rtr 1<br \/>\ntrack 2 rtr 2<br \/>\ntrack 2\u00a0 list boolean or<br \/>\nobject 1<br \/>\nobject 2<br \/>\nevent manager applet BGP_ISP_DOWN<br \/>\nevent track 3 state down<\/p>\n<p>&#8212;-<br \/>\nIP SLA for multiple hosts:<\/p>\n<p>Multiple objects can also be tracked by means of a list, using a\u00a0 flexible method for combining objects with Boolean logic. This\u00a0 functionality includes:<\/p>\n<p>&#8211; Boolean AND function\u2014When\u00a0 a tracked list has been assigned a Boolean AND function, each object\u00a0 defined within a subset must be in an up state, so that the tracked\u00a0 object can also be in the up state.<\/p>\n<p>&#8211; Boolean OR function\u2014When\u00a0 the tracked list has been assigned a Boolean OR function, it means that\u00a0 at least one object defined within a subset must also be in an up\u00a0 state, so that the tracked object can also be in the up state.<\/p>\n<p>If you need both hosts down for the tracked object to be down then you need a boolean OR because if you take the truth table for AND it is:<br \/>\n1 and 1 = 1<br \/>\n1 and 0 = 0<br \/>\n0 and 1 = 0<br \/>\n0 and 0 = 0<\/p>\n<p>But the OR is:<br \/>\n1 or 1 = 1<br \/>\n1 or 0 = 1<br \/>\n0 or 1 = 1<br \/>\n0 or 0 = 0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a handy way to use EEM to failover to a second ISP &#8211; use with a route-map: Cisco EEM configuration:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83,67],"tags":[],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1741"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1741"}],"version-history":[{"count":4,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1741\/revisions"}],"predecessor-version":[{"id":1943,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1741\/revisions\/1943"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1741"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}