cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1112
Views
10
Helpful
7
Replies

Rebooting interface using SNMP

connect101
Level 1
Level 1

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

2 Accepted Solutions

Accepted Solutions

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.

View solution in original post

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.

View solution in original post

7 Replies 7

Joe Clarke
Cisco Employee
Cisco Employee

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"

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"

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.

Hi,

Can you explain the line :

event timer cron cron-entry "0 7 * * *"

Best regards

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.

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

Yes, you can label the actions anyway you want. They will be executed in lexicographical order. Some people also choose letters:

AA0

AA1

...

AB0

Getting Started

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: