Welcome, Guest. Please login or register.

Author Topic: Discovering PoE  (Read 10937 times)

cmesser

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Discovering PoE
« on: November 27, 2009, 04:09:32 PM »
Hi,

because more and more of our devices become PoE switches, I would appreciate a new (optional) column
at the interface list of devices that shows the power consumption of an attached device.
Maybe also a statistic in device reports would be nice.
The actual PoE Overview in the report seems to depend on the CDP data of an attached device.
But that shows up even if the switch isn't PoE at all. Also non-CDP PoE devices are ignored.

The data I look for is the one you get like this out of the IOS:

Code: [Select]
PoESwitch#sh power inline
Available:124.0(w)  Used:14.0(w)  Remaining:110.0(w)

Interface Admin  Oper       Power   Device              Class Max
                            (Watts)
--------- ------ ---------- ------- ------------------- ----- ----
Fa0/1     auto   off        0.0     n/a                 n/a   15.4
Fa0/2     auto   off        0.0     n/a                 n/a   15.4
Fa0/3     auto   off        0.0     n/a                 n/a   15.4
Fa0/4     auto   off        0.0     n/a                 n/a   15.4
Fa0/5     auto   on         7.0     Ieee PD             2     15.4
Fa0/6     auto   off        0.0     n/a                 n/a   15.4
Fa0/7     auto   on         7.0     Ieee PD             2     15.4
Fa0/8     auto   off        0.0     n/a                 n/a   15.4

Or like this with SNMP
Code: [Select]
snmpwalk -M /usr/share/snmp/mibs/cisco -m CISCO-POWER-ETHERNET-EXT-MIB -v 2c -c public PoESwitch 1.3.6.1.4.1.9.9.402.1.2.1.7
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrAllocated.1.2 = Gauge32: 0 milliwatts
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrAllocated.1.3 = Gauge32: 0 milliwatts
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrAllocated.1.4 = Gauge32: 0 milliwatts
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrAllocated.1.5 = Gauge32: 0 milliwatts
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrAllocated.1.6 = Gauge32: 7000 milliwatts
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrAllocated.1.7 = Gauge32: 0 milliwatts
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrAllocated.1.8 = Gauge32: 7000 milliwatts
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrAllocated.1.9 = Gauge32: 0 milliwatts

Regards

Christoph

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2711
    • View Profile
    • NeDi
Re: Discovering PoE
« Reply #1 on: November 29, 2009, 01:48:00 PM »
As you correctly assume, the current PoE calculations are based on the discovery protocol. The only reason why it's even there is, because it came absolutely free! No additional walks requiring precious discovery time is required (I do it for LLDP though).

When I implemented this, I was thinking about distinguishing between PoE and non-PoE switches, but then I'd like to think, that not too many peoples are using an army of power injectors...

At this stage you just have to know where the power really comes from :) Unless there's a specific need for exact power budgets the current approach should be sufficient. Distinguishing of (non-)PoE devices can be implemented fairly easy, if such a demand exists in the community...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

cmesser

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: Discovering PoE
« Reply #2 on: November 30, 2009, 09:47:42 AM »
I see, but it looks a little bit different from my point of view.
We use Siemens VoIP phones witch do not support CDP. Most of them are powered
over PoE, but some with a power supply if there is no PoE avilable. Also most of our
AP's have an extra power supply (no injector, because they are installed in a pre-PoE era)
but some are powered over PoE.
So for planning issues, the real PoE data would be useful.

But I agree that it is just a "nice to have", not a really "urgently needed" feature  :)

Christoph

rufer

  • Guest
Re: Discovering PoE
« Reply #3 on: November 30, 2009, 05:24:21 PM »
I agree that this would be nice to have. Same thing here, Siemens IP phones that don't support CDP or LLDP.
Up to now we can't oversubscribe a switch - the phones we have use only 4W an our 3560 support enough power for 48 or them. But there will be newer models soon that use more power.

On a more general (Cisco ;D) approach, EnergyWise MIBs could be helpful for this.

Greetings
Rufer

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2711
    • View Profile
    • NeDi
