Working on hAP ac^2
You need to specify
i for integer. And
1 is up and
2 is down.
snmpwalk -v2c -c public 192.168.1.14 1.3.6.1.2.1.2.2.1.7
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifAdminStatus.2 = INTEGER: up(1)
IF-MIB::ifAdminStatus.3 = INTEGER: up(1)
IF-MIB::ifAdminStatus.4 = INTEGER: up(1)
IF-MIB::ifAdminStatus.5 = INTEGER: up(1)
IF-MIB::ifAdminStatus.6 = INTEGER: up(1)
IF-MIB::ifAdminStatus.7 = INTEGER: up(1)
IF-MIB::ifAdminStatus.8 = INTEGER: up(1)
snmpset -v2c -c private 192.168.1.14 1.3.6.1.2.1.2.2.1.7.6 i 2
IF-MIB::ifAdminStatus.6 = INTEGER: down(2)
snmpwalk -v2c -c public 10.10.10.14 1.3.6.1.2.1.2.2.1.7
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifAdminStatus.2 = INTEGER: up(1)
IF-MIB::ifAdminStatus.3 = INTEGER: up(1)
IF-MIB::ifAdminStatus.4 = INTEGER: up(1)
IF-MIB::ifAdminStatus.5 = INTEGER: up(1)
IF-MIB::ifAdminStatus.6 = INTEGER: down(2)
IF-MIB::ifAdminStatus.7 = INTEGER: up(1)
IF-MIB::ifAdminStatus.8 = INTEGER: up(1)
Take care 1: Adding a virtual interface or other interface change, may change the interface numbering.
So to us this in a script, use snmpwalk to find interface number for the interface you like to set, then set it based on that.
Take care 2: These action are not logged in command log history, not in system change. So MT please add this, and for all, only enable SNMP write from specific IP