<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cisco ASA EEM Script to enable/disable interface in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4924974#M1104303</link>
    <description>&lt;P&gt;If you are looking based ip sla and EEM script should trigger you should track the sla and do the action (rather event syslog id)&lt;/P&gt;
&lt;P&gt;example :&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;event manager applet CORE-DOWN&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;description Core Link Down&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;event track 1 state down&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;---&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;check theLogs&amp;nbsp; and statistics : &lt;/FONT&gt;&lt;CODE&gt; &lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;#show ip sla statistics&lt;/P&gt;
&lt;P&gt;also look debug why its failing :&lt;/P&gt;
&lt;P&gt;#debug event manager action cli&lt;/P&gt;</description>
    <pubDate>Mon, 18 Sep 2023 12:12:28 GMT</pubDate>
    <dc:creator>balaji.bandi</dc:creator>
    <dc:date>2023-09-18T12:12:28Z</dc:date>
    <item>
      <title>Cisco ASA EEM Script to enable/disable interface</title>
      <link>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4924862#M1104299</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Please find the below diagram&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SHABEEBKUNHIPOCKER_1-1695021356411.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/197534iDE83CC10E3A63435/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SHABEEBKUNHIPOCKER_1-1695021356411.png" alt="SHABEEBKUNHIPOCKER_1-1695021356411.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;We have a requirement to shutdown the outside interface of our VPN&amp;nbsp; when the server (192.168.255.1) is not reachable. Basically we are trying to terminate the VPN tunnels when the CORE switch goes down or the server goes down. Obviously the interface should be enabled when the server becomes reachable. I tried to use the below EEM scripts&amp;nbsp; but it does not seem to work properly. Please advise.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;track 1 rtr 1 reachability&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;!&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;sla monitor 1&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;type echo protocol ipIcmpEcho 192.168.255.1 interface inside&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;num-packets 8&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;sla monitor schedule 1 life forever start-time now&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;!&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;route inside 192.168.255.1 255.255.255.255 172.24.255.18 1 track 1&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;event manager applet CORE-DOWN&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;description Core Link Down&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;event syslog id 622001&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;action 1 cli command "conf t"&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;action 2 cli command "interface g0/0"&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;action 3 cli command "shutdown"&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;action 4 cli command "wr mem"&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;output none&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;event manager applet CORE-UP&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;description DC1 Core UP&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;event syslog id 622001 occurs 2&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;action 1 cli command "conf t"&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;action 2 cli command "interface g0/0"&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;action 3 cli command "no shutdown"&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;action 4 cli command "wr mem"&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;output none&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Shabeeb&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 07:18:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4924862#M1104299</guid>
      <dc:creator>SHABEEB KUNHIPOCKER</dc:creator>
      <dc:date>2023-09-18T07:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco ASA EEM Script to enable/disable interface</title>
      <link>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4924974#M1104303</link>
      <description>&lt;P&gt;If you are looking based ip sla and EEM script should trigger you should track the sla and do the action (rather event syslog id)&lt;/P&gt;
&lt;P&gt;example :&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;event manager applet CORE-DOWN&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;description Core Link Down&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;event track 1 state down&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;---&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;check theLogs&amp;nbsp; and statistics : &lt;/FONT&gt;&lt;CODE&gt; &lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;#show ip sla statistics&lt;/P&gt;
&lt;P&gt;also look debug why its failing :&lt;/P&gt;
&lt;P&gt;#debug event manager action cli&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 12:12:28 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4924974#M1104303</guid>
      <dc:creator>balaji.bandi</dc:creator>
      <dc:date>2023-09-18T12:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco ASA EEM Script to enable/disable interface</title>
      <link>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4924994#M1104306</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Thanks a lot for your response. But Cisco ASA does not support event track command. It supports only event syslog id command.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 12:57:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4924994#M1104306</guid>
      <dc:creator>SHABEEB KUNHIPOCKER</dc:creator>
      <dc:date>2023-09-18T12:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco ASA EEM Script to enable/disable interface</title>
      <link>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4925047#M1104312</link>
      <description>&lt;P&gt;apolgies - so what Logs you see - can you post the logs&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;event syslog id 622001&lt;/EM&gt;&lt;/FONT&gt;&amp;nbsp; - what logs you see on ASA&amp;nbsp; that time if the ping loss to servers&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 id="ariaid-title145" class="title topictitle3"&gt;622001&lt;/H3&gt;
