Managing PoE without EnergyWise

Cisco’s EnergyWise is great stuff, you can use it to power down APs, reduce power consumption of IP phones, and I’m sure it will be extended to other features too.

I started playing around with this stuff after reading this Cisco Support Community thread

Unfortunately EnergyWise is only available on the latest versions of switching code, with leaves lots of people with PoE switches without this great feature; maybe they don’t have SMARTnet or maybe the switching platforms are too old to support the required version. Thankfully there is a way to kludge a simple facsimile, as long as you don’t expect to have all the same features – the only requirement is that the switch supports kron.

In this example, we’re going to configure a 3550 switch to disable PoE on a range of interfaces on a schedule. Essentially we’re going to create a couple of scripts that we will store on the flash disk that we can push into the running configuration as needed. We’ll have two scripts, one to disable PoE on a range of interfaces and one to enable PoE on a range of interfaces. We will set an alias to reference the commands required to get this code into the running config, and finally we’ll setup kron to run these aliases on a schedule.

alias exec poeDisable copy flash:/poeDisable.conf running-config
alias exec poeEnable copy flash:/poeEnable.conf running-config
kron occurrence closed at 19:00 recurring
policy-list closed
kron occurrence open at 7:00 recurring
policy-list open
kron policy-list closed
cli poeDisable
kron policy-list open
cli poeEnable
file prompt quiet

Because kron is not an interactive script we must disable prompts on file copy with file prompt quiet. This whole system falls on its face if you don’t do this because normally copy will ask you if you really want to copy a file into the running config.

Next we create the two scripts to make the changes. This is the kludge part – because you need to put all the configuration commands you’d normally use into a text file, and then upload it to the switch where it is called by kron. I am not too scared about doing this with disabling/enabling PoE but I wouldn’t automate more complex stuff than this.

interface range Fa0/1 - 12
power inline never

interface range Fa0/1 - 12
power inline auto