Using SNMP Walk Scripts
Steps for using SNMP Walk Scripts
Setup Environment
The following is the requirement to setup the required environment.
Installing SNMP Client Tool
Execute the following script to install SNMP client using:
apt-get install snmp
yum install net-snmp net-snmp-libs net-snmp-utils
Ruckus MIB files in the MIB directory
Execute the following script to save the Ruckus MIB files in the MIB directory using:
cd RUCKUS_MIB_Directory sudo cp RUCKUS-*.txt /usr/share/snmp/mibs/
Execute the following script to use the Ruckus MIB files.
sh <sample_script>.sh <SZ IP address> <snmpcmd options>
Refer to the OPTIONS section in http://net-snmp.sourceforge.net/docs/man/snmpcmd.html. For example, using SNMPv2 with read community public for controller with the IP address 172.17.1.2.
sh walk_ruckusCTRLApTable_sample.sh 172.17.1.2 -mall -v2c -c public where -mall is an option required for these scripts or you may not be able to get the results.
Tips for Writing Your Own Scripts
- Use -Oe with snmpget/snmpwalk to output index(MAC address) in OID format.
- snmpget can send 128 OIDs at a time.
- Always get all OIDs of the same AP first, instead of OIDs for all APs.
- AP related tables cache data for 15 seconds. This means that you may get the same result if you do not wait for cache timeout.
- You can use NET-SNMP-AGENT-MIB::nsCacheStatus to check cache status of a table. If your system supports snmpset, you can also force it to clean cache via snmpset.
- Be careful with the output format. Refer to OUTPUT OPTIONS link http://net-snmp.sourceforge.net/docs/man/snmpcmd.html