To chain GETNEXT requests without entering unique commands for each OID or node within a sub-tree, you can run the snmpwalk command.

Prerequisites

Procedure

  1. On a local machine, verify that you have the snmpwalk command installed and install it if necessary.
  2. Run the snmpwalk command.
    snmpwalk -v SNMP_version -l security_level -a authorization_procotol -A authorization_password -x privacy_protocol -X privacy_password -u username host_IP:port queried_MIB_OID

    Where -l is the security level that you can set to noAuthNoPriv, authNoPriv, or authPriv. For help with the snmpwalk command, you can run -h.

Example: snmpwalk Query

A sample query of the sysDescr.0 MIB OID can be the following:

snmpwalk -v 3 -l authPriv -a SHA512 -A myauthpassword -x AES128 -X myprivpassword -u vcd-snmp-user 192.168.100.187:10161 sysDescr.0

This command returns the following output.

SNMPv2-MIB::sysDescr.0 = STRING: VMware-Cloud-Director-Appliance 10.2.2.5553 generic build 17709283 VMware, Inc x86_64