Green IT was one of the hot issues back in 2009 during the hype of server virtualization and the introduction of 10 Gig. During the Cisco Networks in 2009 (Barcelona) Cisco EnergyWise was then greatly pushed as an innovation and as a cornerstone for Smart Buildings and Green IT.
The principle thought behind the technology is that the network can also communicate with the endpoints connected to the network and that the network can ask / tell the endpoints to lower down the power consumption in order to reduce the power footprint of the environment. For example, at night time IP Phones in an office network don’t need to have full power, as nobody is working. So EnergyWise can power down the IP phones during the night.
As a consultant and engineer I fully believe that you can only really consult about technologies and solutions if you not only understand the customer, the functional (business) requirements and know the technology but also have experience with the technology, know the quirks or some gory details that you need to be aware of for the proper succes.
For that reason (and of course it’s a hobby), my IT infrastructure (network and servers) at home is more or less a business environment and lab at the same time. Different networks (voice, guest, IoT, TV set-top boxes, etc) are of course separated with VLAN’s and I’m running a wireless network based on a controller and two AP’s (armed concrete is a very very good filter for Wireless signals ).
The diagram below is a representation of the physical network topology that I’m running,
So it is quite understandable that the power consumption at my home is much higher than the average 4 person household. And with the rapid growth of IoT devices and Domotica in the home, it’s time to see if EnergyWise can help me reducing my average power consumption. I’m using the business scenario that at night time the AP on the ground floor doesn’t need to be powered on, or not with much power. Almost all clients should at that time be connected to the AP on the first floor. Let’s see if EnergyWise can help me with this case.
Getting started with EnergyWise
First of all, Cisco EnergyWise is supported on quite a broad range of Cisco products, also the 2nd generation of 2960 and 3560 switches that I have at home. EnergyWise is not enabled by default and works with the principle of domains, neighbors and children.
So it’s time to enable a EnergyWise on all the switches and see what happens. You enable EnergyWise via the following command in config mode:
na-vur-c3560-1(config)#energywise domain nefkens.net security shared-secret 0 <key> na-vur-c3560-3(config)#energywise domain nefkens.net security shared-secret 0 <key> na-vur-c2960-1(config)#energywise domain nefkens.net security shared-secret 0 <key
EnergyWise is now enabled on the switches, let’s see what we kind of information we can already get from EnergyWise
na-vur-c3560-1# show energywise neighbors Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, r - Repeater, P - Phone, U - Unknown Id Neighbor Name Ip:Port Prot Capability -- ------------- ------- ---- ---------- 1 na-vur-c3560-3 10.0.4.3:43440 cdp S 2 na-vur-c2960-1 10.0.4.5:43440 udp S na-vur-c3560-1#
So my core switch sees two EnergyWise neighbors, which is quite correct. It’s also clear that na-vur-c3560-3 was discovered via CDP and na-vur-c2960-1 via UDP. Both protocols are used by EnergyWise.
Time to see what energy consumption the switch is handling via the command show energywise children
You execute this command per switch:
na-vur-c3560-1# show energywise children Module/ Interface Role Name Usage Category Lvl Imp Type --------- ---- ---- ----- -------- --- --- ---- WS-C3560CG-8PC-S na-vur-c3560-1 23.0 (W) consumer 10 1 parent Subtotals: (Consumer: 23.0 (W), Meter: 0.0 (W), Producer: 0.0 (W)) Total: 23.0 (W), Count: 1
This is normal behaviour, my core switch doesn’t have PoE devices and as far as I know, no EnergyWise devices are connected as well (I haven’t found info yet whether the WLC 2504 supports EnergyWise) . It is quite good to see that the core switch only takes 23W of power, which is just a bit below the 24W that the datasheet claims for 5% and 100% throughput load.
So let’s see what the other two switches provide on power consumption
na-vur-c2960-1#show energywise children Module/ Interface Role Name Usage Category Lvl Imp Type --------- ---- ---- ----- -------- --- --- ---- WS-C2960C-12PC-L na-vur-c2960-1 19.0 (W) consumer 10 1 parent Fa0/2 AIR-CAP2602I-E-K9 na-vur-a2602-2 7.1 (W) consumer 10 1 PoE Subtotals: (Consumer: 26.1 (W), Meter: 0.0 (W), Producer: 0.0 (W)) Total: 26.1 (W), Count: 2
This is great! The AP is only taking 7.1W of power while providing clients and the switch just 19W. Great!
And the other switch provides details as well, with an IP phone only taking 5W out of the 15.4W available.
na-vur-c3560-3#show energywise children Module/ Interface Role Name Usage Category Lvl Imp Type --------- ---- ---- ----- -------- --- --- ---- WS-C3560CG-8PC-S na-vur-c3560-3 23.0 (W) consumer 10 1 parent Gi0/3 AIR-CAP2602I-E-K9 na-vur-a2602-1 7.3 (W) consumer 10 1 PoE Gi0/6 IP Phone 8961 SEP381C1ABAA961 5.0 (W) consumer 10 1 PoE Subtotals: (Consumer: 35.3 (W), Meter: 0.0 (W), Producer: 0.0 (W)) Total: 35.3 (W), Count: 3
So, from a power consumption perspective, this is great info! I now know how much power the switches themselves and the connected PoE devices take.
So now I have EnergyWise an EnergyWise domain running. Time to see if I can get some info from the core switch about my EnergyWise domain. For that, you can execute queries via the CLI on any switch within the domain. I’m using the core switch.
The queries are started with the “energywise query
” subset of commands.
With the command energywise query analyze domain
you can verify that all your switches are running EnergyWise as expected.
With the command energywise query importance you can ask all sorts of things in the domain, based on keywords or names. Let’s see what happens if I query for the power consumption within my domain with the command energywise query importance 100 name * collect
usage
EnergyWise query, timeout is 6 seconds: Host Name Usage Level Imp ---- ---- ----- ----- --- 10.0.2.3 Gi0.1 0.0 (W) 10 1 10.0.2.3 Gi0.2 0.0 (W) 10 1 10.0.2.3 na-vur-c3560-1 23.0 (W) 10 1 10.0.2.3 Gi0.3 0.0 (W) 10 1 10.0.2.3 Gi0.4 0.0 (W) 10 1 10.0.2.3 Gi0.5 0.0 (W) 10 1 10.0.2.3 Gi0.6 0.0 (W) 10 1 10.0.2.3 Gi0.7 0.0 (W) 10 1 10.0.2.3 Gi0.8 0.0 (W) 10 1 10.0.2.3 Gi0.9 0.0 (W) 10 1 10.0.2.3 Gi0.10 0.0 (W) 10 1 10.0.4.5 Fa0.1 0.0 (W) 10 1 10.0.4.5 na-vur-a2602-2 7.2 (W) 10 1 10.0.4.5 na-vur-c2960-1 19.0 (W) 10 1 10.0.4.5 Fa0.3 0.0 (W) 10 1 10.0.4.5 Fa0.4 0.0 (W) 10 1 10.0.4.5 Fa0.5 0.0 (W) 10 1 10.0.4.5 Fa0.6 0.0 (W) 10 1 10.0.4.5 Fa0.7 0.0 (W) 10 1 10.0.4.5 Fa0.8 0.0 (W) 10 1 10.0.4.5 Fa0.9 0.0 (W) 10 1 10.0.4.5 Fa0.10 0.0 (W) 10 1 10.0.4.5 Fa0.11 0.0 (W) 10 1 10.0.4.5 Fa0.12 0.0 (W) 10 1 10.0.4.5 Gi0.1 0.0 (W) 10 1 10.0.4.5 Gi0.2 0.0 (W) 10 1 10.0.4.3 Gi0.1 0.0 (W) 10 1 10.0.4.3 Gi0.2 0.0 (W) 10 1 10.0.4.3 na-vur-c3560-3 23.0 (W) 10 1 10.0.4.3 na-vur-a2602-1 7.3 (W) 10 1 10.0.4.3 Gi0.4 0.0 (W) 10 1 10.0.4.3 Gi0.5 0.0 (W) 10 1 10.0.4.3 SEP381C1ABAA961 4.9 (W) 10 1 10.0.4.3 Gi0.7 0.0 (W) 10 1 10.0.4.3 Gi0.8 0.0 (W) 10 1 10.0.4.3 Gi0.9 0.0 (W) 10 1 10.0.4.3 Gi0.10 0.0 (W) 10 1 Queried: 37 Responded: 37 Time: 0.349 seconds
Great, the EnergyWise domain is working.
Scheduling downtime
Time to get back to the scenario that I want to work out. The AP connected to na-vur-C2960c-1 needs to be in low power during the night. And as the API’s for Cisco EnergyWise are only available for Cisco Solution Partners, I will try to do this on the switches that I have running.
I’ve started with the most easy configuration, which is on the interface to which the device is connected. To do this, I’m using the command energywise level <n> recurrence
command. The configuration that I have entered on Fa0/2 is
interface FastEthernet0/2 energywise level 10 recurrence importance 90 at 30 5 * * * energywise level 0 recurrence importance 90 at 30 22 * * * !
This basically tells the switch that the energy level needs to be set to a certain level at a specific time. EnergyWise has 10 power levels, from 0 (no power) to 10 (max). You need to set power level 10 for PoE devices. The fields behind the at keyword are in the same format as cron on Linux systems and just as in cron, use * as wildcards. The fields are in a specific order
- minute
- hour
- day of month
- month
- day of week
So now I have configured my switch to power off the AP at 22:30 and enable it back at 5:30 in the morning.
And this works quite well! I can see in the logging that the AP is shut off at the correct time and restarted as well:
Mar 27 20:30:57.468: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down Mar 27 20:30:58.491: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to down Mar 28 03:30:40.629: %ILPOWER-7-DETECT: Interface Fa0/2: Power Device detected: IEEE PD Mar 28 03:30:41.435: %ILPOWER-5-POWER_GRANTED: Interface Fa0/2: Power granted Mar 28 03:30:45.184: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up Mar 28 03:30:47.223: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up Mar 28 20:30:59.724: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down Mar 28 20:31:00.748: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to down Mar 29 03:30:42.906: %ILPOWER-7-DETECT: Interface Fa0/2: Power Device detected: IEEE PD Mar 29 03:30:43.711: %ILPOWER-5-POWER_GRANTED: Interface Fa0/2: Power granted Mar 29 03:30:47.503: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up Mar 29 03:30:49.541: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
Brilliant, what if you have more than one AP, or also phones.. Should it be possible to do this using queries from a central switch?
That’s something worth figuring out for a next time..
One Response
Thanks for this article! It helped me very much.