Skip to main content
FortiKoala
Staff
Staff
September 28, 2018

Technical Note: Test Read/Write SNMP Security Strings

  • September 28, 2018
  • 0 replies
  • 2226 views
Description
Test Read/Write SNMP Security Strings

Solution
To 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)