Re: Discovering PoE
« Reply #4 on: November 30, 2009, 06:37:47 PM »
If the community can help me getting the right OIDs (hopefully it's just one) into the defs, it's certainly something for 1oh6...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

cmesser

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: Discovering PoE
« Reply #5 on: December 01, 2009, 01:26:19 PM »
The OID mentioned above is working for WS-C3560-8PC-S , WS-C3560-24PS-S and WS-C3560-48PS-S
but the IOS has to be 12.2-35 or higher. These are the types we use, but I suppose that it's same OID on the complete 3560 family.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2711
    • View Profile
    • NeDi
Re: Discovering PoE
« Reply #6 on: December 01, 2009, 09:46:51 PM »
No worries. I ment 1 OID per switch :) With that I can simply add a poe-status line to Defgen and parse it, if available. I'll need your support for developing this feature though...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

tristanbob

  • Full Member
  • ***
  • Posts: 152
    • View Profile
Re: Discovering PoE
« Reply #7 on: December 02, 2009, 06:20:28 PM »
Remo - We can help test this feature when you start working on it.

Tristan
Please visit "Other"->"Invoices" on your NeDi installation to make an annual contribution and support Nedi!

ves1820

  • Guest
Re: Discovering PoE
« Reply #8 on: March 28, 2010, 03:59:16 AM »
Hi, i updated last night to cisco IOS 122-53.SE1
now i dont get the poe use any more
only 3 devices that are still on 122-35.SE5 reporting power in nedi

on IOS it seems to be the same - maybe it comes from SNMP ?

old (122-35)
Code: [Select]
sh power inline
Available:124.0(w)  Used:26.8(w)  Remaining:97.2(w)

Interface Admin  Oper       Power   Device              Class Max
                            (Watts)
--------- ------ ---------- ------- ------------------- ----- ----
Fa0/1     auto   off        0.0     n/a                 n/a   15.4
Fa0/2     auto   off        0.0     n/a                 n/a   15.4
Fa0/3     auto   off        0.0     n/a                 n/a   15.4
Fa0/4     auto   off        0.0     n/a                 n/a   15.4
Fa0/5     auto   on         10.3    IP Phone 7970       3     15.4
Fa0/6     auto   off        0.0     n/a                 n/a   15.4
Fa0/7     auto   on         10.3    IP Phone 7970       3     15.4
Fa0/8     auto   on         6.3     IP Phone 7940       n/a   15.4

new IOS (122-53)

Code: [Select]

sh power inline
Available:370.0(w)  Used:37.8(w)  Remaining:332.2(w)

Interface Admin  Oper       Power   Device              Class Max
                            (Watts)
--------- ------ ---------- ------- ------------------- ----- ----
Fa0/1     auto   off        0.0     n/a                 n/a   15.4
Fa0/2     auto   off        0.0     n/a                 n/a   15.4
Fa0/3     auto   off        0.0     n/a                 n/a   15.4
Fa0/4     auto   off        0.0     n/a                 n/a   15.4
Fa0/5     auto   off        0.0     n/a                 n/a   15.4
Fa0/6     auto   on         6.3     IP Phone 7940       n/a   15.4
Fa0/7     auto   off        0.0     n/a                 n/a   15.4
...

any suggestions ?

ves1820

  • Guest
Re: Discovering PoE
« Reply #9 on: March 29, 2010, 02:53:58 PM »
Found a alternate source with
Code: [Select]
snmpwalk -c public 192.168.xxx.xxx 1.3.6.1.4.1.9.9.402.1.2.1.7
gives me cpeExtPsePortPwrAllocated
on my 8 port switch
Code: [Select]
SNMPv2-SMI::enterprises.9.9.402.1.2.1.7.1.2 = Gauge32: 0
SNMPv2-SMI::enterprises.9.9.402.1.2.1.7.1.3 = Gauge32: 0
SNMPv2-SMI::enterprises.9.9.402.1.2.1.7.1.4 = Gauge32: 0
SNMPv2-SMI::enterprises.9.9.402.1.2.1.7.1.5 = Gauge32: 0
SNMPv2-SMI::enterprises.9.9.402.1.2.1.7.1.6 = Gauge32: 10250
SNMPv2-SMI::enterprises.9.9.402.1.2.1.7.1.7 = Gauge32: 0
SNMPv2-SMI::enterprises.9.9.402.1.2.1.7.1.8 = Gauge32: 10250
SNMPv2-SMI::enterprises.9.9.402.1.2.1.7.1.9 = Gauge32: 6300

could someone implement this into nedi ?
I'm not a developer but i can test - if there is something to test ...

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2711
    • View Profile
    • NeDi
