04-24-2008 04:51 AM
Hi,
I want to reboot my voice-port each morning at 7:00 am using th SNMP.
So I want to use a script, like shell, that I can schedule, into a linux machine.
This script will reboot one interface of the router.
Is it possible?
Thank you
Solved! Go to Solution.
04-24-2008 09:28 AM
You're missing an "end" after your CLI commands (I meant to include this in my example). And you probably want to change the syslog message since none of your voice-ports are 1/0.
action 15.0 cli command "end"
action 16.0 syslog msg "Bounced all voice ports"
Of course, all of this assumes performing a shut/no shut on these voice ports is what you want.
04-24-2008 10:18 AM
This is similar to a UNIX cron entry. This says to run the EEM policy every day at 0700. Cron timer policies require your router's clock to be authoritative, so it would best to configure NTP on this device.
04-24-2008 08:32 AM
You can use SNMP to set the ifAdminStatus of the voice port interface to down then up to bounce the interface. Of course, if this router is running a new enough version of IOS (12.3(14)T or higher), you can use the Embedded Event Manager to do this:
event manager applet bounce_voice
event timer cron cron-entry "0 7 * * *"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "voice-port 1/0"
action 4.0 cli command "shut"
action 5.0 cli command "no shut"
action 6.0 syslog msg "Bounced voice-port 1/0"
04-24-2008 09:20 AM
Thank you,
And if I have 4 voice-port I do these commands ? Like this :
event manager applet bounce_voice
event timer cron cron-entry "0 7 * * *"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "voice-port 0/0/0:15"
action 4.0 cli command "shutdown"
action 5.0 cli command "no shutdown"
action 6.0 cli command "voice-port 0/0/1:15"
action 7.0 cli command "shutdown"
action 8.0 cli command "no shutdown"
action 9.0 cli command "voice-port 0/2/0:15"
action 10.0 cli command "shutdown"
action 11.0 cli command "no shutdown"
action 12.0 cli command "voice-port 0/2/1:15"
action 13.0 cli command "shutdown"
action 14.0 cli command "no shutdown"
action 15.0 syslog msg "Bounced all voice ports 1/0"
04-24-2008 09:28 AM
You're missing an "end" after your CLI commands (I meant to include this in my example). And you probably want to change the syslog message since none of your voice-ports are 1/0.
action 15.0 cli command "end"
action 16.0 syslog msg "Bounced all voice ports"
Of course, all of this assumes performing a shut/no shut on these voice ports is what you want.
04-24-2008 10:07 AM
Hi,
Can you explain the line :
event timer cron cron-entry "0 7 * * *"
Best regards
04-24-2008 10:18 AM
This is similar to a UNIX cron entry. This says to run the EEM policy every day at 0700. Cron timer policies require your router's clock to be authoritative, so it would best to configure NTP on this device.
04-24-2008 10:27 AM
I've missed this question,
What does mean the line :
action 10.0
Can I do :
action 1.0
action 1.1
action 1.2
.
.
.
Best regds
04-26-2008 09:49 AM
Yes, you can label the actions anyway you want. They will be executed in lexicographical order. Some people also choose letters:
AA0
AA1
...
AB0
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: