DescriptionTest Read/Write SNMP Security Strings
SolutionTo validate whether or not a community string is Read/Write on a wired switch, attempt to change the admin status of one of its ports in Network Sentry. If the string is read only, this test will not be successful.
Linux command:
snmpset -v1 -c <community string> <switch ip address> interfaces.ifTable.ifEntry.ifAdminStatus.<port number> i <admin state>
Admin state value:
2 = down
1 = up
Example 1: Disable port 3
snmpset -v1 -c private 192.168.34.15 interfaces.ifTable.ifEntry.ifAdminStatus.3 i 2
IF-MIB::ifAdminStatus.3 = INTEGER: down(2)
Example 1: Enable port 3
snmpset -v1 -c private 192.168.34.15 interfaces.ifTable.ifEntry.ifAdminStatus.3 i 1
IF-MIB::ifAdminStatus.3 = INTEGER: up(1)