How to enable/disable PoE port power using SNMPv3 on the Netgear GS710TUP
In our previous post How to query if PoE ports are enabled using SNMPv3 on the Netgear GS710TUP we showed how to use snmpwalk to check whether PoE power is enabled on the GS710TUP.
In this post we’ll show how to enable port on
The relevant OID is 1.3.6.1.2.1.105.1.1.1.3 (pethPsePortAdminEnable), therefore the OID for a given port number 1...8 is
1.3.6.1.2.1.105.1.1.1.3.1.PORTNUMBERi.e. the following OIDs are available for the GS710TUP which has 8 PoE ports:
1.3.6.1.2.1.105.1.1.1.3.1.1 # Port 1
1.3.6.1.2.1.105.1.1.1.3.1.2 # Port 2
1.3.6.1.2.1.105.1.1.1.3.1.3 # Port 3
1.3.6.1.2.1.105.1.1.1.3.1.4 # Port 4
1.3.6.1.2.1.105.1.1.1.3.1.5 # Port 5
1.3.6.1.2.1.105.1.1.1.3.1.6 # Port 6
1.3.6.1.2.1.105.1.1.1.3.1.7 # Port 7
1.3.6.1.2.1.105.1.1.1.3.1.8 # Port 8We can therefore enable power on port 1 by using the following command:
snmpset -v3 -l authNopriv -c public -a SHA1 -u admin -A 'switchAdminPassword' SWITCHIPADDRESS 1.3.6.1.2.1.105.1.1.1.3.1.1 i 1or disable power on port 1:
snmpset -v3 -l authNopriv -c public -a SHA1 -u admin -A 'switchAdminPassword' SWITCHIPADDRESS 1.3.6.1.2.1.105.1.1.1.3.1.1 i 2Remember to replace switchAdminPassword by the admin password of your switch and SWITCHIPADDRESS by the IP address of the switch.
i tells snmpset to set an INTEGER. 1 represents true while 2 represents false.
Example output for enabling power on port 1 successfully:
SNMPv2-SMI::mib-2.105.1.1.1.3.1.1 = INTEGER: 1