&lt;SECTION class="body conbody"&gt;
&lt;P class="p"&gt;&lt;STRONG class="ph b"&gt;Error Message &lt;/STRONG&gt;&lt;CODE class="ph codeph"&gt;%&lt;SPAN class="ph"&gt;ASA&lt;/SPAN&gt;-6-622001: &lt;/CODE&gt;&lt;EM class="ph i"&gt;string&lt;/EM&gt; tracked route &lt;EM class="ph i"&gt;network mask address&lt;/EM&gt; , distance &lt;EM class="ph i"&gt;number&lt;/EM&gt; , table &lt;EM class="ph i"&gt;string&lt;/EM&gt; , on interface &lt;EM class="ph i"&gt;interface-name&lt;/EM&gt;&lt;/P&gt;
&lt;P class="p"&gt;&lt;STRONG class="ph b"&gt;Explanation &lt;/STRONG&gt;A tracked route has been added to or removed from a routing table, which means that the state of the tracked object has changed from up or down.&lt;/P&gt;
&lt;UL id="con_4774896__ul_7B5DE9405703457098632AA6B6097A38" class="ul"&gt;
&lt;LI id="con_4774896__li_21D1B294BC724D89B318665BD83CFBC2" class="li"&gt;&lt;EM class="ph i"&gt;string&lt;/EM&gt; —Adding or Removing&lt;/LI&gt;
&lt;LI class="li"&gt;&lt;EM class="ph i"&gt;network&lt;/EM&gt; —The network address&lt;/LI&gt;
&lt;LI class="li"&gt;&lt;EM class="ph i"&gt;mask&lt;/EM&gt; —The network mask&lt;/LI&gt;
&lt;LI class="li"&gt;&lt;EM class="ph i"&gt;address&lt;/EM&gt; —The gateway address&lt;/LI&gt;
&lt;LI class="li"&gt;&lt;EM class="ph i"&gt;number&lt;/EM&gt; —The route administrative distance&lt;/LI&gt;
&lt;LI class="li"&gt;&lt;EM class="ph i"&gt;string&lt;/EM&gt; —The routing table name&lt;/LI&gt;
&lt;LI class="li"&gt;&lt;EM class="ph i"&gt;interface-name&lt;/EM&gt; —The interface name as specified by the &lt;SPAN class="ph uicontrol"&gt;nameif&lt;/SPAN&gt; command&lt;/LI&gt;
&lt;/UL&gt;
&lt;/SECTION&gt;
&lt;P&gt;depends the code check what ip sla results and also check event logs :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.cisco.com/c/en/us/td/docs/security/asa/asa92/configuration/general/asa-general-cli/monitor-eem.html" target="_blank"&gt;https://www.cisco.com/c/en/us/td/docs/security/asa/asa92/configuration/general/asa-general-cli/monitor-eem.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 14:32:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4925047#M1104312</guid>
      <dc:creator>balaji.bandi</dc:creator>
      <dc:date>2023-09-18T14:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco ASA EEM Script to enable/disable interface</title>
      <link>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4926634#M1104432</link>
      <description>&lt;P&gt;&lt;FONT color="#000000"&gt;Hello,&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Apologies for the late response. The logs shown in the firewall are as below.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;%ASA-6-622001: Removing tracked route 192.168.255.1 255.255.255.255 172.24.255.18, distance 1, table default, on interface inside%ASA-6-622001: Adding tracked route 192.168.255.1 255.255.255.255 172.24.255.18, distance 1, table default, on interface inside%ASA-6-622001: Removing tracked route 192.168.255.1 255.255.255.255 172.24.255.18, distance 1, table default, on interface inside%ASA-6-622001: Adding tracked route 192.168.255.1 255.255.255.255 172.24.255.18, distance 1, table default, on interface inside%ASA-6-622001: Removing tracked route 192.168.255.1 255.255.255.255 172.24.255.18, distance 1, table default, on interface inside%ASA-6-622001: Adding tracked route 192.168.255.1 255.255.255.255 172.24.255.18, distance 1, table default, on interface inside%ASA-6-622001: Removing tracked route 192.168.255.1 255.255.255.255 172.24.255.18, distance 1, table default, on interface inside%ASA-6-622001: Adding tracked route 192.168.255.1 255.255.255.255 172.24.255.18, distance 1, table default, on interface inside%ASA-6-622001: Removing tracked route 192.168.255.1 255.255.255.255 172.24.255.18, distance 1, table default, MV2-VPNASA# inside%ASA-6-622001: Adding tracked route 192.168.255.1 255.255.255.255 172.24.255.18, distance 1, table default, on interface&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;As you can see when the route is added and removed, the same syslog ID is generated. My expectation&amp;nbsp; of using "event syslog ID occurs 2" in the second script is that it will run every second time the syslog ID is generated. For example when the tracker goes down I expect only "CORE-DOWN" script to run and when the tracker comes up again I expect both the scripts to run in order "CORE-DOWN" first and "CORE-UP" after that.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;But what I can see is that when the tracker comes back, the last script ran is "CORE-DOWN" which basically shuts down the G0/0 interface, which is against the requirement. Please check and advise.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 14:54:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4926634#M1104432</guid>
      <dc:creator>SHABEEB KUNHIPOCKER</dc:creator>
      <dc:date>2023-09-20T14:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco ASA EEM Script to enable/disable interface</title>
      <link>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4926666#M1104433</link>
      <description>&lt;P&gt;Sure thats defeat the purpose of the EEM Script.&lt;/P&gt;
&lt;P&gt;on you log the removing adding happening so frequent is this testing time ?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 15:38:20 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4926666#M1104433</guid>
      <dc:creator>balaji.bandi</dc:creator>
      <dc:date>2023-09-20T15:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco ASA EEM Script to enable/disable interface</title>
      <link>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4926775#M1104437</link>
      <description>&lt;P&gt;Sorry, I did not understand your question.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 19:56:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4926775#M1104437</guid>
      <dc:creator>SHABEEB KUNHIPOCKER</dc:creator>
      <dc:date>2023-09-20T19:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco ASA EEM Script to enable/disable interface</title>
      <link>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4929003#M1104549</link>
      <description>&lt;P&gt;Any other thoughts guys?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 21:58:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/cisco-asa-eem-script-to-enable-disable-interface/m-p/4929003#M1104549</guid>
      <dc:creator>SHABEEB KUNHIPOCKER</dc:creator>
      <dc:date>2023-09-25T21:58:33Z</dc:date>
    </item>
  </channel>
</rss>

