04-19-2009 10:32 PM
Hi Guys, Our client requires that a certain port on a 3560 switch be shutdown at 7pm and unshut at 7am. What is the best solution for their requirements, is an EEM script capable of doing the trick? Please help.
04-19-2009 10:40 PM
EEM is certainly a possibility. What version of IOS is running on this switch?
04-20-2009 12:28 AM
The switch is running ip-services 12.2(50)SE1. How to do that using EEM?
04-20-2009 06:36 AM
These two applet policies should do what you want:
event manager applet shut-port
event timer cron cron-entry "0 19 * * *"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "int $port_to_shut"
action 4.0 cli command "shut"
action 5.0 cli command "end"
action 6.0 syslog msg "Successfully shutdown $port_to_shut"
event manager applet no-shut-port
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 "int $port_to_shut"
action 4.0 cli command "no shut"
action 5.0 cli command "end"
action 6.0 syslog msg "Successfully brought $port_to_shut back up"
Then, just set the port_to_shut environment variable to the value of the port you want to shutdown. For example:
event manager environment port_to_shut Fa0/5
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide