Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Rebooting interface using SNMP

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
Cisco Employee

Re: Rebooting interface using SNMP

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.

Cisco Employee

Re: Rebooting interface using SNMP

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.

7 REPLIES
Cisco Employee

Re: Rebooting interface using SNMP

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"

New Member

Re: Rebooting interface using SNMP

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"

Cisco Employee

Re: Rebooting interface using SNMP

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.

New Member

Re: Rebooting interface using SNMP

Hi,

Can you explain the line :

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

Best regards

Cisco Employee

Re: Rebooting interface using SNMP

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.

New Member

Re: Rebooting interface using SNMP

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

Cisco Employee

Re: Rebooting interface using SNMP

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

AA0

AA1

...

AB0

344
Views
10
Helpful
7
Replies