Re: Discovering PoE
« Reply #10 on: March 30, 2010, 08:34:46 PM »
Thanks for the input. I'm actually thinking about a new config option where PoE handling can be specified:
  • none: Ignore it completely
  • simple: Only CDP will be factored in
  • psonly: Get power supply status
  • full: all PoE-IF and power supply mibs will be read (could also generate alerts accordingly).

Makes sense? Feedback (from anyone) is appreciated...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

harry

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Discovering PoE
« Reply #11 on: March 31, 2010, 01:02:33 AM »
Hi Remo
I think that is a great Idea. We have all most 340 Cisco 3560 and 3570's (POE's) switches. 
This will be very helful feature if implemented. We can test it in our environment and provide feedback.

One more thing Remo, can we have any idea for next version...? the reason I am asking this is ,I want to replace my Procurve Manager with Nedi, if the HP config backup and switch discovery works fine.

I like Nedi.
Harry.

rufer

  • Guest
Re: Discovering PoE
« Reply #12 on: April 06, 2010, 09:39:37 AM »
What do you understand under "Get Power supply status"
We just learned that our new phones can negotiate PoE via LLDP-MED, so for us it would be interesting to have the "show power inline" output in Nedi (total power / remaining power / power per port). The LLDP-MED negotiated power can also be read on the CLI, I guess there are MIBs for it, too.

Example with LLDP-MED phone on Gi0/8:

Code: [Select]
testsw#sh power inline
Available:370.0(w)  Used:148.3(w)  Remaining:221.7(w)

Interface Admin  Oper       Power   Device              Class Max
                            (Watts)
--------- ------ ---------- ------- ------------------- ----- ----
Gi0/1     auto   off        0.0     n/a                 n/a   15.4
Gi0/2     auto   off        0.0     n/a                 n/a   15.4
Gi0/3     auto   on         15.4    Ieee PD             3     15.4
Gi0/4     auto   off        0.0     n/a                 n/a   15.4
Gi0/5     auto   off        0.0     n/a                 n/a   15.4
Gi0/6     auto   off        0.0     n/a                 n/a   15.4
Gi0/7     auto   off        0.0     n/a                 n/a   15.4
Gi0/8     auto   on         5.7     Ieee PD             3     15.4

mailtsw-1#sh lldp neighbors detail
------------------------------------------------
Chassis id: 10.15.184.175
Port id: 001a.e828.52fc
Port Description - not advertised
System Name - not advertised
System Description - not advertised

Time remaining: 103 seconds
System Capabilities: B,T
Enabled Capabilities: T
Management Addresses - not advertised
Auto Negotiation - supported, enabled
Physical media capabilities:
    1000baseT(FD)
    100base-TX(FD)
    100base-TX(HD)
    10base-T(FD)
    10base-T(HD)
Media Attachment Unit type: 30
Vlan ID: - not advertised

MED Information:

    MED Codes:
          (NP) Network Policy, (LI) Location Identification
          (PS) Power Source Entity, (PD) Power Device
          (IN) Inventory

    Inventory information - not advertised
    Capabilities: NP, PD
    Device type: Endpoint Class III
    Network Policy(Voice): VLAN 184, tagged, Layer-2 priority: 5, DSCP: 46
    Network Policy(Voice Signal): VLAN 184, tagged, Layer-2 priority: 3, DSCP: 24
    PD device, Power source: Unknown, Power Priority: Critical, Wattage: 5.7
    Location - not advertised


Greetings
Rufer

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2711
    • View Profile
    • NeDi
Re: Discovering PoE
« Reply #13 on: April 06, 2010, 06:24:48 PM »
Good point with tracking remaining power. I'm gonna think about it, but if worst comes to worst, we can still rely on threshold based syslog messages, right?

With the PS status I'd actually poll, if one failed. Could be useful if you don't just want to rely on syslog...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

michieltimmers

  • Guest
Re: Discovering PoE
« Reply #14 on: June 12, 2014, 12:02:57 AM »
Noticed this old topic and I found the SNMP values to get the remaining power.

pethMainPsePower = "1.3.6.1.2.1.105.1.3.1.1.2"
pethMainPseConsumptionPower = "1.3.6.1.2.1.105.1.3.1.1.4"

Does are the Available and the Used power, subtract and you have the total remaining power of the device.