How to query if PoE ports are enabled using SNMPv3 on the Netgear GS710TUP
In our previous post Simple SNMPv3 client example for Netgear GS710TUP we provided an example of how to use snmpwalk
to show SNMP properties using SHA authentication without encryption (see the previous post for details on how to configure SNMPv3 correctly).
The Netgear GS710TUP also provides SNMP access to the PoE configuration using the POWER-ETHERNET
MIB.
Given the following PoE port configuration on the web UI:
we can query if PoE is enabled or disabled using the OID 1.3.6.1.2.1.105.1.1.1.3
(pethPsePortAdminEnable
):
snmpwalk -v3 -l authNopriv -c public -a SHA1 -u admin -A 'switchAdminPassword' SWITCHIPADDRESS 1.3.6.1.2.1.105.1.1.1.3
Remember to replace switchAdminPassword
by the admin password of your switch and SWITCHIPADDRESS
by the IP address of the switch.
Example output (without the proper MIB being installed):
SNMPv2-SMI::mib-2.105.1.1.1.3.1.1 = INTEGER: 1
SNMPv2-SMI::mib-2.105.1.1.1.3.1.2 = INTEGER: 1
SNMPv2-SMI::mib-2.105.1.1.1.3.1.3 = INTEGER: 1
SNMPv2-SMI::mib-2.105.1.1.1.3.1.4 = INTEGER: 2
SNMPv2-SMI::mib-2.105.1.1.1.3.1.5 = INTEGER: 2
SNMPv2-SMI::mib-2.105.1.1.1.3.1.6 = INTEGER: 1
SNMPv2-SMI::mib-2.105.1.1.1.3.1.7 = INTEGER: 1
SNMPv2-SMI::mib-2.105.1.1.1.3.1.8 = INTEGER: 1
The 8 lines represent the 8 PoE ports of the GS710TUP
.
We can download the relevant MIB from the Netgear website and therefore get a nicer output:
snmpwalk -m GS110_710TUP_V1.0.5.9_MIBs/POWER-ETHERNET-MIB.txt -v3 -l authNopriv -c public -a SHA1 -u admin -A 'switchAdminPassword' SWITCHIPADDRESS 1.3.6.1.2.1.105.1.1.1.3
Output:
POWER-ETHERNET-MIB::pethPsePortAdminEnable.1.1 = INTEGER: true(1)
POWER-ETHERNET-MIB::pethPsePortAdminEnable.1.2 = INTEGER: true(1)
POWER-ETHERNET-MIB::pethPsePortAdminEnable.1.3 = INTEGER: true(1)
POWER-ETHERNET-MIB::pethPsePortAdminEnable.1.4 = INTEGER: false(2)
POWER-ETHERNET-MIB::pethPsePortAdminEnable.1.5 = INTEGER: false(2)
POWER-ETHERNET-MIB::pethPsePortAdminEnable.1.6 = INTEGER: true(1)
POWER-ETHERNET-MIB::pethPsePortAdminEnable.1.7 = INTEGER: true(1)
POWER-ETHERNET-MIB::pethPsePortAdminEnable.1.8 = INTEGER: true(1)